Pete Cooper [Thu, 30 Jul 2015 00:40:42 +0000 (00:40 +0000)]
Prefix make_reverse_iterator with llvm namespace.
This was fallout from r243581. Turns out C++14 has make_reverse_iterator.
Thanks to Filipe and David for the quick fix suggestion.
llvm-svn: 243598
Sean Silva [Thu, 30 Jul 2015 00:26:34 +0000 (00:26 +0000)]
Avoid failure to canonicalize '..'.
Also fix completely broken and untested code which was hiding the
primary bug. The !LLVM_ON_UNIX branch of the ifdef was actually a no-op.
I ran into this in the wild. It was causing failures in our SDK build.
Ideally we'd have a perfect llvm::sys::fs::canonical, but at least this
is a step in the right direction, and fixes an obviously broken case.
In some sense the test case I've added here is an integration test. We
should have these routines thoroughly unit tested in llvm::sys::fs.
llvm-svn: 243597
Sanjay Patel [Thu, 30 Jul 2015 00:04:21 +0000 (00:04 +0000)]
push fast-math check for machine-combiner reassociations into instruction-type check; NFC
This makes it simpler to add instruction types that don't depend on fast-math.
llvm-svn: 243596
Kostya Serebryany [Wed, 29 Jul 2015 23:53:08 +0000 (23:53 +0000)]
[asan,tsan,msan] move the memcmp interceptor from asan/tsan to sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1)
llvm-svn: 243595
Richard Trieu [Wed, 29 Jul 2015 23:47:19 +0000 (23:47 +0000)]
Fix -Wredundant-move warning.
Without DR1579 implemented, the only case for -Wredundant-move is for a
parameter being returned with the same type as the function return type. Also
include a check to verify that the move constructor will be used by matching
nodes in the AST dump.
llvm-svn: 243594
Eric Fiselier [Wed, 29 Jul 2015 23:46:55 +0000 (23:46 +0000)]
Revert recent CMake changes again due to failing compiler-rt builds
llvm-svn: 243593
Richard Smith [Wed, 29 Jul 2015 23:38:25 +0000 (23:38 +0000)]
[modules] When performing redeclaration lookup for a using declaration, prefer
UsingShadowDecls over other declarations of the same entity in the lookup
results. This ensures that we build correct redeclaration chains for the
UsingShadowDecls (otherwise we could see assertions and other misbehavior in
modules builds, when merging combines multiple redeclaration chains for the
same entity from the same module into one chain).
llvm-svn: 243592
Eric Fiselier [Wed, 29 Jul 2015 23:23:18 +0000 (23:23 +0000)]
Attempt to fix build issues introduced by
r243574
llvm-svn: 243591
Matthias Braun [Wed, 29 Jul 2015 23:22:48 +0000 (23:22 +0000)]
IR: Implement Value::mergeUseLists() iteratively
This avoids stack overflows when the the compiler does not perform tail call
elimination. Apparently this happens for MSVC with the /Ob2 switch which
may be used by external code including this header.
Reported by and based on a patch from Jean-Francois Riendeau.
Related to rdar://
21900756
llvm-svn: 243590
Lang Hames [Wed, 29 Jul 2015 23:12:33 +0000 (23:12 +0000)]
[MCJIT] Fix PR20656 by teaching MCJIT to honor ExecutionEngine's global mapping.
This is important for users of the C API who can't supply custom symbol
resolvers yet.
llvm-svn: 243589
Rui Ueyama [Wed, 29 Jul 2015 22:53:29 +0000 (22:53 +0000)]
Remove unused #includes.
llvm-svn: 243588
Rui Ueyama [Wed, 29 Jul 2015 22:38:27 +0000 (22:38 +0000)]
COFF: Suppress "Duplicate entry" warning of lib.exe
We create a module-definition file and give that to lib.exe to
create an import library file. A module-definition has to be
syntactically and semantically correct, of course.
There was a case that we created a module-definition file that
lib.exe would complain for duplicate entries. If a user gives
an unmangled and mangled name for the same symbol, we would end
up having two duplicate lines for the mangled name in a module-
definition file.
This patch fixes that issue by uniquefying entries by mangled
symbol name.
llvm-svn: 243587
Nick Lewycky [Wed, 29 Jul 2015 22:38:23 +0000 (22:38 +0000)]
Fix typo in unused variable name.
llvm-svn: 243586
Nick Lewycky [Wed, 29 Jul 2015 22:32:47 +0000 (22:32 +0000)]
Fix typo "fuction" noticed in comments in AssumptionCache.h, and also all the other files that have the same typo. All comments, no functionality change! (Merely a "fuctionality" change.)
Bonus change to remove emacs major mode marker from SystemZMachineFunctionInfo.cpp because emacs already knows it's C++ from the extension. Also fix typo "appeary" in AMDGPUMCAsmInfo.h.
llvm-svn: 243585
Frederic Riss [Wed, 29 Jul 2015 22:29:50 +0000 (22:29 +0000)]
[dsymutil] Re-add command line option -v this time printing the version.
llvm-svn: 243584
Frederic Riss [Wed, 29 Jul 2015 22:29:46 +0000 (22:29 +0000)]
[dsymutil] Use option categories.
Prevent all the unrelated LLVM options to appear in the -help output
by introducing a tool specific option category. As a drive-by improve
the wording of the help message.
llvm-svn: 243583
Frederic Riss [Wed, 29 Jul 2015 22:29:34 +0000 (22:29 +0000)]
[dsymutil] Rename -v option to -verbose
The dsymutil-classic -v option dumps the tool version rather than
putting it in verbose mode. Rename -v to -verbose and update the
tests that use it (in the process removing it from a few tests that
didn't require it anymore since the -dump-debug-map option was
introduced).
A followup commit will reintroduce the -v option that dumps the
version.
llvm-svn: 243582
Pete Cooper [Wed, 29 Jul 2015 22:19:09 +0000 (22:19 +0000)]
Reapply "Add reverse(ContainerTy) range adapter."
This reverts commit r243567, which ultimately reapplies r243563.
The fix here was to use std::enable_if for overload resolution. Thanks to David
Blaikie for lots of help on this, and for the extra tests!
Original commit message follows:
For cases where we needed a foreach loop in reverse over a container,
we had to do something like
for (const GlobalValue *GV : make_range(TypeInfos.rbegin(),
TypeInfos.rend())) {
This provides a convenience method which shortens this to
for (const GlobalValue *GV : reverse(TypeInfos)) {
There are 2 versions of this, with a preference to the rbegin() version.
The first uses rbegin() and rend() to construct an iterator_range.
The second constructs an iterator_range from the begin() and end() methods
wrapped in std::reverse_iterator's.
Reviewed by David Blaikie.
llvm-svn: 243581
Oleksiy Vyalov [Wed, 29 Jul 2015 22:18:16 +0000 (22:18 +0000)]
Make DWARF at_comp_dir symbolic links configurable via plugin.symbol-file.dwarf.comp-dir-symlink-paths setting.
http://reviews.llvm.org/D11586
llvm-svn: 243580
Michael J. Spencer [Wed, 29 Jul 2015 22:14:50 +0000 (22:14 +0000)]
[ELF2] Templatize addChunk and handle section flags.
llvm-svn: 243579
Eric Christopher [Wed, 29 Jul 2015 22:09:48 +0000 (22:09 +0000)]
Rename hasCompatibleFunctionAttributes->areInlineCompatible based
on suggestions. Currently the function is only used for inline purposes
and this is more descriptive for the use.
llvm-svn: 243578
Simon Pilgrim [Wed, 29 Jul 2015 21:44:27 +0000 (21:44 +0000)]
[X86][SSE] Keep 32-bit target i64 vector shifts on SSE unit.
This patch improves the 32-bit target i64 constant matching to detect the shuffle vector splats that are introduced by i64 vector shift vectorization (D8416).
Differential Revision: http://reviews.llvm.org/D11327
llvm-svn: 243577
Tim Northover [Wed, 29 Jul 2015 21:34:32 +0000 (21:34 +0000)]
AArch64: use 32-bit MOV rather than UBFX to truncate registers.
It's potentially more efficient on Cyclone, and from the optimization guides &
schedulers looks like it has no effect on Cortex-A53 or A57. In general you'd
expect a MOV to be about the most efficient instruction with its semantics,
even though the official "UXTW" alias is really a UBFX.
llvm-svn: 243576
Alex Lorenz [Wed, 29 Jul 2015 21:09:09 +0000 (21:09 +0000)]
MIR Serialization: Serialize the frame info's save and restore points.
This commit serializes the save and restore machine basic block references from
the machine frame information class.
llvm-svn: 243575
Eric Fiselier [Wed, 29 Jul 2015 21:07:28 +0000 (21:07 +0000)]
Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"
This change was reverted in r243550 because it broke clang-format builds
(see PR24306).
This patch recommits a fixed version of the original.
llvm-svn: 243574
Rui Ueyama [Wed, 29 Jul 2015 21:01:15 +0000 (21:01 +0000)]
COFF: Fix command line option spelling.
llvm-svn: 243573
Alex Lorenz [Wed, 29 Jul 2015 20:57:11 +0000 (20:57 +0000)]
MIR Parser: Extract the code that parses MBB references into a new method. NFC.
This commit extracts the code that's used by the class 'MIRParserImpl' to parse
the machine basic block references into a new method named 'parseMBBReference'.
llvm-svn: 243572
Davide Italiano [Wed, 29 Jul 2015 20:55:04 +0000 (20:55 +0000)]
[SemaAccess] Provide meaningful message when we hit llvm_unreachable().
llvm-svn: 243571
Rui Ueyama [Wed, 29 Jul 2015 20:48:02 +0000 (20:48 +0000)]
Remove astyle-options.
We have our own code formatting tool, clang-format.
I believe no one is using "astyle" to format the code.
llvm-svn: 243570
Simon Pilgrim [Wed, 29 Jul 2015 20:31:45 +0000 (20:31 +0000)]
[X86][SSE] Vectorize i64 ASHR operations
This patch vectorizes the v2i64/v4i64 ASHR shift operations - the last remaining integer vector shifts that are still being transferred to/from the scalar unit to be completed.
Differential Revision: http://reviews.llvm.org/D11439
llvm-svn: 243569
Rui Ueyama [Wed, 29 Jul 2015 20:29:15 +0000 (20:29 +0000)]
COFF: Ignore /ThrowNew command line option.
This command line option is added since MSVC 2015. Our wild guess is
that the flag is for LTCG and we can safely ignore that.
llvm-svn: 243568
Pete Cooper [Wed, 29 Jul 2015 20:29:10 +0000 (20:29 +0000)]
Revert "Add reverse(ContainerTy) range adapter."
This reverts commit r243563.
The GCC buildbots were extremely unhappy about this. Reverting while
we discuss a better way of doing overload resolution.
llvm-svn: 243567
David Blaikie [Wed, 29 Jul 2015 20:26:23 +0000 (20:26 +0000)]
[opaque pointers] Remove use of PointerType::getElementType in favor of GEPOperator::getSourceElementType
llvm-svn: 243566
Rui Ueyama [Wed, 29 Jul 2015 20:25:40 +0000 (20:25 +0000)]
COFF: Add /safeseh command line option.
If /safeseh is specified, all input files must be compatible with Safe SEH.
llvm-svn: 243565
Evgeniy Stepanov [Wed, 29 Jul 2015 20:17:21 +0000 (20:17 +0000)]
[asan] XFAIL 1 test on Android.
The test uses source file relative paths which does not work when the
test is executed on a remote device.
llvm-svn: 243564
Pete Cooper [Wed, 29 Jul 2015 20:00:39 +0000 (20:00 +0000)]
Add reverse(ContainerTy) range adapter.
For cases where we needed a foreach loop in reverse over a container,
we had to do something like
for (const GlobalValue *GV : make_range(TypeInfos.rbegin(),
TypeInfos.rend())) {
This provides a convenience method which shortens this to
for (const GlobalValue *GV : reverse(TypeInfos)) {
There are 2 versions of this, with a preference to the rbegin() version.
The first uses rbegin() and rend() to construct an iterator_range.
The second constructs an iterator_range from the begin() and end() methods
wrapped in std::reverse_iterator's.
Reviewed by David Blaikie.
llvm-svn: 243563
Alexey Samsonov [Wed, 29 Jul 2015 19:36:08 +0000 (19:36 +0000)]
[ASan] Disable dynamic alloca and UAR detection in presence of returns_twice calls.
Summary:
returns_twice (most importantly, setjmp) functions are
optimization-hostile: if local variable is promoted to register, and is
changed between setjmp() and longjmp() calls, this update will be
undone. This is the reason why "man setjmp" advises to mark all these
locals as "volatile".
This can not be enough for ASan, though: when it replaces static alloca
with dynamic one, optionally called if UAR mode is enabled, it adds a
whole lot of SSA values, and computations of local variable addresses,
that can involve virtual registers, and cause unexpected behavior, when
these registers are restored from buffer saved in setjmp.
To fix this, just disable dynamic alloca and UAR tricks whenever we see
a returns_twice call in the function.
Reviewers: rnk
Subscribers: llvm-commits, kcc
Differential Revision: http://reviews.llvm.org/D11495
llvm-svn: 243561
Rui Ueyama [Wed, 29 Jul 2015 19:25:00 +0000 (19:25 +0000)]
COFF: ARM: Fix relocations to thumb code.
Windows ARM is the thumb ARM environment, and pointers to thumb code
needs to have its LSB set. When we apply relocations, we need to
adjust the LSB if it points to an executable section.
llvm-svn: 243560
Rui Ueyama [Wed, 29 Jul 2015 19:24:58 +0000 (19:24 +0000)]
COFF: ARM: Fix DLL import table.
The previous test was testing -flavor link. This patch correctly
tests link2 and fixes a bug that we didn't emit import thunks.
llvm-svn: 243559
Colin LeMahieu [Wed, 29 Jul 2015 19:21:13 +0000 (19:21 +0000)]
[llvm-objdump] Inverting logic to match the word "predicate". Returning true when we want it rather than when we want to discard it.
llvm-svn: 243558
Rui Ueyama [Wed, 29 Jul 2015 19:17:15 +0000 (19:17 +0000)]
COFF: Fix seh.test.
seh.test was testing -flavor link. This should have been testing
-flavor link2.
llvm-svn: 243557
Colin LeMahieu [Wed, 29 Jul 2015 19:08:10 +0000 (19:08 +0000)]
[llvm-objdump] Merging MachO DumpSections in to FilterSections. Simplifying some predicate logic.
llvm-svn: 243556
Jingyue Wu [Wed, 29 Jul 2015 18:59:09 +0000 (18:59 +0000)]
Roll forward r242871
r242871 missed one place that should be guarded with isPhysicalReg. This patch
fixes that.
llvm-svn: 243555
Alex Lorenz [Wed, 29 Jul 2015 18:57:23 +0000 (18:57 +0000)]
MIR Serialization: Serialize the '.cfi_def_cfa' CFI instruction.
llvm-svn: 243554
Alex Lorenz [Wed, 29 Jul 2015 18:51:21 +0000 (18:51 +0000)]
MIR Parser: Parse multiple LHS register machine operands.
llvm-svn: 243553
Douglas Katzman [Wed, 29 Jul 2015 18:39:14 +0000 (18:39 +0000)]
Use the AddAllArgs overload which accepts an ArrayRef of OptSpecifier.
Differential Revision: http://reviews.llvm.org/D11599
llvm-svn: 243552
Greg Clayton [Wed, 29 Jul 2015 18:37:25 +0000 (18:37 +0000)]
Centralize where we update the source file contents in SourceManager::GetFile() in case APIs are called that don't update the source.
The following functions were the only functions that updates the source file:
SourceManager::File::DisplaySourceLines()
SourceManager::File::FindLinesMatchingRegex()
But there we API calls that were using the SourceManager::File and asking it questions, like "is line 12 valid" and that might respond incorrectly if the source file had been updated.
<rdar://problem/
21269402>
llvm-svn: 243551
Hans Wennborg [Wed, 29 Jul 2015 18:32:21 +0000 (18:32 +0000)]
Revert r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"
This caused clang-format to stop linking on Mac; see PR24306.
llvm-svn: 243550
Sanjay Patel [Wed, 29 Jul 2015 18:24:18 +0000 (18:24 +0000)]
move DAGCombiner's allowableAlignment() helper function into the TLI
Making allowableAlignment() more accessible was suggested as a predecessor patch
for D10662, so I've pulled it into TargetLowering. This let's us remove 4 instances
of duplicate logic in LegalizeDAG.
There's a subtle functional change in the implementation: the existing
allowableAlignment() code was using getPrefTypeAlignment() when checking
alignment with the DataLayout and assumed that was fast. In this implementation,
we use getABITypeAlignment() and assume that is fast. See the TODO comment or the
discussion in the Phab review for future improvements in this implementation
(don't use the data layout at all).
There are no regression test changes from this difference, and I'm not sure how to
expose it via a test. I think we actually do want to provide the 'Fast' param when
checking this from DAGCombiner::MergeConsecutiveStores(). Ie, we shouldn't merge
stores if the new stores are not going to be fast. But that change will require
fixing allowsMisalignedMemoryAccess() overrides as noted in D10662.
Differential Revision: http://reviews.llvm.org/D10905
llvm-svn: 243549
Evgeniy Stepanov [Wed, 29 Jul 2015 18:22:25 +0000 (18:22 +0000)]
[asan] Remove special case mapping on Android/AArch64.
ASan shadow on Android starts at address 0 for both historic and
performance reasons. This is possible because the platform mandates
-pie, which makes lower memory region always available.
This is not such a good idea on 64-bit platforms because of MAP_32BIT
incompatibility.
This patch changes Android/AArch64 mapping to be the same as that of
Linux/AAarch64.
llvm-svn: 243548
Peter Collingbourne [Wed, 29 Jul 2015 18:12:45 +0000 (18:12 +0000)]
CFI: Update tests for various bit vector sizes following lowerbitsets optzns.
Also add a test to ensure that this doesn't regress.
Differential Revision: http://reviews.llvm.org/D11584
llvm-svn: 243547
Peter Collingbourne [Wed, 29 Jul 2015 18:12:36 +0000 (18:12 +0000)]
LowerBitSets: Add debugging output.
Differential Revision: http://reviews.llvm.org/D11583
llvm-svn: 243546
Michael Zolotukhin [Wed, 29 Jul 2015 18:10:33 +0000 (18:10 +0000)]
[Unroll] Handle SwitchInst properly.
Previously successor selection was simply wrong.
llvm-svn: 243545
Michael Zolotukhin [Wed, 29 Jul 2015 18:10:29 +0000 (18:10 +0000)]
[Unroll] Don't crash when simplified branch condition is undef.
llvm-svn: 243544
Michael Zolotukhin [Wed, 29 Jul 2015 18:10:23 +0000 (18:10 +0000)]
Rename test full-unroll-bad-geps.ll to full-unroll-crashers.ll.
No reason to limit it only to GEP-related crashes. More tests are to
come here.
llvm-svn: 243543
Lang Hames [Wed, 29 Jul 2015 18:07:48 +0000 (18:07 +0000)]
Fix typos in comments. NFC.
llvm-svn: 243542
Jim Ingham [Wed, 29 Jul 2015 17:51:36 +0000 (17:51 +0000)]
Add a function to make a mutex-protected copy of a breakpoint site's
owners list, so the StopInfo machinery can get the list of owners without
some other thread being able to mess up the list by deleting/disabline one of its
locations in the process of doing so.
<rdar://problem/
18685197>
llvm-svn: 243541
Bruno Cardoso Lopes [Wed, 29 Jul 2015 17:46:47 +0000 (17:46 +0000)]
Revert "[PeepholeOptimizer] Look through PHIs to find additional register sources"
Reported to Broke some internal tests: PR24303
This reverts commit r243486.
llvm-svn: 243540
Douglas Katzman [Wed, 29 Jul 2015 17:34:41 +0000 (17:34 +0000)]
Add an ArgList::AddAllArgs that accepts a vector of OptSpecifier.
This lifts the somewhat arbitrary restriction on 3 OptSpecifiers.
Differential Revision: http://reviews.llvm.org/D11597
llvm-svn: 243539
Richard Trieu [Wed, 29 Jul 2015 17:03:34 +0000 (17:03 +0000)]
Disable -Wpessimizing-move and -Wredundant-move in template instantiations.
Dependent types can throw off the analysis for these warnings, possibly giving
conflicting warnings and fix-its. Disabling the warning in template
instantiations will prevent this problem, and will still catch the
non-dependent cases in templates.
llvm-svn: 243538
Tim Northover [Wed, 29 Jul 2015 16:39:56 +0000 (16:39 +0000)]
AArch64: use AddressingModes.h accessors for compare shifts
No functional change because "lsl #12" is actually encoded as 12, but one less
bug if someone ever decides to change that for the giggles.
llvm-svn: 243536
Rui Ueyama [Wed, 29 Jul 2015 16:30:45 +0000 (16:30 +0000)]
COFF: Fix SECREL and SECTION relocations.
SECREL should sets the 32-bit offset of the target from the beginning
of *target's* output section. Previously, the offset from the beginning
of source's output section was used instead.
SECTION means the target section's index, and not the source section's
index. This patch fixes that issue too.
llvm-svn: 243535
Rui Ueyama [Wed, 29 Jul 2015 16:30:40 +0000 (16:30 +0000)]
ELF2: Use DenseMap instead of std::map for a symbol table.
We use DenseMap for COFF too.
llvm-svn: 243534
Rui Ueyama [Wed, 29 Jul 2015 16:30:34 +0000 (16:30 +0000)]
COFF: Remove unused command line option.
llvm-svn: 243533
Rui Ueyama [Wed, 29 Jul 2015 16:30:31 +0000 (16:30 +0000)]
COFF: Set load config table entry on non-x86.
llvm-svn: 243532
Hans Wennborg [Wed, 29 Jul 2015 16:29:06 +0000 (16:29 +0000)]
test-release.sh: Add option for building the OpenMP run-time
This isn't part of the official release process, but provides a convenient way
to build binaries for those who want to experiment with it. Hopefully the run-
time can be part of the regular build and release process for 3.8.
Differential Revision: http://reviews.llvm.org/D11494
llvm-svn: 243531
Marshall Clow [Wed, 29 Jul 2015 16:25:45 +0000 (16:25 +0000)]
Fix a self-move bug in inplace_merge. Thanks to Ted and Dexon for the report and the suggested fix.
llvm-svn: 243530
Reid Kleckner [Wed, 29 Jul 2015 16:19:40 +0000 (16:19 +0000)]
Delete unused <dbghelp.h> include
llvm-svn: 243529
Aaron Ballman [Wed, 29 Jul 2015 15:57:49 +0000 (15:57 +0000)]
Reverting r243386 because it has serious post-commit concerns that have not been addressed. Also reverts r243389, which relied on this commit.
llvm-svn: 243527
Colin LeMahieu [Wed, 29 Jul 2015 15:45:39 +0000 (15:45 +0000)]
[llvm-objdump] Added -j flag to filter sections that are operated on.
llvm-svn: 243526
Yaron Keren [Wed, 29 Jul 2015 15:42:28 +0000 (15:42 +0000)]
In case of an existing GlobalVariable, the comdat is created using the name of the
new GV (usually NAME.1) instead of the correct NAME of the old GV. Moving comdat
creation after GV replacement solves this. Patch + testcase.
Reviewed by Reid Kleckner.
http://reviews.llvm.org/D11594
llvm-svn: 243525
Yaron Keren [Wed, 29 Jul 2015 15:28:02 +0000 (15:28 +0000)]
Make this test target x86_64-pc-windows-gnu as well.
llvm-svn: 243523
Jingyue Wu [Wed, 29 Jul 2015 15:26:11 +0000 (15:26 +0000)]
Temporarily revert r242871
PR24299
llvm-svn: 243522
Tamas Berghammer [Wed, 29 Jul 2015 15:15:42 +0000 (15:15 +0000)]
Fix read/write context in EmulateInstructionARM strd/ldrd
llvm-svn: 243521
Tamas Berghammer [Wed, 29 Jul 2015 15:14:37 +0000 (15:14 +0000)]
Remove non-utf-8 characters from EmulateInstructionARM
llvm-svn: 243520
Bill Schmidt [Wed, 29 Jul 2015 14:31:57 +0000 (14:31 +0000)]
[PPC] Fix PR24216: Don't generate splat for misaligned shuffle mask
Given certain shuffle-vector masks, LLVM emits splat instructions
which splat the wrong bytes from the source register. The issue is
that the function PPC::isSplatShuffleMask() in PPCISelLowering.cpp
does not ensure that the splat pattern found is requesting bytes that
are aligned on an EltSize boundary. This patch detects this situation
as not a valid splat mask, resulting in a permute being generated
instead of a splat.
Patch and test case by Tyler Kenney, cleaned up a bit by me.
This is a simple bug fix that would be good to incorporate into 3.7.
llvm-svn: 243519
Akira Hatanaka [Wed, 29 Jul 2015 14:25:58 +0000 (14:25 +0000)]
[AArch64] Pass subtarget feature "+strict-align".
This commit changes the driver to save subtarget feature "+strict-align"
to the IR instead of using backend option "aarch64-strict-align". This is
needed for LTO.
rdar://problem/
21529937
llvm-svn: 243518
Yaron Keren [Wed, 29 Jul 2015 14:21:47 +0000 (14:21 +0000)]
Remove unnecessary variable.
llvm-svn: 243517
Akira Hatanaka [Wed, 29 Jul 2015 14:17:26 +0000 (14:17 +0000)]
[AArch64] Define subtarget feature strict-align.
This commit defines subtarget feature strict-align and uses it instead of
cl::opt -aarch64-strict-align to decide whether strict alignment should be
forced.
rdar://problem/
21529937
llvm-svn: 243516
Tobias Grosser [Wed, 29 Jul 2015 13:52:05 +0000 (13:52 +0000)]
Do not detect scops that are delinearized to arrays with "undef" size
Such codes are not interesting to optimize and most likely never appear in the
normal compilation flow. However, they show up during test case reduction with
bugpoint and trigger -- without this change -- an assert in
polly::MemoryAccess::foldAccess(). It is better to detect them in
ScopDetection itself and just bail out.
Contributed-by: Utpal Bora <cs14mtech11017@iith.ac.in>
Reviewers: grosser
Subscribers: pollydev, llvm-commits
Differential Revision: http://reviews.llvm.org/D11425
llvm-svn: 243515
Asaf Badouh [Wed, 29 Jul 2015 12:34:20 +0000 (12:34 +0000)]
[X86][AVX512BW] add convert i16 to i8 and unpack intrinsics
Differential Revision: http://reviews.llvm.org/D11564
llvm-svn: 243514
Pavel Labath [Wed, 29 Jul 2015 12:33:31 +0000 (12:33 +0000)]
[LLGS] Spawned process handling cleanup
Summary:
This commit moves the m_spawned_pids member from the common LLGS/Platform class to the plaform
specific part. This enables us to remove LLGS code, which was attempting to manage the
m_spawned_pids contents, but at the same time making sure, there is only one debugged process. If
we ever want to do multi-process debugging, we will probably want to replace this with a set of
NativeProcessProtocolSP anyway. The only functional change is that support for
qKillSpawnedProcess packet is removed from LLGS, but this was not used there anyway (we have the
k packet for that).
Reviewers: ovyalov, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11557
llvm-svn: 243513
Asaf Badouh [Wed, 29 Jul 2015 12:22:19 +0000 (12:22 +0000)]
[X86][AVX512BW] Replace attributes with __DEFAULT_FN_ATTRS
llvm-svn: 243512
Jason Molenda [Wed, 29 Jul 2015 01:42:16 +0000 (01:42 +0000)]
When debugserver fails to attach to a process on a Darwin
system, make a couple of additional checks to see if the
attach was denied via the System Integrity Protection that
is new in Mac OS X 10.11. If so, return a special E87
error code to indicate this to lldb.
Up in lldb, if we receive the E87 error code, be specific
about why the attach failed.
Also detect the more common case of general attach failure
and print a better error message than "lost connection".
I believe this code will all build on Mac OS X 10.10 systems.
It may not compile or run on earlier versions of the OS.
None of this should build on other non-darwin systems.
llvm-svn: 243511
Dawn Perchik [Wed, 29 Jul 2015 01:01:14 +0000 (01:01 +0000)]
[lldb-mi] Fix tests added in r243484 for breakpoints using file:func syntax.
llvm-svn: 243510
Michael J. Spencer [Wed, 29 Jul 2015 00:52:17 +0000 (00:52 +0000)]
[ELF2] Emit correct section types.
llvm-svn: 243509
Jason Molenda [Wed, 29 Jul 2015 00:42:47 +0000 (00:42 +0000)]
First part of an attempt to indicate to the user when they are
debugging optimized code. Adds new methods on Function/SBFunction
to query whether a given function is optimized. Adds a new
function.is-optimized format entity and changes the default
frame-format to append "[opt]" if the function was built with
optimization.
The only indication that a binary was built with optimization
that we have right now is the presence of the DW_AT_APPLE_optimized
attribute (DW_FORM_flag value 1) in the DW_TAG_compile_unit.
The absence of this flag may mean that the compile_unit was not
compiled with optimization, or it may mean that the producer
does not generate this attribute.
Currently this only works for dSYM debugging. When we create
the CompileUnit with dwarf-in-.o-file debugging we don't have
the attribute value yet so it's not set. I need to find the
flag value when we do start to read the .o file DWARF and
set the CompileUnit's status at that point - but haven't
done it yet.
I'm also going to add a mechanism for issuing warnings to users
such that they're only issued once in a debug session and
there is away for users to suppress these warnings altogether
via .lldbinit file settings. But I want to get this changeset
committed now that it's at a useful state.
<rdar://problem/
19281172>
llvm-svn: 243508
Jim Ingham [Wed, 29 Jul 2015 00:40:36 +0000 (00:40 +0000)]
Lock the owners mutex in the BreakpointSite before updating the hit
counts. If you delete a breakpoint belonging to a site just as you are
processing a hit on that site, you could cause the BreakpointSite loop to
access a now deleted location.
<rdar://problem/
19310323>
llvm-svn: 243507
Michael J. Spencer [Wed, 29 Jul 2015 00:30:10 +0000 (00:30 +0000)]
[ELF2] Emit section table.
llvm-svn: 243506
Bjarke Hammersholt Roune [Wed, 29 Jul 2015 00:29:08 +0000 (00:29 +0000)]
Make function comments consistently imperative.
(tiny edit, mostly a test that my new commit access works)
llvm-svn: 243505
Dawn Perchik [Wed, 29 Jul 2015 00:22:53 +0000 (00:22 +0000)]
[lldb-mi] XFAIL new test added in r243484.
llvm-svn: 243504
Eric Fiselier [Wed, 29 Jul 2015 00:03:51 +0000 (00:03 +0000)]
[libcxx] Cleanup CMake configuration and integrate with LLVM
Summary:
This patch contains the following changes:
1. Require that libc++ can find a LLVM source directory. This is done the same way as `libc++abi` currently does.
2. Cleanup ugly configuration code in CMakeLists.txt by using `add_flags`, `add_flags_if`, and `add_flags_if_supported` macros.
The goals for this patch are:
1. Help libc++ be more consistent with how LLVM handles CMake options (see PR23670 PR23671).
2. Make it easier to use sanitizers using the `LLVM_USE_SANITIZER` option.
3. Make libc++'s CMakeLists.txt file easier to understand and change.
4. Move towards allowing libc++ to create Sphinx documentation (see http://efcs.ca/libcxx-docs).
5. Move towards allowing libc++ to use other LLVM utilities such as `not` and `FileCheck`.
Reviewers: mclow.lists, jroelofs, danalbert
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11308
llvm-svn: 243503
Sanjoy Das [Tue, 28 Jul 2015 23:50:30 +0000 (23:50 +0000)]
[Statepoints] Let patchable statepoints have a symbolic call target.
Summary:
As added initially, statepoints required their call targets to be a
constant pointer null if ``numPatchBytes`` was non-zero. This turns out
to be a problem ergonomically, since there is no way to mark patchable
statepoints as calling a (readable) symbolic value.
This change remove the restriction of requiring ``null`` call targets
for patchable statepoints, and changes PlaceSafepoints to maintain the
symbolic call target through its transformation.
Reviewers: reames, swaroop.sridhar
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11550
llvm-svn: 243502
Alex Lorenz [Tue, 28 Jul 2015 23:34:27 +0000 (23:34 +0000)]
Fix broken ArrayRef conversion from r243497.
llvm-svn: 243501
Sanjay Patel [Tue, 28 Jul 2015 23:28:22 +0000 (23:28 +0000)]
ignore duplicate divisor uses when transforming into reciprocal multiplies (PR24141)
PR24141: https://llvm.org/bugs/show_bug.cgi?id=24141
contains a test case where we have duplicate entries in a node's uses() list.
After r241826, we use CombineTo() to delete dead nodes when combining the uses into
reciprocal multiplies, but this fails if we encounter the just-deleted node again in
the list.
The solution in this patch is to not add duplicate entries to the list of users that
we will subsequently iterate over. For the test case, this avoids triggering the
combine divisors logic entirely because there really is only one user of the divisor.
Differential Revision: http://reviews.llvm.org/D11345
llvm-svn: 243500
Eric Fiselier [Tue, 28 Jul 2015 23:27:03 +0000 (23:27 +0000)]
Remove sanitizer XFAILs on a test.
llvm-svn: 243499
Sanjay Patel [Tue, 28 Jul 2015 23:05:48 +0000 (23:05 +0000)]
fix TLI's combineRepeatedFPDivisors interface to return the minimum user threshold
This fix was suggested as part of D11345 and is part of fixing PR24141.
With this change, we can avoid walking the uses of a divisor node if the target
doesn't want the combineRepeatedFPDivisors transform in the first place.
There is no NFC-intended other than that.
Differential Revision: http://reviews.llvm.org/D11531
llvm-svn: 243498
Alex Lorenz [Tue, 28 Jul 2015 23:02:45 +0000 (23:02 +0000)]
MIR Serialization: Serialize the target index machine operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243497
Michael J. Spencer [Tue, 28 Jul 2015 22:58:25 +0000 (22:58 +0000)]
[ELF2] Devirtualize SymbolBody.
llvm-svn: 243496
Rui Ueyama [Tue, 28 Jul 2015 22:56:02 +0000 (22:56 +0000)]
COFF: _tls_used is __tls_used on x86.
llvm-svn: 243495