Michael Kuperstein [Mon, 10 Nov 2014 21:07:41 +0000 (21:07 +0000)]
Reverting r221626 due to a too-strict test.
llvm-svn: 221629
Juergen Ributzka [Mon, 10 Nov 2014 21:05:31 +0000 (21:05 +0000)]
[AArch64][FastISel] Fix kill flags for integer extends.
In the case we optimize an integer extend away and replace it directly with the
source register, we also have to clear all kill flags at all its uses.
This is necessary, because the orignal IR instruction might be trivially dead,
but we replaced it with a nop at MI level.
llvm-svn: 221628
Juergen Ributzka [Mon, 10 Nov 2014 21:05:27 +0000 (21:05 +0000)]
[SwitchLowering] Fix the "fixPhis" function.
Switch statements may have more than one incoming edge into the same BB if they
all have the same value. When the switch statement is converted these incoming
edges are now coming from multiple BBs. Updating all incoming values to be from
a single BB is incorrect and would generate invalid LLVM IR.
The fix is to only update the first occurrence of an incoming value. Switch
lowering will perform subsequent calls to this helper function for each incoming
edge with a new basic block - updating all edges in the process.
This fixes rdar://problem/
18916275.
llvm-svn: 221627
Michael Kuperstein [Mon, 10 Nov 2014 20:40:21 +0000 (20:40 +0000)]
[X86] Fix pattern match for 32-to-64-bit zext in the presence of AssertSext
This fixes an issue with matching trunc -> assertsext -> zext on x86-64, which would not zero the high 32-bits.
See PR20494 for details.
Differential Revision: http://reviews.llvm.org/D6128
llvm-svn: 221626
Bob Wilson [Mon, 10 Nov 2014 20:01:19 +0000 (20:01 +0000)]
Remove change to set SDKROOT when building compiler-rt on Darwin.
This reverts the runtime library portion of r194168. As of r221621,
the libclang_rt libraries for Darwin build with explicit SDK options
so there is no need to set SDKROOT here.
llvm-svn: 221625
Enrico Granata [Mon, 10 Nov 2014 19:51:57 +0000 (19:51 +0000)]
Fix a problem reported by Ed Maste where the test harness was failing to call bound methods as cleanup hooks
llvm-svn: 221624
Richard Smith [Mon, 10 Nov 2014 19:44:15 +0000 (19:44 +0000)]
Update fold-expression mangling to match cxx-abi-dev discussion.
llvm-svn: 221623
Bob Wilson [Mon, 10 Nov 2014 19:38:18 +0000 (19:38 +0000)]
Clean up indentation after previous change.
llvm-svn: 221622
Bob Wilson [Mon, 10 Nov 2014 19:38:15 +0000 (19:38 +0000)]
Build Darwin libclang_rt libraries against real SDKs.
The minimal fake SDK was very useful in allowing us to build for all
Darwin platforms without needing access to the real SDKs, but it did
not support building any of the sanitizer runtimes. It's important to
fix that. As a consequence, if you don't have the iOS SDKs installed,
we will now skip building the iOS-specific libclang_rt libraries.
rdar://problem/
18825276
llvm-svn: 221621
Rafael Espindola [Mon, 10 Nov 2014 18:41:59 +0000 (18:41 +0000)]
Copy externally_initialized in GlobalVariable::copyAttributesFrom.
Patch by Kevin Frei!
llvm-svn: 221620
Jingyue Wu [Mon, 10 Nov 2014 18:38:25 +0000 (18:38 +0000)]
[NVPTX] Add an NVPTX-specific TargetTransformInfo
Summary:
It currently only implements hasBranchDivergence, and will be extended
in later diffs.
Split from D6188.
Test Plan: make check-all
Reviewers: jholewinski
Reviewed By: jholewinski
Subscribers: llvm-commits, meheff, eliben, jholewinski
Differential Revision: http://reviews.llvm.org/D6195
llvm-svn: 221619
Rafael Espindola [Mon, 10 Nov 2014 18:11:10 +0000 (18:11 +0000)]
Misc style fixes. NFC.
This fixes a few cases of:
* Wrong variable name style.
* Lines longer than 80 columns.
* Repeated names in comments.
* clang-format of the above.
This make the next patch a lot easier to read.
llvm-svn: 221615
Bob Wilson [Mon, 10 Nov 2014 17:46:55 +0000 (17:46 +0000)]
Only build iOS runtime libraries when the iOS SDKs are available.
This was already set up for the iOS simulator ASan dylib simulator,
and this change extends that to the other iOS runtime libraries.
This is in preparation for building all those iOS libraries against
the real SDKs instead of the fake SDKs in compiler-rt.
llvm-svn: 221614
Vasileios Kalintiris [Mon, 10 Nov 2014 17:37:53 +0000 (17:37 +0000)]
Fix extra semicolon warning. NFC.
llvm-svn: 221613
Zoran Jovanovic [Mon, 10 Nov 2014 17:27:56 +0000 (17:27 +0000)]
[mips][microMIPS] Fix issue with delay slot filler and microMIPS
Differential Revision: http://reviews.llvm.org/D6193
llvm-svn: 221612
Ed Maste [Mon, 10 Nov 2014 17:22:47 +0000 (17:22 +0000)]
Fix new noreturn test on !darwin platforms
r221575 introduced a NoreturnUnwind test that did not skip the dsym
test on non-darwin platforms, and had the @dwarf_test case as an exact
copy of the dsym case (including the test name, test_with_dsym).
llvm-svn: 221611
Bob Wilson [Mon, 10 Nov 2014 17:05:21 +0000 (17:05 +0000)]
Do not build a separate x86_64h Haswell slice for the iOS simulator.
r199996 added new x86_64h slices for all the Darwin compiler_rt libraries
that had an x86_64 slice, but that is overkill for the iOS Simulator
platform where the x86_64h slice is never used.
llvm-svn: 221610
Daniel Jasper [Mon, 10 Nov 2014 16:57:30 +0000 (16:57 +0000)]
clang-format: Fix pointer formatting.
Before:
void f(Bar* a = nullptr, Bar * b);
After:
void f(Bar* a = nullptr, Bar* b);
llvm-svn: 221609
Rafael Espindola [Mon, 10 Nov 2014 16:31:06 +0000 (16:31 +0000)]
Fix variable names and comment style. NFC.
llvm-svn: 221608
Nico Weber [Mon, 10 Nov 2014 16:30:02 +0000 (16:30 +0000)]
clang-format: [Java] Never treat @interface as annotation.
'@' followed by any keyword can't be an annotation, but @interface is currently
the only combination of '@' and a keyword that's allowed, so limit it to this
case. `@interface Foo` without a leading `public` was misformatted prior to
this patch.
llvm-svn: 221607
Nico Weber [Mon, 10 Nov 2014 16:14:54 +0000 (16:14 +0000)]
clang-format: Document that --assume-filename affects the language.
llvm-svn: 221606
Benjamin Kramer [Mon, 10 Nov 2014 16:07:58 +0000 (16:07 +0000)]
Remove unused diagnostic.
llvm-svn: 221605
Daniel Sanders [Mon, 10 Nov 2014 15:57:53 +0000 (15:57 +0000)]
[mips] Fix sret arguments for N32/N64 which were accidentally broken in r221534.
llvm-svn: 221604
Simon Atanasyan [Mon, 10 Nov 2014 15:50:22 +0000 (15:50 +0000)]
[Mips] Replace the redundant condition by assert call
No functional changes.
llvm-svn: 221603
Simon Atanasyan [Mon, 10 Nov 2014 15:50:01 +0000 (15:50 +0000)]
[Mips] Do not read addends for relocations which do not use them
No functional changes.
llvm-svn: 221602
Marshall Clow [Mon, 10 Nov 2014 15:43:20 +0000 (15:43 +0000)]
Update status pages for C++1z
llvm-svn: 221601
Alexander Kornienko [Mon, 10 Nov 2014 15:42:31 +0000 (15:42 +0000)]
[Tooling] Restore current directory after processing each file.
Summary:
If we actually change directory before processing a file, we need to
restore it afterwards. This was broken in r216620.
Added a comment for the changes in r216620.
Reviewers: klimek
Reviewed By: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6162
llvm-svn: 221600
Viktor Kutuzov [Mon, 10 Nov 2014 15:31:56 +0000 (15:31 +0000)]
Enable running Ubsan tests on FreeBSD
Differential Revision: http://reviews.llvm.org/D6089
llvm-svn: 221599
Manuel Klimek [Mon, 10 Nov 2014 15:29:29 +0000 (15:29 +0000)]
Mark test using python as REQUIRES: python27.
llvm-svn: 221598
Viktor Kutuzov [Mon, 10 Nov 2014 15:27:13 +0000 (15:27 +0000)]
[Ubsan] Fix the missing_return.cpp test to pass on FreeBSD
Differential Revision: http://reviews.llvm.org/D6088
llvm-svn: 221597
Viktor Kutuzov [Mon, 10 Nov 2014 15:25:01 +0000 (15:25 +0000)]
[Ubsan] Fix the cast-overflow.cpp test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D6087
llvm-svn: 221596
Viktor Kutuzov [Mon, 10 Nov 2014 15:22:04 +0000 (15:22 +0000)]
[Sanitizers] Enable stack traces on FreeBSD
Differential Revision: http://reviews.llvm.org/D6086
llvm-svn: 221595
Shankar Easwaran [Mon, 10 Nov 2014 15:16:31 +0000 (15:16 +0000)]
[ELF] add missing test for max-page-size
llvm-svn: 221594
Shawn Best [Mon, 10 Nov 2014 15:06:15 +0000 (15:06 +0000)]
LLGS Android target support (r221570) missed adding some files: reviews.llvm.org/D6166
llvm-svn: 221593
NAKAMURA Takumi [Mon, 10 Nov 2014 15:04:26 +0000 (15:04 +0000)]
[CMake] llvm-c-test: Use libLLVM.so if it is available.
llvm-svn: 221592
NAKAMURA Takumi [Mon, 10 Nov 2014 15:04:02 +0000 (15:04 +0000)]
[CMake] Let llvm-shlib work on Linux with --whole-archive.
FIXME: It should work on not only Linux but elf-targeting gnu ld.
For example if LLVM_DYLIB_COMPONENTS is "BitWriter Support", CMake emits the command line like;
-Wl,--whole-archive
lib/libLLVMBitWriter.a
lib/libLLVMSupport.a *1
-Wl,--no-whole-archive
lib/libLLVMCore.a
lib/libLLVMSupport.a *2
-lrt -ldl -ltinfo -lpthread -lm
It works since symbols in LLVMCore is resolved with not *2 but *1.
Unfortunately, --gc-sections is not powerful in this case to prune unused "visibility(default)" entries.
I am still experimenting other way not to rely on --whole-archive.
llvm-svn: 221591
NAKAMURA Takumi [Mon, 10 Nov 2014 15:03:02 +0000 (15:03 +0000)]
[CMake] Move llvm-shlib in prior to other tools.
llvm-svn: 221590
Shankar Easwaran [Mon, 10 Nov 2014 14:55:21 +0000 (14:55 +0000)]
[Gnu] Support --image-base option
The value for --image-base is used as the base address of the program.
llvm-svn: 221589
Shankar Easwaran [Mon, 10 Nov 2014 14:55:11 +0000 (14:55 +0000)]
[ELF] Fix DT_INIT_ARRAY{SZ} and DT_FINI_ARRAY{SZ}
The dynamic table was creating the entry DT_FINI_ARRAY{SZ} even when there was
no .fini_array section. The entries should be creating in the dynamic section
only if there are sections .init_array/.fini_array in the output.
Fixes the tests that checked for errroneous outputs.
llvm-svn: 221588
Shankar Easwaran [Mon, 10 Nov 2014 14:55:07 +0000 (14:55 +0000)]
[ELF] Fix values of linker created dynamic variables.
The value of _DYNAMIC should be pointing at the start of the .dynamic segment.
This was pointing to the end of the dynamic segment. Similarly the value of
_GLOBAL_OFFSET_TABLE_ was not proper too.
llvm-svn: 221587
Shankar Easwaran [Mon, 10 Nov 2014 14:54:53 +0000 (14:54 +0000)]
[ELF] .dynamic should have SHT_DYNAMIC flag
llvm-svn: 221586
Shankar Easwaran [Mon, 10 Nov 2014 14:54:49 +0000 (14:54 +0000)]
[Gnu] Add options that are ignored
Add options that are ignored and exists just for compatibility reasons.
llvm-svn: 221585
Shankar Easwaran [Mon, 10 Nov 2014 14:54:43 +0000 (14:54 +0000)]
[ELF] Support -z max-page-size option
The GNU linker allows the user to change the page size by using the option -z
max-page-size.
llvm-svn: 221584
Shankar Easwaran [Mon, 10 Nov 2014 14:54:34 +0000 (14:54 +0000)]
Add support library.
The parsing routines in the linker script to parse strings encoded in various
formats(hexadecimal, octal, decimal, etc), is needed by the GNU driver too. This
library provides helper functions for all flavors and flavors to add helper
functions which other flavors may make use of.
llvm-svn: 221583
Aaron Ballman [Sat, 8 Nov 2014 17:09:50 +0000 (17:09 +0000)]
Missing testcase from r221581.
llvm-svn: 221582
Aaron Ballman [Sat, 8 Nov 2014 17:07:15 +0000 (17:07 +0000)]
Updated the wording for a diagnostic to be more grammatically correct, and use a %select. Also ensure that nested namespace definitions are diagnosed properly. Both changes are motivated by post-commit feedback from r221580.
llvm-svn: 221581
Aaron Ballman [Sat, 8 Nov 2014 15:33:35 +0000 (15:33 +0000)]
[c++1z] Support for attributes on namespaces and enumerators.
llvm-svn: 221580
NAKAMURA Takumi [Sat, 8 Nov 2014 14:12:30 +0000 (14:12 +0000)]
[CMake] llvm-shlib: Add possibly missing BitReader and MCDisassembler for llvm-c.
FYI, 3 modules below are redundant in trunk;
AsmPrinter
MC
SelectionDAG
llvm-svn: 221579
Jay Foad [Sat, 8 Nov 2014 09:51:45 +0000 (09:51 +0000)]
[ASan] Fix stack-overflow test for PowerPC
Summary:
Tweak the asan stack overflow heuristics to cope with PowerPC64 redzones,
which are larger than on x86-64: 288 bytes for big-endian and 512 bytes
for little-endian.
Reviewers: kcc, willschm, samsonov, eugenis
Reviewed By: samsonov, eugenis
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6168
llvm-svn: 221578
Jason Molenda [Sat, 8 Nov 2014 08:09:22 +0000 (08:09 +0000)]
Add a RegisterNumber class to RegisterContextLLDB.h and start using
it in RegisterContext.cpp.
There's a lot of bookkeeping code in RegisterContextLLDB where it has
to convert between different register numbering schemes and it makes
some methods like SavedLocationForRegister very hard to read or
maintain. Abstract all of the details about different register numbering
systems for a given register into this new class to make it easier
to understand what the method is doing.
Also add register name printing to all of the logging -- that's easy to
get now that I've got an object to represent the register numbers.
There were some gnarly corner cases of this method that I believe
I've translated correctly - initial testing looks good but it's
possible I missed a corner case, especially with architectures which
uses a link-register aka return address register like arm32/arm64.
Basic behavior is correct but there are a lot of corner casese that are
handled in this method ...
llvm-svn: 221577
Richard Smith [Sat, 8 Nov 2014 06:08:42 +0000 (06:08 +0000)]
[c++1z] Support for u8 character literals.
llvm-svn: 221576
Jason Molenda [Sat, 8 Nov 2014 05:38:17 +0000 (05:38 +0000)]
Fix a corner case with the handling of noreturn functions.
If a noreturn function was the last function in a section,
we wouldn't correctly back up the saved-pc value into the
correct section leading to us showing the wrong function in
the backtrace.
Also add a backtrace test with an attempt to elicit this
particular layout. It happens to work out with clang -Os
but other compilers may not quite get the same layout I'm
getting at that opt setting. We'll still be exercising the
basic noreturn handling in the unwinder even if we don't get
one function at the very end of a section.
<rdar://problem/
16051613>
llvm-svn: 221575
Richard Smith [Sat, 8 Nov 2014 05:37:34 +0000 (05:37 +0000)]
[c++1z] Implement nested-namespace-definitions.
This allows 'namespace A::B { ... }' as a shorthand for 'namespace A {
namespace B { ... } }'. We already supported this correctly for error recovery;
promote that support to a full implementation.
This is not the right implementation: we do not maintain source fidelity
because we desugar the nested namespace definition in the parser. This is
tricky to avoid, since the definition genuinely does inject one named
entity per level in the namespace name.
llvm-svn: 221574
Richard Smith [Sat, 8 Nov 2014 05:07:16 +0000 (05:07 +0000)]
[c++1z] N4295: fold-expressions.
This is a new form of expression of the form:
(expr op ... op expr)
where one of the exprs is a parameter pack. It expands into
(expr1 op (expr2onwards op ... op expr))
(and likewise if the pack is on the right). The non-pack operand can be
omitted; in that case, an empty pack gives a fallback value or an error,
depending on the operator.
llvm-svn: 221573
Shankar Easwaran [Sat, 8 Nov 2014 04:03:24 +0000 (04:03 +0000)]
[ELF] Remove unused variable
llvm-svn: 221572
Shankar Easwaran [Sat, 8 Nov 2014 03:44:49 +0000 (03:44 +0000)]
[ELF] Support --no-align-segments.
lld generates an ELF by adhering to the ELF spec by aligning vma/fileoffset to a
page boundary, but this becomes an issue when dealing with large pages. This
adds support so that lld generated executables adheres to the ELF spec with the
rule vma % p_align = offset % p_align.
This is supported by the flag --no-align-segments.
This could be the default in few targets like X86_64 to save space on disk.
llvm-svn: 221571
Shawn Best [Sat, 8 Nov 2014 01:41:49 +0000 (01:41 +0000)]
LLGS Android target support - for Andy Chien : reviews.llvm.org/D6166
llvm-svn: 221570
Ben Langmuir [Sat, 8 Nov 2014 00:34:30 +0000 (00:34 +0000)]
Check module signature when the module has already been loaded
We may need to verify the signature on subsequent imports as well, just
like we verify the size/modtime:
@import A;
@import B; // imports A
@import C; // imports A
llvm-svn: 221569
Fariborz Jahanian [Sat, 8 Nov 2014 00:23:55 +0000 (00:23 +0000)]
Fixed a buildbot failure.
llvm-svn: 221568
Ben Langmuir [Sat, 8 Nov 2014 00:06:39 +0000 (00:06 +0000)]
Fix unintended fallthrough in ASTReader
llvm-svn: 221567
Shawn Best [Sat, 8 Nov 2014 00:04:04 +0000 (00:04 +0000)]
fix for unit tests finding path to LLDB.h reviews.llvm.org/D6177
llvm-svn: 221566
Matt Arsenault [Sat, 8 Nov 2014 00:02:57 +0000 (00:02 +0000)]
R600/SI: Fix broken check prefixes in test
llvm-svn: 221565
Saleem Abdulrasool [Sat, 8 Nov 2014 00:00:50 +0000 (00:00 +0000)]
Transforms: address some late comments
We already use the llvm namespace. Remove the unnecessary prefix. Use the
StringRef::equals method to compare with C strings rather than instantiating
std::strings.
Addresses late review comments from David Majnemer.
llvm-svn: 221564
Saleem Abdulrasool [Sat, 8 Nov 2014 00:00:47 +0000 (00:00 +0000)]
Transforms: sort source files in build
Sort target sources. NFC.
llvm-svn: 221563
Fariborz Jahanian [Fri, 7 Nov 2014 23:51:15 +0000 (23:51 +0000)]
[Objective-C Sema]. Issue availability/deprecated warning when
there is a uinque method found when message is sent to receiver
of 'id' type. // rdar://
18848183
llvm-svn: 221562
Zachary Turner [Fri, 7 Nov 2014 23:44:13 +0000 (23:44 +0000)]
Remove the top-level DebugDriverThread in ProcessWindows.
Originally the idea was that we would queue requests to a master
thread that would dispatch them to other slave threads each
responsible for debugging an individual process. This might make
some scenarios more scalable and responsive, but for now it seems
to be unwarranted complexity for no observable benefit.
llvm-svn: 221561
David Majnemer [Fri, 7 Nov 2014 22:39:11 +0000 (22:39 +0000)]
SelectionDAG: Assert if we truncate SDNode's NumOperands or NumValues
No functionality change intended, this just stops us early if we created
a bad SDNode.
llvm-svn: 221560
Tim Northover [Fri, 7 Nov 2014 22:30:50 +0000 (22:30 +0000)]
ARM ABI: simplify decisions on whether args can be expanded.
Homogeneous aggregates on AAPCS_VFP ARM need to be passed *without* being
flattened (e.g. [2 x float] rather than "float, float") for various weird ABI
reasons. However, this isn't the case for anything else; further, we know at
the ABIArgInfo::getDirect callsites whether this flattening is allowed.
So, we can get more unified ARM code, with a simpler Clang, by just using that
knowledge directly.
llvm-svn: 221559
Alexey Samsonov [Fri, 7 Nov 2014 22:29:38 +0000 (22:29 +0000)]
Introduce a SanitizerKind enum to LangOptions.
Use the bitmask to store the set of enabled sanitizers instead of a
bitfield. On the negative side, it makes syntax for querying the
set of enabled sanitizers a bit more clunky. On the positive side, we
will be able to use SanitizerKind to eventually implement the
new semantics for -fsanitize-recover= flag, that would allow us
to make some sanitizers recoverable, and some non-recoverable.
No functionality change.
llvm-svn: 221558
Kuba Brecka [Fri, 7 Nov 2014 22:27:43 +0000 (22:27 +0000)]
Use @rpath for ASan dylib in Makefiles
Reviewed at http://reviews.llvm.org/D6176
llvm-svn: 221557
Kuba Brecka [Fri, 7 Nov 2014 22:27:12 +0000 (22:27 +0000)]
Use @rpath for ASan dylib in Makefiles
Reviewed at http://reviews.llvm.org/D6176
llvm-svn: 221556
Chad Rosier [Fri, 7 Nov 2014 22:12:57 +0000 (22:12 +0000)]
[Reassociate] Better preserve NSW/NUW flags.
Part of PR12985.
Phabricator Revision: http://reviews.llvm.org/D6172
llvm-svn: 221555
Saleem Abdulrasool [Fri, 7 Nov 2014 22:09:52 +0000 (22:09 +0000)]
Transforms: use typedef rather than using aliases
Visual Studio 2012 apparently does not support using alias declarations. Use
the more traditional typedef approach. This should let the Windows buildbots
pass. NFC.
llvm-svn: 221554
Nick Kledzik [Fri, 7 Nov 2014 22:00:26 +0000 (22:00 +0000)]
[mach-o] remove stray debug output
llvm-svn: 221553
Nick Kledzik [Fri, 7 Nov 2014 22:00:23 +0000 (22:00 +0000)]
[mach-o] Fix MachOFileNode to own archives same as ELFFileNode
My previous fix to have FileArchive own the member MemoryBuffers was not a
complete solution for darwin because nothing owned the FileArchive object.
Fixed MachOFileNode to be like ELFFileNode and have the graph node own the
archive object.
llvm-svn: 221552
Renato Golin [Fri, 7 Nov 2014 21:55:11 +0000 (21:55 +0000)]
PPC fix works for ARM, too
llvm-svn: 221551
David Peixotto [Fri, 7 Nov 2014 21:44:18 +0000 (21:44 +0000)]
Safely generate new loop metadata node
Polly was accidently modifying a debug info metadata node when
attempting to generate a new unique metadata node for the loop id.
The problem was that we had dwarf metadata that referred to a
metadata node with a null value, like this:
!6 = ... some dwarf metadata referring to !7 ...
!7 = {null}
When we attempt to generate a new metadata node, we reserve the
first space for self-referential node by setting the first argument
to null and then mutating the node later to refer to itself.
However, because the nodes are uniqued based on pointer values, when
we get the new metadata node it actually referred to an existing
node (!7 in the example). When we went to modify the metadata to
point to itself, we were accidently mutating the dwarf metatdata. We
ended up in this situation:
!6 = ... some dwarf metadata referring to !7 ...
!7 = {!7}
and this causes an assert when generating the debug info. The fix is
simple, we just need to use a unique value when getting a new
metadata node. The MDNode::getTemporary() provides exactly the API
we need (and it is used in clang to generate the unique nodes).
Differential Revision: http://reviews.llvm.org/D6174
llvm-svn: 221550
Rafael Espindola [Fri, 7 Nov 2014 21:33:09 +0000 (21:33 +0000)]
Remove unused variable.
llvm-svn: 221549
Saleem Abdulrasool [Fri, 7 Nov 2014 21:32:08 +0000 (21:32 +0000)]
Transform: add SymbolRewriter pass
This introduces the symbol rewriter. This is an IR->IR transformation that is
implemented as a CodeGenPrepare pass. This allows for the transparent
adjustment of the symbols during compilation.
It provides a clean, simple, elegant solution for symbol inter-positioning. This
technique is often used, such as in the various sanitizers and performance
analysis.
The control of this is via a custom YAML syntax map file that indicates source
to destination mapping, so as to avoid having the compiler to know the exact
details of the source to destination transformations.
llvm-svn: 221548
Michael J. Spencer [Fri, 7 Nov 2014 21:30:36 +0000 (21:30 +0000)]
Fix style.
llvm-svn: 221547
Michael J. Spencer [Fri, 7 Nov 2014 21:30:32 +0000 (21:30 +0000)]
Fix style.
llvm-svn: 221546
Nick Kledzik [Fri, 7 Nov 2014 21:01:21 +0000 (21:01 +0000)]
[mach-o] Add support for -order_file option
The darwin linker lets you rearrange functions and data for better locality
(less paging). You do this with the -order_file option which supplies a text
file containing one symbol per line.
Implementing this required a small change to LayoutPass to add a custom sorter
hook.
llvm-svn: 221545
Nick Kledzik [Fri, 7 Nov 2014 20:52:38 +0000 (20:52 +0000)]
Fix FileArchive member MemoryBuffer early destruction
When FileArchive loads a member, it instantiates a temporary MemoryBuffer
which points to the member range of the archive file. The problem is that the
object file parsers call getBufferIndentifer() on that temporary MemoryBuffer
and store that StringRef as the _path data member for that lld::File. When
FileArchive::instantiateMember() goes out of scope the MemoryBuffer is deleted
and the File::._path becomes a dangling reference.
The fix adds a vector<> to FileArchive to own the instantiated MemoryBuffers.
In addition it fixes member's path to be the standard format
(e.g. "/path/libfoo.a(foo.o)") instead of just the leaf name.
llvm-svn: 221544
Matt Arsenault [Fri, 7 Nov 2014 20:45:00 +0000 (20:45 +0000)]
R600: Remove unused define
llvm-svn: 221543
Jay Foad [Fri, 7 Nov 2014 20:42:11 +0000 (20:42 +0000)]
[ASan] Fix zero_page_pc test for PowerPC
Summary:
In the Power architecture, all branch instructions ignore the 2 least
significant bits of the target address. Consequently if you branch to an
invalid address, the address reported along with the SIGSEGV will have
been rounded down to a multiple of 4. Tweak this test accordingly.
This may fix the test for ARM too, in which case we could remove
the XFAIL, but I have no way of testing that.
Reviewers: kcc, willschm, glider, samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6167
llvm-svn: 221542
Enrico Granata [Fri, 7 Nov 2014 20:37:17 +0000 (20:37 +0000)]
This was meant to be count, not m_count
llvm-svn: 221541
Enrico Granata [Fri, 7 Nov 2014 20:22:18 +0000 (20:22 +0000)]
SBValue::Cast is deprecated. This does not work as reliably as free-form casting via the expression evaluator. Some of our clients depend on it, so we can't remove it. But any new adopters should favor the expression parser as the way forward
llvm-svn: 221540
Simon Atanasyan [Fri, 7 Nov 2014 19:32:08 +0000 (19:32 +0000)]
[Mips] Do not hard-code the paired relocation type
Request `getPairRelocation()` function to get paired relocation type.
That allows us to look up another pairs like R_MICROMIPS_HI16/LO16
in the future.
llvm-svn: 221539
Rafael Espindola [Fri, 7 Nov 2014 18:07:04 +0000 (18:07 +0000)]
Don't redeclare a pure virtual method.
I.E., there is no value is having
void foo() override = 0;
If it is override it is already present in a base class. Since it is pure,
some other class will have to implement it.
llvm-svn: 221537
Rafael Espindola [Fri, 7 Nov 2014 17:59:05 +0000 (17:59 +0000)]
Use StringRefMemoryObject in llvm-mc. NFC.
llvm-svn: 221536
Samuel Antao [Fri, 7 Nov 2014 17:48:03 +0000 (17:48 +0000)]
Fix clash of gcc toolchains in hexagon driver regression tests.
If clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by -ccc-install-dir. This causes several regression tests to fail as they will be using an unexpected path. Adding the switch --gcc-toolchain="" in each test command is not enough as the hexagon toolchain implementation in the driver is not evaluating this argument. This commit modifies the hexagon toolchain to take the --gcc-toolchain="" argument into account when deciding the toolchain path, similarly to what is already done for other targets toolchains. Additionally, the faulty regression tests are modified in order to --gcc-toolchain="" be passed to the commands.
llvm-svn: 221535
Daniel Sanders [Fri, 7 Nov 2014 16:54:21 +0000 (16:54 +0000)]
[mips] Promote i32 arguments to i64 for the N32/N64 ABI and fix <64-bit structs...
Summary:
... and after all that refactoring, it's possible to distinguish softfloat
floating point values from integers so this patch no longer breaks softfloat to
do it.
Remove direct handling of i32's in the N32/N64 ABI by promoting them to
i64. This more closely reflects the ABI documentation and also fixes
problems with stack arguments on big-endian targets.
We now rely on signext/zeroext annotations (already generated by clang) and
the Assert[SZ]ext nodes to avoid the introduction of unnecessary sign/zero
extends.
It was not possible to convert three tests to use signext/zeroext. These tests
are bswap.ll, ctlz-v.ll, ctlz-v.ll. It's not possible to put signext on a
vector type so we just accept the sign extends here for now. These tests don't
pass the vectors the same way clang does (clang puts multiple elements in the
same argument, these map 1 element to 1 argument) so we don't need to worry too
much about it.
With this patch, all known N32/N64 bugs should be fixed and we now pass the
first 10,000 tests generated by ABITest.py.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6117
llvm-svn: 221534
Fariborz Jahanian [Fri, 7 Nov 2014 16:47:05 +0000 (16:47 +0000)]
Revert r221404 which caused lldb to not display
vararg expressions.
llvm-svn: 221533
Renato Golin [Fri, 7 Nov 2014 16:33:58 +0000 (16:33 +0000)]
Make sure only NEON enabled devices save/restore D16+ registers
llvm-svn: 221532
NAKAMURA Takumi [Fri, 7 Nov 2014 16:08:19 +0000 (16:08 +0000)]
[CMake] LLVMSupport: Give system_libs PRIVATE scope when LLVMSupport is built as SHARED. Users of LLVMSupport won't inherit ${system_libs}.
unittests/SupporTests is another user of libpthreads. Apply LLVM_SYSTEM_LIBS for him explicitly.
llvm-svn: 221531
Rafael Espindola [Fri, 7 Nov 2014 15:33:56 +0000 (15:33 +0000)]
Pass PRIVATE to target_link_libraries if using shared libraries.
A shared library (unlike a .a), has its dependencies recorded in the library and
we can pass PRIVATE to target_link_libraries.
This patch then removes some bogus dependencies when using
BUILD_SHARED_LIBS=ON. For example, we go from
build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
CXX_COMPILER /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
|| include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
lib/libLLVMCore.so lib/libLLVMBitReader.so
lib/libLLVMTransformUtils.so lib/libLLVMInstCombine.so
lib/libLLVMScalarOpts.so lib/libLLVMipa.so lib/libLLVMAnalysis.so
lib/libLLVMMCParser.so lib/libLLVMMC.so lib/libLLVMObject.so
lib/libLLVMTarget.so lib/libLLVMProfileData.so
to
build lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/AggressiveAntiDepBreaker.cpp.o:
CXX_COMPILER /home/espindola/llvm/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp
|| include/llvm/IR/intrinsics_gen lib/libLLVMSupport.so
lib/libLLVMCore.so lib/libLLVMTransformUtils.so
lib/libLLVMScalarOpts.so lib/libLLVMAnalysis.so lib/libLLVMMC.so
lib/libLLVMTarget.so
In fact, build.ninja goes from 5231028 bytes to 4896759 bytes.
With this, old verisons of bfd ld (2.24 is OK, 2.23 warns) will print a bogus
warning when building with BUILD_SHARED_LIBS.
llvm-svn: 221530
Daniel Sanders [Fri, 7 Nov 2014 15:33:08 +0000 (15:33 +0000)]
[mips] Removed the remainder of MipsCC. NFC.
Summary:
One of the calls to AllocateStack (the one in LowerCall) doesn't look like
it should be there but it was there before and removing it breaks the
frame size calculation.
Reviewers: vmedic, theraven
Reviewed By: theraven
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6116
llvm-svn: 221529
Daniel Sanders [Fri, 7 Nov 2014 15:03:53 +0000 (15:03 +0000)]
[mips] Remove MipsCC::reservedArgArea() in favour of MipsABIInfo::GetCalleeAllocdArgSizeInBytes(). NFC.
Summary:
Reviewers: theraven, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6115
llvm-svn: 221528
NAKAMURA Takumi [Fri, 7 Nov 2014 14:56:31 +0000 (14:56 +0000)]
MipsCCState.h: Use LLVM_DELETED_FUNCTION for msc17.
llvm-svn: 221527
NAKAMURA Takumi [Fri, 7 Nov 2014 14:50:10 +0000 (14:50 +0000)]
llvm/test/tools/llvm-symbolizer/ppc64.test: Avoid subshell.
llvm-svn: 221526