Hans Wennborg [Fri, 26 Jun 2015 16:48:02 +0000 (16:48 +0000)]
Revert r240762 "[X86] Cleanup X86WindowsTargetObjectFile::getSectionForConstant"
It seems to have caused PR23966: "UNREACHABLE executed at ..\lib\Target\X86\X86TargetObjectFile.cpp:148"
llvm-svn: 240793
Alex Lorenz [Fri, 26 Jun 2015 16:46:11 +0000 (16:46 +0000)]
MIR Serialization: Serialize machine basic block operands.
This commit serializes machine basic block operands. The
machine basic block operands use the following syntax:
%bb.<id>[.<name>]
This commit also modifies the YAML representation for the
machine basic blocks - a new, required field 'id' is added
to the MBB YAML mapping.
The id is used to resolve the MBB references to the
actual MBBs. And while the name of the MBB can be
included in a MBB reference, this name isn't used to
resolve MBB references - as it's possible that multiple
MBBs will reference the same BB and thus they will have the
same name. If the name is specified, the parser will verify
that it is equal to the name of the MBB with the specified id.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10608
llvm-svn: 240792
Douglas Katzman [Fri, 26 Jun 2015 15:47:46 +0000 (15:47 +0000)]
clang-format some of the files in lib/Driver. NFC
Nothing was hand edited afterward except a few literal strings
and comments that were poorly broken.
Differential Revision: http://reviews.llvm.org/D10689
llvm-svn: 240791
Rafael Espindola [Fri, 26 Jun 2015 15:27:04 +0000 (15:27 +0000)]
ELF: Simplify the rel/rela implementation.
Now the rela class inherits from rel and just adds the addend.
llvm-svn: 240790
Vince Harron [Fri, 26 Jun 2015 15:13:21 +0000 (15:13 +0000)]
Added expectedFlakey test decorator
SUMMARY
Flakey tests get two chances to pass
Also, switched a bunch of tests to use new decorator.
TEST PLAN
Add one of these decorators to a test
Edit a test to pass on the first invocation, confirm test appears as pass
Edit a test to pass on the first invocation, pass on the second, confirm test appears as xfail
Edit a test to fail on two consecutive runs, confirm test appears in results as fail/error
Differential Revision: http://reviews.llvm.org/D10721
llvm-svn: 240789
Benjamin Kramer [Fri, 26 Jun 2015 14:51:49 +0000 (14:51 +0000)]
[DAGCombiner] Preserve the exact bit when simplifying SRA to SRL.
Allows more aggressive folding of ashr/shl pairs.
llvm-svn: 240788
Benjamin Kramer [Fri, 26 Jun 2015 14:51:36 +0000 (14:51 +0000)]
[DAGCombine] fold (X >>?,exact C1) << C2 --> X << (C2-C1)
Instcombine also does this but many opportunities only become visible
after GEPs are lowered.
llvm-svn: 240787
Aaron Ballman [Fri, 26 Jun 2015 14:51:22 +0000 (14:51 +0000)]
Silencing spurious MSVC C4189 warnings regarding local variables that are initialized but not used; NFC. This bug has been reported to Microsoft (https://connect.microsoft.com/VisualStudio/feedback/details/1475983).
llvm-svn: 240786
Rafael Espindola [Fri, 26 Jun 2015 14:51:16 +0000 (14:51 +0000)]
Rename getObjectFile to getObject for consistency.
llvm-svn: 240785
Rafael Espindola [Fri, 26 Jun 2015 14:11:54 +0000 (14:11 +0000)]
Simplify isSymbolList64Bit. NFC.
llvm-svn: 240784
Rafael Espindola [Fri, 26 Jun 2015 13:24:23 +0000 (13:24 +0000)]
Simplify isObject. NFC.
llvm-svn: 240783
Toma Tabacu [Fri, 26 Jun 2015 13:20:17 +0000 (13:20 +0000)]
[mips] [IAS] Add partial support for the ULW pseudo-instruction.
Summary:
This only adds support for ULW of an immediate address with/without a source register.
It does not include support for ULW of the address of a symbol.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9663
llvm-svn: 240782
Rafael Espindola [Fri, 26 Jun 2015 13:19:38 +0000 (13:19 +0000)]
Update for llvm changes.
llvm-svn: 240781
Rafael Espindola [Fri, 26 Jun 2015 13:11:15 +0000 (13:11 +0000)]
Implement elf_section_iterator and getELFType().
And with those, simplify getSymbolNMTypeChar.
llvm-svn: 240780
Rafael Espindola [Fri, 26 Jun 2015 12:44:10 +0000 (12:44 +0000)]
Expose getFlags via ELFSectionRef.
llvm-svn: 240779
Rafael Espindola [Fri, 26 Jun 2015 12:33:37 +0000 (12:33 +0000)]
Add a ELFSectionRef class and use it to expose getSectionType.
llvm-svn: 240778
Rafael Espindola [Fri, 26 Jun 2015 12:18:49 +0000 (12:18 +0000)]
Simplify getSymbolType.
This is still a really odd function. Most calls are in object format specific
contexts and should probably be replaced with a more direct query, but at least
now this is not too obnoxious to use.
llvm-svn: 240777
Javed Absar [Fri, 26 Jun 2015 12:14:56 +0000 (12:14 +0000)]
[ARM] Cortex-R4F is not VFPOnlySP
Cortex-R4F TRM states that fpu supports both single and double precision.
This patch corrects the information in ARM.td file and corresponding test.
Reviewers: rengolin
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10763
llvm-svn: 240776
Tobias Grosser [Fri, 26 Jun 2015 12:09:28 +0000 (12:09 +0000)]
Drop divs before adding array-out-of-bounds assumptions
In case we have modulo operations in the access function (supported since
r240518), the assumptions generated to ensure array accesses remain within
bounds can contain existentially quantified dimensions which results in more
complex and more difficult to handle integer sets. As a result LNT's linpack
benchmark started to fail due to excessive compile time.
We now just drop the existentially quantified dimensions. This should be
generally save, but may result in less precise assumptions which may
consequently make us fall back to the original (unoptimized) code more often. In
practice, these cases probably do not appear to often.
I had difficulties to extract a good test case, but fortunately our LNT bots
cover this one well.
llvm-svn: 240775
Rafael Espindola [Fri, 26 Jun 2015 11:39:57 +0000 (11:39 +0000)]
Make getOther ELF only.
No other format has this field.
llvm-svn: 240774
Rafael Espindola [Fri, 26 Jun 2015 11:31:13 +0000 (11:31 +0000)]
Optimize the creation of mapping symbols.
No need to create two symbols just to assign one to the other.
llvm-svn: 240773
Pavel Labath [Fri, 26 Jun 2015 10:14:12 +0000 (10:14 +0000)]
[NativeProcessLinux] Use lambdas in DoOperation calls
Summary:
This removes a lot of boilerplate, which was needed to execute monitor operations. Previously one
needed do declare a separate class for each operation which would manually capture all needed
arguments, which was very verbose. In addition to less code, I believe this also makes the code
more readable, since now the implementation of the operation can be physically closer to the code
that invokes it.
Test Plan: Code compiles on x86, arm and mips, tests pass on x86 linux.
Reviewers: tberghammer, chaoren
Subscribers: aemerson, lldb-commits
Differential Revision: http://reviews.llvm.org/D10694
llvm-svn: 240772
Sergey Dmitrouk [Fri, 26 Jun 2015 10:13:56 +0000 (10:13 +0000)]
Do not ignore projects/LLVMBuild.txt in git repo
Without explicit exception for the path, it matches projects/* rule.
llvm-svn: 240771
Tamas Berghammer [Fri, 26 Jun 2015 09:41:32 +0000 (09:41 +0000)]
Add branch emulation to aarch64 instruction emulator
The emulation of the branches are required by the new stack
unwinding logic to reinstantiate the prologue at the right place.
Differential revision: http://reviews.llvm.org/D10702
llvm-svn: 240769
Ewan Crawford [Fri, 26 Jun 2015 09:38:27 +0000 (09:38 +0000)]
XML register info fix
There are a couple of bugs in the XML register info handling which this patch fixes:
+ conflicting variable names in lambda, both capture list and parameters contains a variable called 'name'.
+ prev_reg_num, which sets the register number, should be incremented after each register is processed.
+ Windows errors regarding empty strings and the 'xi:' prefix disappearing from 'xi:include' node name.
Reviewers: clayborg
Subscribers: lldb-commits, deepak2427
Differential Revision: http://reviews.llvm.org/D10731
llvm-svn: 240768
Alexander Potapenko [Fri, 26 Jun 2015 09:28:24 +0000 (09:28 +0000)]
[libsanitizer] Delete the unused GetBinaryName() function.
llvm-svn: 240767
Tobias Grosser [Fri, 26 Jun 2015 07:31:18 +0000 (07:31 +0000)]
Remove code for scalar and PHI to array translation
This removes old code that has been disabled since several weeks and was hidden
behind the flags -disable-polly-intra-scop-scalar-to-array=false and
-polly-model-phi-nodes=false. Earlier, Polly used to translate scalars and
PHI nodes to single element arrays, as this avoided the need for their special
handling in Polly. With Johannes' patches adding native support for such scalar
references to Polly, this code is not needed any more. After this commit both
-polly-prepare and -polly-independent are now mostly no-ops. Only a couple of
simple transformations still remain, but they are scheduled for removal too.
Thanks again to Johannes Doerfert for his nice work in making all this code
obsolete.
llvm-svn: 240766
Simon Atanasyan [Fri, 26 Jun 2015 07:25:20 +0000 (07:25 +0000)]
[Mips] Reject R_MIPS_CALL16 against local symbols
llvm-svn: 240765
Simon Atanasyan [Fri, 26 Jun 2015 07:25:12 +0000 (07:25 +0000)]
[Mips] Use helper functions to determine relocations purpose
That allows to remove duplicated long switch/case statements.
No functional changes.
llvm-svn: 240764
Simon Atanasyan [Fri, 26 Jun 2015 07:25:06 +0000 (07:25 +0000)]
[Mips] Create LA25 stubs for all branch relocations
llvm-svn: 240763
David Majnemer [Fri, 26 Jun 2015 07:03:12 +0000 (07:03 +0000)]
[X86] Cleanup X86WindowsTargetObjectFile::getSectionForConstant
No functionality changed, just keeping things clean.
llvm-svn: 240762
Alex Denisov [Fri, 26 Jun 2015 05:28:36 +0000 (05:28 +0000)]
[ObjC] Add NSValue support for objc_boxed_expressions
Patch extends ObjCBoxedExpr to accept records (structs and unions):
typedef struct __attribute__((objc_boxable)) _Color {
int r, g, b;
} Color;
Color color;
NSValue *boxedColor = @(color); // [NSValue valueWithBytes:&color objCType:@encode(Color)];
llvm-svn: 240761
Hao Liu [Fri, 26 Jun 2015 04:38:21 +0000 (04:38 +0000)]
[InterleavedAccess] Fix failures "undefined type 'llvm::raw_ostream'" on windows.
llvm-svn: 240760
Rui Ueyama [Fri, 26 Jun 2015 04:26:02 +0000 (04:26 +0000)]
COFF: Update README with the latest performance numbers.
llvm-svn: 240759
Rui Ueyama [Fri, 26 Jun 2015 03:50:27 +0000 (03:50 +0000)]
COFF: Add a test for r240719.
llvm-svn: 240758
Rui Ueyama [Fri, 26 Jun 2015 03:44:00 +0000 (03:44 +0000)]
COFF: Change symbol resolution order for entry and /include.
We were resolving entry symbols and /include'd symbols after all other
symbols are resolved. But looks like it's too late. I found that it
causes some program to fail to link.
Let's say we have an object file A which defines symbols X and Y in an
archive. We also have another file B after A which defines X, Y and
_DLLMainCRTStartup in another archive. They conflict each other, so
either A or B can be linked.
If we have _DLLMainCRTStartup as an undefined symbol, file B is always
chosen. If not, there's a chance that A is chosen. If the linker
find it needs _DllMainCRTStartup after that, it's too late.
This patch adds undefined symbols to the symbol table as soon as
possible to fix the issue.
llvm-svn: 240757
Rui Ueyama [Fri, 26 Jun 2015 03:09:23 +0000 (03:09 +0000)]
COFF: Fix local absolute symbols.
Absolute symbols were always handled as external symbols, so if two
or more object files define the same absolute symbol, they would
conflict even if the symbol is private to each file.
This patch fixes that bug.
llvm-svn: 240756
Hao Liu [Fri, 26 Jun 2015 02:45:36 +0000 (02:45 +0000)]
[ARM] Lower interleaved memory accesses to vldN/vstN intrinsics.
This patch also adds a function to calculate the cost of interleaved memory accesses.
E.g. Lower an interleaved load:
%wide.vec = load <8 x i32>, <8 x i32>* %ptr, align 4
%v0 = shuffle %wide.vec, undef, <0, 2, 4, 6>
%v1 = shuffle %wide.vec, undef, <1, 3, 5, 7>
into:
%vld2 = { <4 x i32>, <4 x i32> } call llvm.arm.neon.vld2(%ptr, 4)
%vec0 = extractelement { <4 x i32>, <4 x i32> } %vld2, i32 0
%vec1 = extractelement { <4 x i32>, <4 x i32> } %vld2, i32 1
E.g. Lower an interleaved store:
%i.vec = shuffle <8 x i32> %v0, <8 x i32> %v1, <0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11>
store <12 x i32> %i.vec, <12 x i32>* %ptr, align 4
into:
%sub.v0 = shuffle <8 x i32> %v0, <8 x i32> v1, <0, 1, 2, 3>
%sub.v1 = shuffle <8 x i32> %v0, <8 x i32> v1, <4, 5, 6, 7>
%sub.v2 = shuffle <8 x i32> %v0, <8 x i32> v1, <8, 9, 10, 11>
call void llvm.arm.neon.vst3(%ptr, %sub.v0, %sub.v1, %sub.v2, 4)
Differential Revision: http://reviews.llvm.org/D10533
llvm-svn: 240755
Hao Liu [Fri, 26 Jun 2015 02:32:07 +0000 (02:32 +0000)]
[AArch64] Lower interleaved memory accesses to ldN/stN intrinsics. This patch also adds a function to calculate the cost of interleaved memory accesses.
E.g. Lower an interleaved load:
%wide.vec = load <8 x i32>, <8 x i32>* %ptr
%v0 = shuffle %wide.vec, undef, <0, 2, 4, 6>
%v1 = shuffle %wide.vec, undef, <1, 3, 5, 7>
into:
%ld2 = { <4 x i32>, <4 x i32> } call llvm.aarch64.neon.ld2(%ptr)
%vec0 = extractelement { <4 x i32>, <4 x i32> } %ld2, i32 0
%vec1 = extractelement { <4 x i32>, <4 x i32> } %ld2, i32 1
E.g. Lower an interleaved store:
%i.vec = shuffle <8 x i32> %v0, <8 x i32> %v1, <0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11>
store <12 x i32> %i.vec, <12 x i32>* %ptr
into:
%sub.v0 = shuffle <8 x i32> %v0, <8 x i32> v1, <0, 1, 2, 3>
%sub.v1 = shuffle <8 x i32> %v0, <8 x i32> v1, <4, 5, 6, 7>
%sub.v2 = shuffle <8 x i32> %v0, <8 x i32> v1, <8, 9, 10, 11>
call void llvm.aarch64.neon.st3(%sub.v0, %sub.v1, %sub.v2, %ptr)
Differential Revision: http://reviews.llvm.org/D10533
llvm-svn: 240754
Jason Molenda [Fri, 26 Jun 2015 02:16:48 +0000 (02:16 +0000)]
When the user specifies a corefile that is not readable,
give them a meaningful error message instead of
"Unable to find process plug-in for core file ...".
<rdar://problem/
21255759>
<rdar://problem/
21091522>
http://blog.ignoranthack.me/?p=204
llvm-svn: 240753
Manuel Klimek [Fri, 26 Jun 2015 02:15:04 +0000 (02:15 +0000)]
Fix crash-on-invalid bug in template instantiation.
Get rid of code-path that (according to Richard Smith) is not needed but
leads to a crasher bug when assuming a template has been fully
instantiated and thus has a definition.
llvm-svn: 240752
Hao Liu [Fri, 26 Jun 2015 02:10:27 +0000 (02:10 +0000)]
[InterleavedAccess] Add a pass InterleavedAccess to identify interleaved memory accesses and transform into target specific intrinsics.
E.g. An interleaved load (Factor = 2):
%wide.vec = load <8 x i32>, <8 x i32>* %ptr
%v0 = shuffle <8 x i32> %wide.vec, <8 x i32> undef, <0, 2, 4, 6>
%v1 = shuffle <8 x i32> %wide.vec, <8 x i32> undef, <1, 3, 5, 7>
It can be transformed into a ld2 intrinsic in AArch64 backend or a vld2 intrinsic in ARM backend.
E.g. An interleaved store (Factor = 3):
%i.vec = shuffle <8 x i32> %v0, <8 x i32> %v1, <0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11>
store <12 x i32> %i.vec, <12 x i32>* %ptr
It can be transformed into a st3 intrinsic in AArch64 backend or a vst3 intrinsic in ARM backend.
Differential Revision: http://reviews.llvm.org/D10533
llvm-svn: 240751
Duncan P. N. Exon Smith [Fri, 26 Jun 2015 00:53:44 +0000 (00:53 +0000)]
AsmPrinter: More explicitly scope iterator for MSVC
r240748 seems to be on the right path. Be more explicit.
http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/1961/
llvm-svn: 240750
Rui Ueyama [Fri, 26 Jun 2015 00:42:21 +0000 (00:42 +0000)]
COFF: Don't read non-x64 object files.
Currently the new LLD supports only x86-64.
llvm-svn: 240749
Duncan P. N. Exon Smith [Fri, 26 Jun 2015 00:41:53 +0000 (00:41 +0000)]
AsmPrinter: Explicitly scope iterator for MSVC
Try to placate bots by explicitly scoping a conversion constructor from
`iterator` to `const_iterator`.
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/5931/
llvm-svn: 240748
Paul Robinson [Fri, 26 Jun 2015 00:36:50 +0000 (00:36 +0000)]
FileCheck-ize test and make sure more things don't happen.
Attribute 'nodebug' means no llvm.dbg.* intrinsics, no !dbg
annotations, and no DISubprogram for the function.
Differential Revision: http://reviews.llvm.org/D10747
llvm-svn: 240747
Matthias Braun [Fri, 26 Jun 2015 00:26:49 +0000 (00:26 +0000)]
Revert "X86: Reject register operands with obvious type mismatches."
Revert until http://llvm.org/PR23955 is investigated.
This reverts commit r239309.
llvm-svn: 240746
Matthias Braun [Fri, 26 Jun 2015 00:26:46 +0000 (00:26 +0000)]
Fix mismatched architectures in test
llvm-svn: 240745
Matthias Braun [Fri, 26 Jun 2015 00:26:44 +0000 (00:26 +0000)]
aad/fix labels in test/CodeGen/X86/StackColoring.ll
llvm-svn: 240744
Nico Weber [Fri, 26 Jun 2015 00:19:32 +0000 (00:19 +0000)]
Add new file from r240741 to CMakeLists.txt.
llvm-svn: 240743
Davide Italiano [Fri, 26 Jun 2015 00:18:35 +0000 (00:18 +0000)]
[Sema] Commit a better fix for r240242
Skip calls to HasTrivialDestructorBody() in the case where the
destructor is never invoked. Alternatively, Richard proposed to change
Sema to declare a trivial destructor for anonymous union member, which
seems too wasteful.
Differential Revision: http://reviews.llvm.org/D10508
llvm-svn: 240742
Nico Weber [Fri, 26 Jun 2015 00:13:18 +0000 (00:13 +0000)]
Add an inttypes.h wrapper that fixes up some macros in Microsoft mode.
Before MSVS2015, MSVS's headers disagree about int32_t and PRIx32 and so on.
Provide a wrapper header to fix this, so that -Wformat can still be used.
Fixes PR23412.
llvm-svn: 240741
Meador Inge [Fri, 26 Jun 2015 00:09:55 +0000 (00:09 +0000)]
[Sema] Maintain ellipsis location when transforming lambda captures
This patch fixes a crash caused by the following case:
template<typename T>
auto f(T x) {
auto g = [](auto ... args) {
auto h = [args...]() -> int {
return 0;
};
return h;
};
return g;
}
auto x = f(0)();
When the templated function 'f' is instantiated and the inner-most
lambda is transformed the ellipsis location on the captured variable
is lost. Then the lambda returned by 'f' is instantiated and the
tree transformer chokes on the invalid ellipsis location. The
problem is fixed by making a minor change to properly track the
ellipsis location.
This fixes PR23716.
Differential Revision: http://reviews.llvm.org/D10590
llvm-svn: 240740
Han Ming Ong [Fri, 26 Jun 2015 00:04:51 +0000 (00:04 +0000)]
Use the right ifdef macro, reviewed by Jason
llvm-svn: 240739
Alexey Samsonov [Fri, 26 Jun 2015 00:00:47 +0000 (00:00 +0000)]
[ASan] Use llvm::getDISubprogram() to get function entry debug location.
It can be more robust than copying debug info from first non-alloca
instruction in the entry basic block. We use the same strategy in
coverage instrumentation.
llvm-svn: 240738
Jason Molenda [Thu, 25 Jun 2015 23:58:25 +0000 (23:58 +0000)]
Re-enable 'process save-core' for arm64 targets.
Whatever problem I saw that caused me to disable this
initially is not a problem today.
<rdar://problem/
21173317>
<rdar://problem/
20266253>
llvm-svn: 240737
Duncan P. N. Exon Smith [Thu, 25 Jun 2015 23:52:10 +0000 (23:52 +0000)]
AsmPrinter: Use an intrusively linked list for DIE::Children
Replace the `std::vector<>` for `DIE::Children` with an intrusively
linked list. This is a strict memory improvement: it requires no
auxiliary storage, and reduces `sizeof(DIE)` by one pointer. It also
factors out the DIE-related malloc traffic.
This drops llc memory usage from 735 MB down to 718 MB, or ~2.3%.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
llvm-svn: 240736
David Majnemer [Thu, 25 Jun 2015 23:50:40 +0000 (23:50 +0000)]
[CodeGen] Restrict isTriviallyRecursive to predefined lib functions forwarding to lib functions
isTriviallyRecursive is only supposed to guard functions part of the
implementation.
This fixes PR23953.
llvm-svn: 240735
Kaelyn Takata [Thu, 25 Jun 2015 23:47:39 +0000 (23:47 +0000)]
Fix a typo correction crash when resolving ambiguous corrections.
In certain cases, the tree transform would introduce new TypoExprs while
trying one of the corrections, invalidating the unique_ptr in the state
reference, and also causing a TypoExpr to exist that will never be
corrected since it doesn't exist in the final corrected expression. The
simple solution to both problems is to temporarily disable typo
correction while handling potentially ambiguous typo corrections.
llvm-svn: 240734
Duncan P. N. Exon Smith [Thu, 25 Jun 2015 23:46:41 +0000 (23:46 +0000)]
AsmPrinter: Convert DIE::Values to a linked list
Change `DIE::Values` to a singly linked list, where each node is
allocated on a `BumpPtrAllocator`. In order to support `push_back()`,
the list is circular, and points at the tail element instead of the
head. I abstracted the core list logic out to `IntrusiveBackList` so
that it can be reused for `DIE::Children`, which also cares about
`push_back()`.
This drops llc memory usage from 799 MB down to 735 MB, about 8%.
(I'm looking at `llc` memory usage on `verify-uselistorder.lto.opt.bc`;
see r236629 for details.)
llvm-svn: 240733
Michael J. Spencer [Thu, 25 Jun 2015 23:41:55 +0000 (23:41 +0000)]
llvm api change.
llvm-svn: 240732
Michael J. Spencer [Thu, 25 Jun 2015 23:41:23 +0000 (23:41 +0000)]
[ELF] Move ELF{32,64}{L,B}E typedefs to llvm.
llvm-svn: 240731
Michael J. Spencer [Thu, 25 Jun 2015 23:40:41 +0000 (23:40 +0000)]
[ELF] Add some accessors for lld.
llvm-svn: 240730
Alexey Samsonov [Thu, 25 Jun 2015 23:40:15 +0000 (23:40 +0000)]
Make llvm-dwarfdump exit with non-zero exit code if error was occured.
llvm-svn: 240729
Han Ming Ong [Thu, 25 Jun 2015 23:39:56 +0000 (23:39 +0000)]
rdar://problem/
21469556
Make sure that the memory report is correct for 64-bit devices.
llvm-svn: 240728
NAKAMURA Takumi [Thu, 25 Jun 2015 23:38:44 +0000 (23:38 +0000)]
PPCISelLowering.cpp: Appease PR23956. [-Wdocumentation]
llvm-svn: 240727
Adrian Prantl [Thu, 25 Jun 2015 23:38:22 +0000 (23:38 +0000)]
Split test up into two target-spcific directories.
llvm-svn: 240726
Anna Zaks [Thu, 25 Jun 2015 23:36:44 +0000 (23:36 +0000)]
[docs] Several updates to the Address Sanitizer webpage.
- Added the description of the interceptor suppression.
- Re-organized a bit: grouped a few things under the Issue Suppression
section, grouped IOC and leaks under a section, placed symbolication
info into Symbolizing the Reports section..
- In supported platforms: "MacOS" -> "OS X"; added "iOS Simulator"
- Added a paragraph to the Usage section describing when DYLD_INSERT_LIBRARIES
might need to be used.
- "attribute((no_sanitize_address))" -> "__attribute__((no_sanitize("address")))"
- Updated Leak Sanitizer page with most up to date info.
....
http://reviews.llvm.org/D10559
llvm-svn: 240725
Anna Zaks [Thu, 25 Jun 2015 23:36:21 +0000 (23:36 +0000)]
[asan] Do not unset DYLD_ROOT_PATH before calling atos on Darwin
We were unsetting DYLD_ROOT_PATH before calling atos on Darwin in order to
address it not working for symbolicating 32 bit binaries. (atos essentiall
tries to respawn as a 32 bit binary and it's disallowed to respawn if
DYLD_ROOT_PATH is set ... ) However, processes rely on having DYLD_ROOT_PATH
set under certain conditions, so this is not the right fix. In particular, this
always crashes when running ASanified process under the debugger in Xcode with
iOS simulator, which is a very important workflow for us to support.
This patch reverts the unsetting of the DYLD_ROOT_PATH. The correct fix to the
misbehavior on 32-bit binaries should happen inside atos.
http://reviews.llvm.org/D10722
llvm-svn: 240724
Anna Zaks [Thu, 25 Jun 2015 23:35:48 +0000 (23:35 +0000)]
[asan] Do not instrument special purpose LLVM sections.
Do not instrument globals that are placed in sections containing "__llvm"
in their name.
This fixes a bug in ASan / PGO interoperability. ASan interferes with LLVM's
PGO, which places its globals into a special section, which is memcpy-ed by
the linker as a whole. When those goals are instrumented, ASan's memcpy wrapper
reports an issue.
http://reviews.llvm.org/D10541
llvm-svn: 240723
Anna Zaks [Thu, 25 Jun 2015 23:35:45 +0000 (23:35 +0000)]
[asan] Don't run stack malloc on functions containing inline assembly.
It makes LLVM run out of registers even on 64-bit platforms. For example, the
following test case fails on darwin.
clang -cc1 -O0 -triple x86_64-apple-macosx10.10.0 -emit-obj -fsanitize=address -mstackrealign -o ~/tmp/ex.o -x c ex.c
error: inline assembly requires more registers than available
void TestInlineAssembly(const unsigned char *S, unsigned int pS, unsigned char *D, unsigned int pD, unsigned int h) {
unsigned int sr = 4, pDiffD = pD - 5;
unsigned int pDiffS = (pS << 1) - 5;
char flagSA = ((pS & 15) == 0),
flagDA = ((pD & 15) == 0);
asm volatile (
"mov %0, %%"PTR_REG("si")"\n"
"mov %2, %%"PTR_REG("cx")"\n"
"mov %1, %%"PTR_REG("di")"\n"
"mov %8, %%"PTR_REG("ax")"\n"
:
: "m" (S), "m" (D), "m" (pS), "m" (pDiffS), "m" (pDiffD), "m" (sr), "m" (flagSA), "m" (flagDA), "m" (h)
: "%"PTR_REG("si"), "%"PTR_REG("di"), "%"PTR_REG("ax"), "%"PTR_REG("cx"), "%"PTR_REG("dx"), "memory"
);
}
http://reviews.llvm.org/D10719
llvm-svn: 240722
Rui Ueyama [Thu, 25 Jun 2015 23:26:58 +0000 (23:26 +0000)]
COFF: Rename /opt:icf -> /opt:lldicf.
ICF implemented in LLD is so experimental that we don't want to
enable that even if /opt:icf option is passed. I'll rename it back
once the feature is complete.
llvm-svn: 240721
Sean Silva [Thu, 25 Jun 2015 23:22:11 +0000 (23:22 +0000)]
Remove `requires` for x86 CPU features.
Ever since the target attributes change, we don't need to guard these
headers with `requires`. Actually it's a bit worse, because if we do
then they are included textually under the covers, causing declarations
to appear in submodules they aren't supposed to be in.
llvm-svn: 240720
Rui Ueyama [Thu, 25 Jun 2015 23:22:00 +0000 (23:22 +0000)]
COFF: Better error message for duplicate symbols.
Now the symbol table prints out not only symbol names but
also file names for duplicate symbols.
llvm-svn: 240719
Jonathan Roelofs [Thu, 25 Jun 2015 23:21:11 +0000 (23:21 +0000)]
Fix the test added in r240710.
llvm-svn: 240718
Adrian Prantl [Thu, 25 Jun 2015 23:19:19 +0000 (23:19 +0000)]
Debug Info: Add basic test coverage for the DWARF encoding of bitfields.
While looking at a couple of bugs in the debug info output for bitfields
I noticed that there wasn't a single regression test to test my changes
against, so here's a start.
llvm-svn: 240717
Alexey Samsonov [Thu, 25 Jun 2015 23:14:32 +0000 (23:14 +0000)]
[CFI] Diagnose when we CFI in diagnostic mode is unavailable on a toolchain.
Summary:
Namely, we must have proper C++ABI support in UBSan runtime. We don't
have a good way to check for that, so just assume that C++ABI support is
there whenever -fsanitize=vptr is supported (i.e. only on handful of
platforms).
Exact diagnostic is also tricky. It's not "cfi" that is unsupported,
just the diagnostic mode. So, I suggest to report that
"-fno-sanitize-trap=cfi-foobar" is incompatible with a given target
toolchain.
Test Plan: regression test suite
Reviewers: pcc
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10751
llvm-svn: 240716
Diego Novillo [Thu, 25 Jun 2015 22:56:00 +0000 (22:56 +0000)]
Display profile file name when emitting a file not found diagnostic.
When a profile file cannot be opened, we used to display just the error
message but not the name of the profile the compiler was trying to open.
This will become useful in the next set of patches that introduce
GCC-compatible flags to specify profiles.
llvm-svn: 240715
Greg Clayton [Thu, 25 Jun 2015 22:47:02 +0000 (22:47 +0000)]
Xcode project cleanups.
- Don't have any header files claim to be part of the lldb-core target. If they are part of the lldb-core target then any file can just #include the header file name without the prefix (#include "Foo.h") when the cmake/make/other builds would require a full path (#include "lldb/Core/Foo.h"). This will help make sure the builds succeed on all platforms when changes are made on MacOSX.
- Add the Hexagon dynamic loader to the DynamicLoader plug-in folder so it gets compiled in MacOSX. There was a recent build bot failure that wasn't caught due to this code not being compile in the MacOSX build
llvm-svn: 240714
Jason Molenda [Thu, 25 Jun 2015 22:37:57 +0000 (22:37 +0000)]
Mark armv7em and armv7m as compatible architectures.
<rdar://problem/
21244671>
llvm-svn: 240713
Greg Clayton [Thu, 25 Jun 2015 22:34:08 +0000 (22:34 +0000)]
Commit file that was missing 240466.
<rdar://problem/
21494354>
llvm-svn: 240712
Greg Clayton [Thu, 25 Jun 2015 22:20:02 +0000 (22:20 +0000)]
Unbreak the build.
llvm-svn: 240711
Chris Bieneman [Thu, 25 Jun 2015 22:15:39 +0000 (22:15 +0000)]
This should actually fix the broken bots.
llvm-svn: 240710
Matt Arsenault [Thu, 25 Jun 2015 22:15:05 +0000 (22:15 +0000)]
DAGCombiner: Use pop_back_val()
llvm-svn: 240709
Rafael Espindola [Thu, 25 Jun 2015 22:10:04 +0000 (22:10 +0000)]
Add an ELFSymbolRef type.
This allows user code to say Sym.getSize() instead of having to manually fetch
the object.
llvm-svn: 240708
Meador Inge [Thu, 25 Jun 2015 22:06:40 +0000 (22:06 +0000)]
[Parse] Allow 'constexpr' in condition declarations
This patch implements the functionality specified by DR948.
The changes are two fold. First, the parser was modified
to allow 'constexpr's to appear in condition declarations
(which was a hard error before). Second, Sema was modified
to cleanup maybe odr-used declarations by way of a call to
'ActOnFinishFullExpr'. As 'constexpr's were not allowed in
condition declarations before the cleanup wasn't necessary
(such declarations were always odr-used).
This fixes PR22491.
Differential Revision: http://reviews.llvm.org/D8978
llvm-svn: 240707
Rui Ueyama [Thu, 25 Jun 2015 22:00:42 +0000 (22:00 +0000)]
COFF: Merge DefinedRegular and DefinedCOMDAT.
I split them in r240319 because I thought they are different enough
that we should treat them as different types. It turned out that
that was not a good idea. They are so similar that we ended up having
many duplicate code.
llvm-svn: 240706
Frederic Riss [Thu, 25 Jun 2015 21:57:33 +0000 (21:57 +0000)]
IAS: Use the root macro instanciation for location
r224810 fixed the handling of macro debug locations in AsmParser. This patch
fixes the logic to actually do what was intended: it uses the first macro of
the macro stack instead of the last one. The updated testcase shows that the
current scheme doesn't work when macro instanciations are nested and multiple
files are used.
Reviewers: compnerd
Differential Revision: http://reviews.llvm.org/D10463
llvm-svn: 240705
Michael J. Spencer [Thu, 25 Jun 2015 21:47:32 +0000 (21:47 +0000)]
[Object][ELF] Add support for dumping dynamic relocations when sections are stripped.
llvm-svn: 240703
Greg Clayton [Thu, 25 Jun 2015 21:46:34 +0000 (21:46 +0000)]
Resubmitting 240466 after fixing the linux test suite failures.
A few extras were fixed
- Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected.
- Since some places want to access the address as a reference, I added a few new functions to symbol:
Address &Symbol::GetAddressRef();
const Address &Symbol::GetAddressRef() const;
Linux test suite passes just fine now.
<rdar://problem/
21494354>
llvm-svn: 240702
Duncan P. N. Exon Smith [Thu, 25 Jun 2015 21:42:46 +0000 (21:42 +0000)]
dsymutil: Split out patchStmtList(), NFC
Split out code to patch up the `DW_AT_stmt_list` for the cloned DIE, and
reorganize it so that it doesn't depend on `DIE::values_begin()` and
`DIE::values_end()` (which I'm trying to kill off).
David Blaikie and I talked about adding a range-algorithm version of
`std::find_if()`, but the assertion *still* required getting at the end
iterator. IMO, a separate helper function with an early return is
easier to reason about here.
A follow-up commit that removes `DIE::setValue()` and mutates the
`DIEValue` directly is coming shortly.
llvm-svn: 240701
Richard Smith [Thu, 25 Jun 2015 21:42:33 +0000 (21:42 +0000)]
[modules] Properly merge visibility of class definitions that got merged while
parsing then merged again when the module was loaded.
llvm-svn: 240700
Sanjay Patel [Thu, 25 Jun 2015 21:11:08 +0000 (21:11 +0000)]
fix typos; NFC
llvm-svn: 240699
Siva Chandra [Thu, 25 Jun 2015 21:08:30 +0000 (21:08 +0000)]
[LLDBSwigPythonCallTypeScript] Remove redundant call to type summary func.
Reviewers: clayborg, granata.enrico
Reviewed By: clayborg, granata.enrico
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10625
llvm-svn: 240698
Rui Ueyama [Thu, 25 Jun 2015 21:06:00 +0000 (21:06 +0000)]
COFF: Fix lexer for the module-definition file.
Previously it would hang if there's a stray punctuation (e.g. ?).
llvm-svn: 240697
Peter Collingbourne [Thu, 25 Jun 2015 21:02:17 +0000 (21:02 +0000)]
docs: Fix bad link in SafeStack.rst.
llvm-svn: 240696
Rafael Espindola [Thu, 25 Jun 2015 21:00:51 +0000 (21:00 +0000)]
llvm-nm: Don't print mapping symbols.
This matches the behavior of gnu nm. Fixes pr23930.
llvm-svn: 240695
Pete Cooper [Thu, 25 Jun 2015 20:51:38 +0000 (20:51 +0000)]
Use foreach loop over constant operands. NFC.
A number of places had explicit loops over Constant::operands().
Just use foreach loops where possible.
llvm-svn: 240694
Chris Bieneman [Thu, 25 Jun 2015 20:50:46 +0000 (20:50 +0000)]
Speculative fix for the broken bots.
llvm-svn: 240693
Jay Foad [Thu, 25 Jun 2015 20:50:18 +0000 (20:50 +0000)]
[msan] Teach sanitizers about the PPC64 ptrace syscall
Summary:
This fixes test/msan/Linux/syscalls.cc, and should also fix the ppc64
sanitizer buildbots which are currently failing in
"make check-sanitizer".
Reviewers: samsonov, wschmidt, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10734
llvm-svn: 240692