summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* LTO: Merge -lto-no-discard-value-names with -save-temps.Rui Ueyama2016-04-226-16/+7
| | | | | | | | | | This patch is to remove -lto-no-discard-value-names flag and instead to use -save-temps as we discussed in the post-commit review thread for r267020. Differential Revision: http://reviews.llvm.org/D19437 llvm-svn: 267230
* Differential Revision: http://reviews.llvm.org/D19040Sriraman Tallam2016-04-224-8/+142
| | | | llvm-svn: 267229
* [Clang-tidy] Fix Clang warning in misc/StringConstructorCheck.h.Eugene Zelenko2016-04-221-1/+1
| | | | | | Using LLVM_ENABLE_WARNINGS=ON is good idea. llvm-svn: 267228
* llvm-symbolizer: prefer .dwo contents over fission-gmlt-like-data when .dwo ↵David Blaikie2016-04-226-26/+40
| | | | | | | | | | | | | | | | | | | | | file is present Rather than relying on the gmlt-like data emitted into the .o/executable which only contains the simple name of any inlined functions, use the .dwo file if present. Test symbolication with/without a .dwo, and the old test that was testing behavior when no gmlt-like data was present. (I haven't included a test of non-gmlt-like data + no .dwo (that would be akin to symbolication with no debug info) but we could add one for completeness) The test was simplified a bit to be a little clearer (unoptimized, force inline, using a function call as the inlined entity) and regenerated with ToT clang. For the no-gmlt-like-data case, I modified Clang back to its old behavior temporarily & the .dwo file is identical so it is shared between the two executables. llvm-svn: 267227
* Update discriminator assignment algorithm in clang assembler.Dehao Chen2016-04-221-1/+6
| | | | | | | | | | | | Summary: The clang assembler assumes that the discriminator remains the same when there is source line change. The correct behavior is that when there is line change, discriminator will automatically reset to 0. Reviewers: dnovillo, davidxl, echristo Subscribers: echristo, llvm-commits Differential Revision: http://reviews.llvm.org/D19436 llvm-svn: 267226
* AMDGPU: Fix crash when dumping unknown opcodeMatt Arsenault2016-04-221-0/+5
| | | | | | | | I'm for some reason having a problem producing a test. It should be the same as test/MC/X86/invalid_opcode.s, but llvm-mc seems to ignore random bytes. llvm-svn: 267225
* PGO] PGOFuncName meta data if PGOFuncName is different from function's raw nameRong Xu2016-04-221-0/+2
| | | | | | | | | | Write out the PGOFuncName meta data if PGOFuncName is different from function's raw name. This should only apply to internal linkage functions. This is to be consumed by indirect-call promotion when called in LTO optimization pass. Differential Revision: http://reviews.llvm.org/D18624 llvm-svn: 267224
* Introduce llvm.load.relative intrinsic.Peter Collingbourne2016-04-2215-1/+311
| | | | | | | | | | | | | | | | | | | This intrinsic takes two arguments, ``%ptr`` and ``%offset``. It loads a 32-bit value from the address ``%ptr + %offset``, adds ``%ptr`` to that value and returns it. The constant folder specifically recognizes the form of this intrinsic and the constant initializers it may load from; if a loaded constant initializer is known to have the form ``i32 trunc(x - %ptr)``, the intrinsic call is folded to ``x``. LLVM provides that the calculation of such a constant initializer will not overflow at link time under the medium code model if ``x`` is an ``unnamed_addr`` function. However, it does not provide this guarantee for a constant initializer folded into a function body. This intrinsic can be used to avoid the possibility of overflows when loading from such a constant. Differential Revision: http://reviews.llvm.org/D18367 llvm-svn: 267223
* Remove unused #include.Rui Ueyama2016-04-221-1/+0
| | | | llvm-svn: 267222
* Move BitcodeCompiler constructor to the .cpp file. NFC.Rui Ueyama2016-04-222-6/+7
| | | | llvm-svn: 267221
* TLI: Only iterate over integer vector typesMatt Arsenault2016-04-221-4/+3
| | | | | | Instead of iterating over all vectors and skipping integers. llvm-svn: 267220
* Inline getInteger as it's too short to be a function. NFC.Rui Ueyama2016-04-221-10/+4
| | | | llvm-svn: 267219
* Update a comment for r267145.Rui Ueyama2016-04-221-1/+2
| | | | llvm-svn: 267218
* DAGCombiner: Relax alignment restriction when changing store typeMatt Arsenault2016-04-224-11/+77
| | | | | | If the target allows the alignment, this should be OK. llvm-svn: 267217
* [PGO] change the interface for createPGOFuncNameMetadata()Rong Xu2016-04-223-7/+9
| | | | | | | | | This patch changes the interface for createPGOFuncNameMetadata() where we add another PGOFuncName argument. Differential Revision: http://reviews.llvm.org/D19433 llvm-svn: 267216
* [unordered] sink unordered stores at end of blocksPhilip Reames2016-04-222-4/+37
| | | | | | The existing code turned out to be completely correct when auditted. Thus, only minor code changes and adding a couple of tests. llvm-svn: 267215
* Fold compares for distinct allocationsSanjoy Das2016-04-222-5/+61
| | | | | | | | | | | | | | | | Summary: We can fold compares to false when two distinct allocations within a function are compared for equality. Patch by Anna Thomas! Reviewers: majnemer, reames, sanjoy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19390 llvm-svn: 267214
* Move uintX_t typedef to the class definition. NFC.Rui Ueyama2016-04-222-3/+3
| | | | | | Now it is doable because LinkerScript is a template class. llvm-svn: 267212
* CodeGen: Use PLT relocations for relative references to unnamed_addr functions.Peter Collingbourne2016-04-2214-58/+155
| | | | | | | | | | | | | The relative vtable ABI (PR26723) needs PLT relocations to refer to virtual functions defined in other DSOs. The unnamed_addr attribute means that the function's address is not significant, so we're allowed to substitute it with the address of a PLT entry. Also includes a bonus feature: addends for COFF image-relative references. Differential Revision: http://reviews.llvm.org/D17938 llvm-svn: 267211
* [unordered] Extend load/store type canonicalization to handle unordered ↵Philip Reames2016-04-222-6/+50
| | | | | | | | operations Extend the type canonicalization logic to work for unordered atomic loads and stores. Note that while this change itself is fairly simple and low risk, there's a reasonable chance this will expose problems in the backends by suddenly generating IR they wouldn't have seen before. Anything of this nature will be an existing bug in the backend (you could write an atomic float load), but this will definitely change the frequency with which such cases are encountered. If you see problems, feel free to revert this change, but please make sure you collect a test case. llvm-svn: 267210
* DAGCombiner: Relax alignment restriction when changing load typeMatt Arsenault2016-04-226-10/+62
| | | | | | If the target allows the alignment, this should still be OK. llvm-svn: 267209
* ELF: Implement basic support for --version-script.Peter Collingbourne2016-04-2214-35/+245
| | | | | | | | | | | | | | | | | | | | This patch only implements support for version scripts of the form: { [ global: symbol1; symbol2; [...]; symbolN; ] local: *; }; No wildcards are supported, other than for the local entry. Symbol versioning is also not supported. It works by introducing a new Symbol flag which tracks whether a symbol appears in the global section of a version script. This patch also simplifies the logic in SymbolBody::isPreemptible(), and teaches it to handle the case where symbols with default visibility in DSOs do not appear in the dynamic symbol table because of a version script. Fixes PR27482. Differential Revision: http://reviews.llvm.org/D19430 llvm-svn: 267208
* Update test.Rafael Espindola2016-04-221-2/+2
| | | | | | Sorry about the noise. llvm-svn: 267207
* [AArch64] Fix optimizeCondBranch logic.Quentin Colombet2016-04-222-6/+6
| | | | | | | | | | | | | The opcode for the optimized branch does not depend on the size of the activate bits in the AND masks, but the AND opcode itself. Indeed, we need to use a X or W variant based on the AND variant not based on whether the mask fits into the related variant. Otherwise, we may end up using the W variant of the optimized branch for 64-bit register inputs! This fixes the last make check verifier issues for AArch64: PR27479. llvm-svn: 267206
* Add missing options that were required to crash.Rafael Espindola2016-04-221-1/+1
| | | | llvm-svn: 267204
* [sanitizer] allow zero first parameter in MmapNoAccess; This is a part of ↵Kostya Serebryany2016-04-221-1/+2
| | | | | | r267094 that has been reverted llvm-svn: 267203
* Add a reduction of the recent bootstrap failure.Rafael Espindola2016-04-221-0/+40
| | | | llvm-svn: 267202
* Reorganize LinkerDriver::link and add comments. NFC.Rui Ueyama2016-04-221-12/+9
| | | | llvm-svn: 267201
* Update an out of date comment.Peter Collingbourne2016-04-221-4/+3
| | | | llvm-svn: 267200
* PM: Port SinkingPass to the new pass managerJustin Bogner2016-04-228-69/+112
| | | | llvm-svn: 267199
* PM: Reorder the functions used for SinkingPass. NFCJustin Bogner2016-04-221-60/+60
| | | | | | This will make the port to the new PM easier to follow. llvm-svn: 267198
* [DeadStoreElimination] Shorten beginning of memset overwritten by later storesJun Bum Lim2016-04-222-26/+161
| | | | | | | | | | | | Summary: This change will shorten memset if the beginning of memset is overwritten by later stores. Reviewers: hfinkel, eeckstein, dberlin, mcrosier Subscribers: mgrang, mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D18906 llvm-svn: 267197
* PM: Port DCE to the new pass managerJustin Bogner2016-04-228-35/+81
| | | | | | | Also add a very basic test, since apparently there aren't any tests for DCE whatsoever to add the new pass version to. llvm-svn: 267196
* Inline SymbolTable::compareCommons and add comments. NFC.Rui Ueyama2016-04-221-14/+18
| | | | llvm-svn: 267195
* Revert "GC entries of SHF_MERGE sections."Rafael Espindola2016-04-227-251/+48
| | | | | | | | | | | | This reverts commit r267164. Revert "Trying to fix the windows build." This reverts commit r267168. Debugging a bootstrap problem. llvm-svn: 267194
* MachineScheduler: Move code to initialize a Candidate out of tryCandidate(); NFCMatthias Braun2016-04-222-36/+38
| | | | llvm-svn: 267191
* [LoopUtils] Extend findStringMetadataForLoop to return the value for metadataAdam Nemet2016-04-222-10/+25
| | | | | | | | | | | | | | | | E.g. for: !1 = {"llvm.distribute", i32 1} it now returns the MDOperand for 1. I will use this in LoopDistribution to check the value of the metadata. Note that the change is backward-compatible with its current use in LoopVersioningLICM. An Optional implicitly converts to a bool depending whether it contains a value or not. llvm-svn: 267190
* MachineScheduler: Limit the size of the ready list.Matthias Braun2016-04-222-1/+11
| | | | | | | | | Avoid quadratic complexity in unusually large basic blocks by limiting the size of the ready lists. Differential Revision: http://reviews.llvm.org/D19349 llvm-svn: 267189
* ELF: Scan for undefined symbols in shlibs and symbols in dynamic lists ↵Peter Collingbourne2016-04-223-2/+55
| | | | | | | | before LTO. This ensures that these features work correctly with bitcode files. llvm-svn: 267188
* [EarlyCSE/CVP] Add stats for CVPs and make sure to account for any Changes.Chad Rosier2016-04-221-4/+9
| | | | llvm-svn: 267187
* Fix a bug involving deferred decl emission and PCHReid Kleckner2016-04-223-2/+36
| | | | | | | | | | | | | | | | For various reasons, involving dllexport and class linkage compuations, we have to wait until after the semicolon after a class declaration to emit inline methods. These are "deferred" decls. Before this change, finishing the tag decl would trigger us to deserialize some PCH so that we could make a "pretty" IR-level type. Deserializing the PCH triggered calls to HandleTopLevelDecl, which, when done, checked the deferred decl list, and emitted some dllexported decls that weren't ready. Avoid this re-entrancy. Deferred decls should not get emitted when a tag is finished, they should only be emitted after a real top level decl in the main file. llvm-svn: 267186
* [AArch64] When creating MRS instruction, make sure the destination register isQuentin Colombet2016-04-222-3/+2
| | | | | | | | declared as a definition. This fixes the machine verifier error for CodeGen/AArch64/nzcv-save.ll. llvm-svn: 267185
* ELF: Implement --export-dynamic-symbol.Peter Collingbourne2016-04-223-0/+10
| | | | llvm-svn: 267184
* ELF: Move Visibility, IsUsedInRegularObj and MustBeInDynSym flags to Symbol.Peter Collingbourne2016-04-228-105/+75
| | | | | | | | | | | | | | These are properties of a symbol name, rather than a particular instance of a symbol in an object file. We can simplify the code by collecting these properties in Symbol. The MustBeInDynSym flag has been renamed ExportDynamic, as its semantics have been changed to be the same as those of --dynamic-list and --export-dynamic-symbol, which do not cause hidden symbols to be exported. Differential Revision: http://reviews.llvm.org/D19400 llvm-svn: 267183
* [LoopVersioningLICM] Add test coverage for llvm.loop.licm_versioning.disableAdam Nemet2016-04-221-0/+104
| | | | | | | | In the next change, I am generalizing the function findStringMetadataForLoop and I want to make sure I don't break this. Looks like there was no coverage for this so far. llvm-svn: 267182
* [LTO] Create Undefined Bitcode symbol when we drop a comdat member.Davide Italiano2016-04-224-19/+81
| | | | | | Differential Revision: http://reviews.llvm.org/D19389 llvm-svn: 267181
* [AArch64][AdvSIMDScalar] Update the kill flags correctly.Quentin Colombet2016-04-222-34/+49
| | | | | | | | | | | | | | | | | | | We used to simply set the kill flags to true when transforming a scalar instruction to a vector one. SrcScalar1 = copy SrcVector1 ... = opScalar SrcScalar1 => SrcScalar1 = copy SrcVector1 ... = opVector SrcVector1<kill> This is obviously wrong. The proper update consists in: 1. Propagate the kill status from the copy to the new opVector 2. Reset the kill status on the copy, since the live-range of SrcVector1 got extended. This fixes some of the machine verifier errors for AArch64 with make check. llvm-svn: 267180
* test: split test into two runsSaleem Abdulrasool2016-04-221-8/+9
| | | | | | | | | | Rather than checking both stdout and stderr simultaneously, split it into two tests. This apparently breaks on Windows where MSVCRT does not buffer output correctly. NFC. Thanks to chapuni for bringing the issue to my attention! llvm-svn: 267179
* [Hexagon] Use common Pat classes for selecting code for intrinsicsKrzysztof Parzyszek2016-04-224-332/+361
| | | | llvm-svn: 267178
* [SimplifyCFG] Add final missing implications to isImpliedTrueByMatchingCmp.Chad Rosier2016-04-222-40/+13
| | | | | | | | | Summary: eq imply [u|s]ge and [u|s]le are true. Remove redundant logic by implementing isImpliedFalseByMatchingCmp(Pred1, Pred2) as isImpliedTrueByMatchingCmp(Pred1, getInversePredicate(Pred2)). llvm-svn: 267177
OpenPOWER on IntegriCloud