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
Richard Smith [Thu, 25 Jun 2015 20:48:44 +0000 (20:48 +0000)]
[modules] Fix findDirectiveAtLoc to not call a member function on a null pointer.
This is exercised by existing tests, and fixes a failure with -fsanitize=null.
No observable change otherwise; the code happened to do the right thing in
practice under recent versions of Clang and GCC because
MacroDirective::getDefinition happens to check whether this == null.
llvm-svn: 240691
Jay Foad [Thu, 25 Jun 2015 20:47:59 +0000 (20:47 +0000)]
[msan] Fix SetShadow for mappings at the end of the application address space
Summary:
On PPC64 if you disable ASLR (or run under gdb) you're likely to see
mmap returning a mapping right at the end of the application address
space region. This caused SetShadow to call MEM_TO_SHADOW() on the
last+1 address in the region, which seems wrong to me; how can
MEM_TO_SHADOW() distinguish this from the first address in the following
region?
Fixed by only calling MEM_TO_SHADOW() once, on the start address.
Reviewers: samsonov, wschmidt, eugenis
Reviewed By: eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10735
llvm-svn: 240690
Michael Kruse [Thu, 25 Jun 2015 20:47:35 +0000 (20:47 +0000)]
Enable ISL's small integer optimization
Summary:
With small integer optimization (short: sio) enabled, ISL uses 32 bit
integers for its arithmetic and only falls back to a big integer library
(in the case of Polly: IMath) if an operation's result is too large.
This gives a massive performance boost for most application using ISL.
For instance, experiments with ppcg (polyhedral source-to-source
compiler) show speed-ups of 5.8 (compared to plain IMath), respectively
2.7 (compared to GMP).
In Polly, a smaller fraction of the total compile time is taken by ISL,
but the speed-ups are still very significant. The buildbots measure
compilation speed-up up to 1.8 (oourafft, floyd-warshall, symm). All
Polybench benchmarks compile in at least 9% less time, and about 20%
less on average.
Detailed Polybench compile time results (median of 10):
correlation -25.51%
covariance -24.82%
2mm -26.64%
3mm -28.69%
atax -13.70%
bicg -10.78%
cholesky -40.67%
doitgen -11.60%
gemm -11.54%
gemver -10.63%
gesummv -11.54%
mvt -9.43%
symm -41.25%
syr2k -14.71%
syrk -14.52%
trisolv -17.65%
trmm -9.78%
durbin -19.32%
dynprog -9.09%
gramschmidt -15.38%
lu -21.77%
floyd-warshall -42.71%
reg_detect -41.17%
adi -36.69%
fdtd-2d -32.61%
fdtd-apml -21.90%
jacobi-1d-imper -9.41%
jacobi-2d-imper -27.65%
seidel-2d -31.00%
Reviewers: grosser
Reviewed By: grosser
Subscribers: Meinersbur, llvm-commits, pollydev
Projects: #polly
Differential Revision: http://reviews.llvm.org/D10506
llvm-svn: 240689
Alexey Samsonov [Thu, 25 Jun 2015 20:43:35 +0000 (20:43 +0000)]
[Sanitizer] Set minimum supported Mac OS X version to 10.9, if it wasn't specified explicitly.
-fsanitize=vptr is a UBSan feature that doesn't work on older Mac OS X
versions, and we don't want to penalize users that use modern OS with
default configuration. Those who want to target older OS versions, can
specify that versions explicitly.
llvm-svn: 240688
Dmitry Vyukov [Thu, 25 Jun 2015 20:32:04 +0000 (20:32 +0000)]
tsan: fix handling of dup2
Previously tsan modelled dup2(oldfd, newfd) as write on newfd.
We hit several cases where the write lead to false positives:
1. Some software dups a closed pipe in place of a socket before closing
the socket (to prevent races actually).
2. Some daemons dup /dev/null in place of stdin/stdout.
On the other hand we have not seen cases when write here catches real bugs.
So model dup2 as read on newfd instead.
llvm-svn: 240687
Chris Bieneman [Thu, 25 Jun 2015 20:25:43 +0000 (20:25 +0000)]
Add -miphonesimulator-version-min as alias to -ios-simulator-version-min.
Summary:
For better or worse the OS X command line tools refer to the iOS simulator as iphonesimucator. We should provide an alias flag -miphonesimulator-version-min that matches a consistent pattern with the other tools.
This is in the interest of making it easier for people to write platform-agnostic darwin build scripts.
Reviewers: bob.wilson, bogner
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10743
llvm-svn: 240686
Alexey Samsonov [Thu, 25 Jun 2015 20:21:59 +0000 (20:21 +0000)]
[clang-fuzzer] Update clang-fuzzer to API change in r240225.
llvm-svn: 240685
Rafael Espindola [Thu, 25 Jun 2015 20:20:19 +0000 (20:20 +0000)]
We don't need the targets to read objects.
llvm-svn: 240684
Jingyue Wu [Thu, 25 Jun 2015 20:14:47 +0000 (20:14 +0000)]
[InstCombine] call SimplifyICmpInst with correct context
Summary:
Fixes PR23809. Without passing the context to SimplifyICmpInst, we would
use the assume to prove that the condition feeding the assume is
trivially true (see isValidAssumeForContext in ValueTracking.cpp),
causing the removal of the assume which may be useful for later
optimizations.
Test Plan: pr23800.ll
Reviewers: hfinkel, majnemer
Reviewed By: hfinkel
Subscribers: henryhu, llvm-commits, wengxt, broune, meheff, eliben
Differential Revision: http://reviews.llvm.org/D10695
llvm-svn: 240683
Rui Ueyama [Thu, 25 Jun 2015 20:12:15 +0000 (20:12 +0000)]
COFF: Remove dead code.
llvm-svn: 240682
Rafael Espindola [Thu, 25 Jun 2015 20:10:45 +0000 (20:10 +0000)]
Diagnose undefined temporary symbols.
We already disallowed
.global .Lfoo
so this is reasonable.
This is a small cherry pick from r240130.
llvm-svn: 240681
Douglas Katzman [Thu, 25 Jun 2015 19:37:41 +0000 (19:37 +0000)]
Rename local variable CCCPrintActions -> CCCPrintPhases.
To match the '-ccc-print-phases' command-line flag.
Also make two more 'for' loops range-based. NFC
llvm-svn: 240680
Paul Robinson [Thu, 25 Jun 2015 19:37:13 +0000 (19:37 +0000)]
Make this test verify .debug_pubnames is actually missing.
It was matching at EOF regardless of whether the section was present.
llvm-svn: 240679
Yaron Keren [Thu, 25 Jun 2015 19:28:24 +0000 (19:28 +0000)]
Rangify for loop in Inliner.cpp. NFC.
llvm-svn: 240678
Enrico Granata [Thu, 25 Jun 2015 19:17:04 +0000 (19:17 +0000)]
Fix a bug where we were trying to reconstruct ivars of ObjC types from the runtime in "expression parser mode"
The expression parser mode allows UnknownAnyTy to make it all the way through, but that is bad for ivars because it means type layout fails horribly (as in, clang crashes)
This patch fixes the issue by using the "variables view mode", which masks UnknownAnyTy as empty-type, and pointer-to UnknownAnyTy as void*
This, in turn, allows LLDB to properly reconstruct ivars of IMP type in ObjC type - as per accompanying test case
Fixes rdar://
21471326
llvm-svn: 240677
Dawn Perchik [Thu, 25 Jun 2015 19:14:34 +0000 (19:14 +0000)]
Add const qualifier to Mangled::GuessLanguage
llvm-svn: 240676
Rui Ueyama [Thu, 25 Jun 2015 19:10:58 +0000 (19:10 +0000)]
COFF: Devirtualize mark(), markLive() and isCOMDAT().
Only SectionChunk can be dead-stripped. Previously,
all types of chunks implemented these functions,
but their functions were blank.
Likewise, only DefinedRegular and DefinedCOMDAT symbols
can be dead-stripped. markLive() function was implemented
for other symbol types, but they were blank.
I started thinking that the change I made in r240319 was
a mistake. I separated DefinedCOMDAT from DefinedRegular
because I thought that would make the code cleaner, but now
we want to handle them as the same type here. Maybe we
should roll it back.
This change should improve readability a bit as this removes
some dubious uses of reinterpret_cast. Previously, we
assumed that all COMDAT chunks are actually SectionChunks,
which was not very obvious.
llvm-svn: 240675