summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Update Symtab::InitAddressIndexes so that computed symbol sizesJason Molenda2016-04-132-13/+100
| | | | | | | | | | | | | will not exceed the bounds of their Section. This is addressing a problem where a file had a large space between two sections that were not used by this module - the last symbol in the text section had an enormous size because the distance between that and the first symbol in the data section were used to compute the size. http://reviews.llvm.org/D19004 <rdar://problem/25227945> llvm-svn: 266165
* Attempt to fix TestCPPBreakpointLocations on Linux/Android.Oleksiy Vyalov2016-04-131-1/+1
| | | | llvm-svn: 266164
* Refactor Internalization pass to use as a callback instead of a StringSet (NFC)Mehdi Amini2016-04-136-119/+144
| | | | | | | | | | | | This will save a bunch of copies / initialization of intermediate datastructure, and (hopefully) simplify the code. This also abstract the symbol preservation mechanism outside of the Internalization pass into the client code, which is not forced to keep a map of strings for instance (ThinLTO will prefere hashes). From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266163
* Recommit r265547, and r265610,r265639,r265657 on top of it, plusWei Mi2016-04-1318-1060/+1306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | two fixes with one about error verify-regalloc reported, and another about live range update of phi after rematerialization. r265547: Replace analyzeSiblingValues with new algorithm to fix its compile time issue. The patch is to solve PR17409 and its duplicates. analyzeSiblingValues is a N x N complexity algorithm where N is the number of siblings generated by reg splitting. Although it causes siginificant compile time issue when N is large, it is also important for performance since it removes redundent spills and enables rematerialization. To solve the compile time issue, the patch removes analyzeSiblingValues and replaces it with lower cost alternatives containing two parts. The first part creates a new spill hoisting method in postOptimization of register allocation. It does spill hoisting at once after all the spills are generated instead of inside every instance of selectOrSplit. The second part queries the define expr of the original register for rematerializaiton and keep it always available during register allocation even if it is already dead. It deletes those dead instructions only in postOptimization. With the two parts in the patch, it can remove analyzeSiblingValues without sacrificing performance. Patches on top of r265547: r265610 "Fix the compare-clang diff error introduced by r265547." r265639 "Fix the sanitizer bootstrap error in r265547." r265657 "InlineSpiller.cpp: Escap \@ in r265547. [-Wdocumentation]" Differential Revision: http://reviews.llvm.org/D15302 Differential Revision: http://reviews.llvm.org/D18934 Differential Revision: http://reviews.llvm.org/D18935 Differential Revision: http://reviews.llvm.org/D18936 llvm-svn: 266162
* ELF: Do not create relative relocations for undefined symbols.Peter Collingbourne2016-04-132-0/+20
| | | | | | | | | | | | | We need to ensure that the address of an undefined weak symbol evaluates to zero. We were getting this right for non-PIC executables (where the symbol can be evaluated directly) and for DSOs (where we emit a symbolic relocation for these symbols, as they are preemptible). But we weren't getting it right for PIEs. Probably the simplest way to ensure that these symbols evaluate to zero is by not creating a relocation in .got for them. Differential Revision: http://reviews.llvm.org/D19044 llvm-svn: 266161
* [modules] Refactor handling of cases where we write an offset to a prior ↵Richard Smith2016-04-133-29/+45
| | | | | | record into the bitstream and simplify a little, in preparation for doing this in more cases. llvm-svn: 266160
* Fix FunctionImport export list computation: need to take a reference to a ↵Mehdi Amini2016-04-131-1/+1
| | | | | | | map entry to actually modify it From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266159
* Change how we apply relocations.Rafael Espindola2016-04-138-526/+606
| | | | | | | | | | | | | | | | | | | | | | | With this patch we use the first scan over the relocations to remember the information we found about them: will them be relaxed, will a plt be used, etc. With that the actual relocation application becomes much simpler. That is particularly true for the interfaces in Target.h. This unfortunately means that we now do two passes over relocations for non SHF_ALLOC sections. I think this can be solved by factoring out the code that scans a single relocation. It can then be used both as a scan that record info and for a dedicated direct relocation of non SHF_ALLOC sections. I also think it is possible to reduce the number of enum values by representing a target with just an OutputSection and an offset (which can be from the start or end). This should unblock adding features like relocation optimizations. llvm-svn: 266158
* [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.Devin Coughlin2016-04-132-14/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat a _Nonnull ivar that is nil as an invariant violation in a similar fashion to how a nil _Nonnull parameter is treated as a precondition violation. This avoids warning on defensive returns of nil on defensive internal checks, such as the following common idiom: @class InternalImplementation @interface PublicClass { InternalImplementation * _Nonnull _internal; } -(id _Nonnull)foo; @end @implementation PublicClass -(id _Nonnull)foo { if (!_internal) return nil; // no-warning return [_internal foo]; } @end rdar://problem/24485171 llvm-svn: 266157
* AMDGPU: Add test for m0 initialization in basic loopMatt Arsenault2016-04-131-0/+48
| | | | | | | | | | | | Initialization of m0 is emitted for each LDS operation, so every block with LDS usage ends up with one. MachineLICM used to fail to hoist this out of the loop, so every loop iteration with LDS usage in it would re-initialize it. This seems to be fixed now, so add a test to make sure that it stays this way. llvm-svn: 266156
* AMDGPU: Remove leftover ShaderType attributes in testsMatt Arsenault2016-04-135-32/+30
| | | | llvm-svn: 266155
* clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.NAKAMURA Takumi2016-04-131-1/+1
| | | | llvm-svn: 266154
* LTOInternalize: Fix member type, should be a reference and not a copyMehdi Amini2016-04-121-1/+1
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266153
* AMDGPU/SI: Fix spilling of 96-bit registersTom Stellard2016-04-121-0/+4
| | | | | | | | | | | | | | | Summary: It seems like this was broken in r252327. I thought we had test cases for this, but it's really hard to tirgger spills of this exact register size since they aren't used very much. Reviewers: arsenm, nhaehnle Subscribers: nhaehnle, arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D19021 llvm-svn: 266152
* Fix mismatch on returned type between header and implementation for ↵Mehdi Amini2016-04-121-1/+1
| | | | | | | createNameAnonFunctionPass() From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266151
* CodeGen: Clear the MFI's save and restore point after PrologEpilogInserterJustin Bogner2016-04-123-2/+29
| | | | | | | | | | This state is no longer useful and not guaranteed to be valid in later codegen passes. For example, see the added test, which would print a savepoint of %bb.-1 without this change, and crashes with a use-after-free error under ASan if you apply the recycling allocator patch from llvm.org/PR26808. llvm-svn: 266150
* Add space between words in verify-scev-maps option help messageJeroen Ketema2016-04-121-1/+1
| | | | llvm-svn: 266149
* [x86, InstCombine] fix masked load pass-through operand to be a zero vectorSanjay Patel2016-04-122-14/+17
| | | | | | | | | | | | | | This bug was introduced with: http://reviews.llvm.org/rL262269 AVX masked loads are specified to set vector lanes to zero when the high bit of the mask element for that lane is zero: "If the mask is 0, the corresponding data element is set to zero in the load form of these instructions, and unmodified in the store form." --Intel manual Differential Revision: http://reviews.llvm.org/D19017 llvm-svn: 266148
* [ObjC] Pop all cleanups created in EmitObjCForCollectionStmt beforeAkira Hatanaka2016-04-122-4/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exiting the for-in loop. This commit fixes a bug where EmitObjCForCollectionStmt didn't pop cleanups for captures. For example, in the following for-in loop, a block which captures self is passed to foo1: for (id x in [self foo1:^{ use(self); }]) { use(x); break; } Previously, the code in EmitObjCForCollectionStmt wouldn't pop the cleanup for the captured self before exiting the loop, which caused code-gen to generate an IR in which objc_release was called twice on the captured self. This commit fixes the bug by entering a RunCleanupsScope before the loop condition is evaluated and forcing its cleanup before exiting the loop. rdar://problem/16865751 Differential Revision: http://reviews.llvm.org/D18618 llvm-svn: 266147
* ObjC class properties: add diagnostics for unimplemented class properties.Manman Ren2016-04-124-45/+76
| | | | | | rdar://24711047 llvm-svn: 266146
* Fix breakpoint_set_restart test for WindowsAdrian McCarthy2016-04-121-2/+8
| | | | | | | | When run with the multiprocess test runner, the getchar() trick doesn't work, so ninja check-lldb would fail on this test, but running the test directly worked fine. Differential Revision: http://reviews.llvm.org/D19035 llvm-svn: 266145
* [AArch64] Fuse AES{D,E}/AESMC for Exynos M1. (NFC)Evandro Menezes2016-04-121-1/+4
| | | | llvm-svn: 266144
* Add test for the interaction of copy relocations and non alloc sections.Rafael Espindola2016-04-121-0/+52
| | | | llvm-svn: 266143
* Pre-fill LibcallRoutineNames with nullptr.James Y Knight2016-04-121-32/+12
| | | | | | And rearrange InitLibcallNames slightly. llvm-svn: 266142
* Add a few more cases to this test.Rafael Espindola2016-04-121-7/+36
| | | | | | | It now documents how we currently handle relocations for alloc/non-alloc. llvm-svn: 266141
* [COFF] Simplify the code leveraging implicit conversion.Davide Italiano2016-04-121-2/+1
| | | | | | Suggested by: David Blaikie! llvm-svn: 266140
* Fixed being able to set breakpoints on destructors when we don't fully ↵Greg Clayton2016-04-122-1/+4
| | | | | | | | | | | | | | specify the demangled name. So all of the following now work: (lldb) b ~Foo (lldb) b Foo::~Foo (lldb) b Bar::Foo::~Foo Improved out C++ breakpoint locations tests as well to cover this issue. <rdar://problem/25577252> llvm-svn: 266139
* Use the FormatEntity work for great good - parse summary strings before ↵Enrico Granata2016-04-121-8/+11
| | | | | | accepting them, and fail to add any strings that fail parsing llvm-svn: 266138
* Update psabi link for x86-64. Add link to linux gabi supplement.James Y Knight2016-04-121-12/+2
| | | | llvm-svn: 266137
* [MC/ELFObjectWriter] Fix indentation of class body.David Blaikie2016-04-121-131/+130
| | | | llvm-svn: 266136
* Fixed a few typos and formatting problems. NFCI.David L Kreitzer2016-04-121-15/+15
| | | | llvm-svn: 266135
* [DebugInfo] Add error message to test.Davide Italiano2016-04-121-1/+4
| | | | | | Suggested by Rafael as post-commit review (r266102). llvm-svn: 266134
* [AMDGPU] Add debugger related target optionsKonstantin Zhuravlyov2016-04-123-0/+53
| | | | | | Differential Revision: http://reviews.llvm.org/D18748 llvm-svn: 266133
* Add a pass to name anonymous/nameless functionMehdi Amini2016-04-128-0/+142
| | | | | | | | | | | | | | | | Summary: For correct handling of alias to nameless function, we need to be able to refer them through a GUID in the summary. Here we name them using a hash of the non-private global names in the module. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D18883 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266132
* Move summary creation out of llvm-as into optMehdi Amini2016-04-1226-59/+55
| | | | | | | | | | | | | | | | | | Summary: Let keep llvm-as "dumb": it converts textual IR to bitcode. This commit removes the dependency from llvm-as to libLLVMAnalysis. We'll add back summary in llvm-as if we get to a textual representation for it at some point. In the meantime, opt seems like a better place for that. Reviewers: tejohnson Subscribers: joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D19032 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266131
* X86: Avoid accessing SDValues after they've been RAUW'dJustin Bogner2016-04-121-3/+8
| | | | | | | | | | | | This fixes two use-after-frees in selectLEA64_32Addr. If matchAddress matches an ADD with an AND as an operand, and that AND hits one of the "heroic transforms" that folds masks and shifts, we end up with N pointing to an SDNode that was deleted. Make sure we're done accessing it before that. Found by ASan with the recycling allocator changes in llvm.org/PR26808. llvm-svn: 266130
* Cleanup the arguments for 'memory find' such that the help system reflects ↵Enrico Granata2016-04-121-5/+5
| | | | | | the real way to invoke it llvm-svn: 266129
* NFC: MergeFunctions return earlyJF Bastien2016-04-121-1/+1
| | | | | | Same effect, easier to read. llvm-svn: 266128
* Add a fixme for an old patch I had lying around that I'm not going to finish ↵David Blaikie2016-04-121-0/+5
| | | | | | any time so n llvm-svn: 266127
* AMDGPU: add llvm.amdgcn.buffer.load/store intrinsicsNicolai Haehnle2016-04-1210-84/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: They correspond to BUFFER_LOAD/STORE_DWORD[_X2,X3,X4] and mostly behave like llvm.amdgcn.buffer.load/store.format. They will be used by Mesa for SSBO and atomic counters at least when robust buffer access behavior is desired. (These instructions perform no format conversion and do buffer range checking per component.) As a side effect of sharing patterns with llvm.amdgcn.buffer.store.format, it has become trivial to add support for the f32 and v2f32 variants of that intrinsic, so the patch does so. Also DAG-ify (and fix) some tests that I noticed intermittent failures in while developing this patch. Some tests were (temporarily) adjusted for the required mayLoad/hasSideEffects changes to the BUFFER_STORE_DWORD* instructions. See also http://reviews.llvm.org/D18291. Reviewers: arsenm, tstellarAMD, mareko Subscribers: arsenm, llvm-commits Differential Revision: http://reviews.llvm.org/D18292 llvm-svn: 266126
* [ThinLTO] Only compute imports for current module in FunctionImport passTeresa Johnson2016-04-124-24/+82
| | | | | | | | | | | | | | | | | | | | | Summary: The function import pass was computing all the imports for all the modules in the index, and only using the imports for the current module. Change this to instead compute only for the given module. This means that the exports list can't be populated, but they weren't being used anyway. Longer term, the linker can collect all the imports and export lists and serialize them out for consumption by the distributed backend processes which use this pass. Reviewers: joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D18945 llvm-svn: 266125
* NFC: MergeFunctions update more commentsJF Bastien2016-04-121-7/+8
| | | | | | They are wordy. Some words were wrong. llvm-svn: 266124
* Always use --eh-frame-hdr on FreeBSD, even for -staticEd Maste2016-04-122-1/+2
| | | | | | | | | | | | FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and is expected to use it more widely in the future), and it requires the EH frame segment in static binaries. This is the same as r203742 for NetBSD. Differential Revision: http://reviews.llvm.org/D19029 llvm-svn: 266123
* Add a couple of missing vsx load and store intrinsics.Eric Christopher2016-04-122-0/+20
| | | | | | Patch by Jing Yu! llvm-svn: 266122
* ELF: Give automatically generated __start_* and __stop_* symbols hidden ↵Peter Collingbourne2016-04-122-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | visibility. These symbols describe a property of a linkage unit, so it seems reasonable to limit their visibility to the linkage unit. Furthermore the use cases I am aware of do not require more than hidden visibility. This is a departure from the behavior of the bfd and gold linkers. However, it is unclear that the decision to give these symbols default visibility in those linkers was made deliberately. The __start_*/__stop_* feature was added to the bfd linker in 1994 [1], while the visibility feature was added about five years later [2], so it may have been that the visibility of these symbols was not considered. The feature was implemented in gold [3] in the same way; the behavior may have simply been copied from bfd. The only related discussion I could find on the binutils mailing list [4] was a user issue which would most likely not have occurred if the symbols had hidden visibility. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5efddb2e7c3229b569a862205f61d42860af678b [2] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=0fc731e447cd01e7fc35197b487ff0e4fd25afca [3] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=bfd58944a64b0997a310b95fbe0423338961e71c [4] https://sourceware.org/ml/binutils/2014-05/msg00011.html Differential Revision: http://reviews.llvm.org/D19024 llvm-svn: 266121
* Add declarations of OpenMP 4.5 target/offload routines to headersJonathan Peyton2016-04-123-0/+21
| | | | | | All these routines are implemented in the offload library. llvm-svn: 266120
* [ELF][MIPS] Add test case to check using GP0 value in relocation ↵Simon Atanasyan2016-04-122-0/+31
| | | | | | calculation. NFC. llvm-svn: 266119
* Revert to using libdispatch to reap threads on MacOSX. Code was accidentally ↵Greg Clayton2016-04-121-21/+33
| | | | | | | | checked in that is now reverted. <rdar://problem/25643874> llvm-svn: 266118
* Pass -backend-option to LLVM when there is no target machine.Yaxun Liu2016-04-122-16/+27
| | | | | | | | Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR. Differential Revision: http://reviews.llvm.org/D17552 llvm-svn: 266117
* [modules] Extend r266113 to cope with submodules.Richard Smith2016-04-122-2/+4
| | | | llvm-svn: 266116
OpenPOWER on IntegriCloud