summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Use make_range(rbegin(), rend()) to allow foreach loops. NFC.Pete Cooper2015-07-2410-39/+26
| | | | | | | | | | | Instead of the pattern for (auto I = x.rbegin(), E = x.end(); I != E; ++I) we can use make_range to construct the reverse range and iterate using that instead. llvm-svn: 243163
* DI: Fix unit tests after r243160Duncan P. N. Exon Smith2015-07-241-4/+0
| | | | | | These always empty fields are gone, so don't test that they're empty. llvm-svn: 243162
* DI: Remove unnecessary DICompositeTypeBaseDuncan P. N. Exon Smith2015-07-243-85/+51
| | | | | | | | | | | | Remove unnecessary and confusing common base class for `DICompositeType` and `DISubroutineType`. While at a high-level `DISubroutineType` is a sort of composite of other types, it has no shared code paths, and its fields are completely disjoint. This relationship was left over from the old debug info hierarchy. llvm-svn: 243160
* DI: Simplify DebugInfoFinder::processType(), NFCDuncan P. N. Exon Smith2015-07-241-7/+9
| | | | | | | | | | | Handle `DISubroutineType` up-front rather than as part of a branch for `DICompositeTypeBase`. The only shared code path was looking through the base type, but `DISubroutineType` can never have a base type. This also removes the last use of `DICompositeTypeBase`, since we can strengthen the cast to `DICompositeType`. llvm-svn: 243159
* DI: Remove dead code: getDICompositeType()Duncan P. N. Exon Smith2015-07-242-18/+0
| | | | llvm-svn: 243158
* AsmPrinter: Use DICompositeType in updateAcceleratorTables(), NFCDuncan P. N. Exon Smith2015-07-241-1/+1
| | | | | | | | `DISubroutineType` is impossible at this `dyn_cast` site, since we're only dealing with named types and `DISubroutineType` cannot be named. Strengthen the `dyn_cast` to `DICompositeType`. llvm-svn: 243157
* MIR Serialization: Serialize the simple virtual register allocation hints.Alex Lorenz2015-07-246-13/+102
| | | | | | | This commit serializes the virtual register allocations hints of type 0. These hints specify the preferred physical registers for allocations. llvm-svn: 243156
* DI: Remove DIDerivedTypeBaseDuncan P. N. Exon Smith2015-07-243-44/+25
| | | | | | | | | Remove an unnecessary (and confusing) common subclass for `DIDerivedType` and `DICompositeType`. These classes aren't really related, and even in the old debug info hierarchy, there was a long-standing FIXME to separate them. llvm-svn: 243152
* Verifier: Sink filename check into visitMDCompositeType(), NFCDuncan P. N. Exon Smith2015-07-241-19/+6
| | | | | | | | We really only want to check this for unions and classes (all the other tags have been ruled out), so simplify the check and move it to the right place. llvm-svn: 243150
* Verifier: Remove unnecessary references to DW_TAG_subroutine_type, NFCDuncan P. N. Exon Smith2015-07-241-2/+0
| | | | | | | | | Remove unnecessary references to `DW_TAG_subroutine_type` in `visitDICompositeType()` and `visitDIDerivedTypeBase()`, since `visitDISubroutineType()` doesn't call either of those (and shouldn't, since subroutine types are really quite special). llvm-svn: 243149
* DI: Clarify isUnsignedDIType(), NFCDuncan P. N. Exon Smith2015-07-241-17/+18
| | | | | | | | | | | | Refactor `isUnsignedDIType()` to deal with `DICompositeType` explicitly. Since `DW_TAG_subroutine_type` isn't handled here (the assertions about tags rule it out), this allows strengthening the `dyn_cast` to `DIDerivedType`. Besides making the code clearer, this it removes a use of `DIDerivedTypeBase`. llvm-svn: 243148
* Add const to some Type* parameters which didn't need to be mutable. NFC.Pete Cooper2015-07-242-10/+10
| | | | | | | We were only getting the size of the type which doesn't need to modify the type. llvm-svn: 243146
* Remove unused variable. NFC.Diego Novillo2015-07-241-1/+0
| | | | llvm-svn: 243145
* DI: Strengthen some dyn_casts to DIDerivedType, NFCDuncan P. N. Exon Smith2015-07-241-2/+2
| | | | | | | | The surrounding code proves in both cases that these must be `DIDerivedType` if they're `DIDerivedTypeBase`, so strengthen the `dyn_cast`s to the more specific type. llvm-svn: 243143
* Remove the user-count threshold when analyzing read attributesJingyue Wu2015-07-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | | Summary: This threshold limited FunctionAttrs ability to prove arguments to be read-only. In NVPTX, a specialized instruction ld.global.nc can be used to load memory with non-coherent texture cache. We notice that in SHOC [1] benchmark, some function arguments are not marked with readonly because FunctionAttrs reaches a hardcoded threshold when analysis uses. Removing this threshold won't cause significant regression in compilation time, because the worst-case time complexity of the algorithm is still O(# of instructions) for each parameter. Patched by Xuetian Weng. [1] https://github.com/vetter/shoc Reviewers: nlewycky, jingyue, nicholas Subscribers: nicholas, test, llvm-commits Differential Revision: http://reviews.llvm.org/D11311 llvm-svn: 243141
* [RewriteStatepointsForGC] Adjust naming scheme to be more stablePhilip Reames2015-07-248-28/+33
| | | | | | The names for instructions inserted were previous dependent on iteration order. By deriving the names from the original instructions, we can avoid instability in tests without resorting to ordered traversals. It also makes the IR mildly easier to read at large scale. llvm-svn: 243140
* DI: Strengthen block-byref cast to DIDerivedType, NFCDuncan P. N. Exon Smith2015-07-241-1/+1
| | | | | | | This code is visiting the members of a block-byref, and we know those are all `DIDerivedType`. Strengthen the cast. llvm-svn: 243138
* Use foreach loops for StructType::elements(). NFC.Pete Cooper2015-07-243-8/+8
| | | | | | | | | | | | We had a few places where we did for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) { but those could instead do for (auto *EltTy : STy->elements()) { llvm-svn: 243136
* Add const to a bunch of Type* in DataLayout. NFC.Pete Cooper2015-07-242-31/+31
| | | | | | | | Almost all methods in DataLayout took mutable pointers but didn't need to. These were only accessing constant methods of the types, or using the Type* to key a map. Neither of these needs a mutable pointer. llvm-svn: 243135
* DI: Only DICompositeType has getElements(), NFCDuncan P. N. Exon Smith2015-07-242-2/+2
| | | | | | | | There is an assertion inside `DICompositeTypeBase::getElements()` that `this` is not a `DISubroutineType`, leaving only `DICompositeType`. Make that clear at the call sites. llvm-svn: 243134
* MIR Parser: Run the machine verifier after initializing machine functions.Alex Lorenz2015-07-243-4/+31
| | | | llvm-svn: 243128
* [RuntimeDyld] MachO: Add support for ARM scattered vanilla relocations.Lang Hames2015-07-245-38/+53
| | | | llvm-svn: 243126
* MIR Tests: Add liveins and successors to make tests pass with machine verifier.Alex Lorenz2015-07-2410-0/+15
| | | | | | | | This commit adds the liveins and successors properties to machine basic blocks in some of the MIR tests to ensure that the tests will pass when the MIR parser will run the machine verifier after initializing a machine function. llvm-svn: 243124
* MIR Tests: Make the basic block successor test an X86 specific test.Alex Lorenz2015-07-242-58/+80
| | | | | | | | | | | This commit moves and transforms the generic test 'CodeGen/MIR/successor-basic-blocks.mir' into an X86 specific test 'CodeGen/MIR/X86/successor-basic-blocks.mir'. This change is required in order to enable the machine verifier for the MIR parser, as the machine verifier verifies that the machine basic blocks contain instructions that actually determine the machine basic block successors. llvm-svn: 243123
* AVX-512: Implemented encoding , DAG lowering and intrinsics for Integer ↵Igor Breger2015-07-2418-137/+4657
| | | | | | | | | | Truncate with/without saturation Added tests for DAG lowering ,encoding and intrinsic Differential Revision: http://reviews.llvm.org/D11218 llvm-svn: 243122
* Update for r243115 which changed the DataLayout API on TargetMachine butChandler Carruth2015-07-241-2/+1
| | | | | | didn't update the gold-plugin. llvm-svn: 243121
* test-release.sh: Defer test errors until the endHans Wennborg2015-07-241-4/+27
| | | | | | | | | | | | | This makes the script run to the end and produce tarballs even on test failures, and then highlights any errors afterwards. (I first tried just storing the errors in a global variable, but that didn't work as the "test_llvmCore" function invocation is actually running as a sub-shell.) Differential Revision: http://reviews.llvm.org/D11478 llvm-svn: 243116
* Remove access to the DataLayout in the TargetMachineMehdi Amini2015-07-2417-61/+75
| | | | | | | | | | | | | | | | | | | | | | Summary: Replace getDataLayout() with a createDataLayout() method to make explicit that it is intended to create a DataLayout only and not accessing it for other purpose. This change is the last of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11103 (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea) From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243114
* fix wrong comment; NFCSanjay Patel2015-07-241-1/+1
| | | | llvm-svn: 243113
* llvm/test/tools/dsymutil/ARM/lit.local.cfg: Fix possibly typo, s/X86/ARM/.NAKAMURA Takumi2015-07-241-1/+1
| | | | llvm-svn: 243106
* [ARM] - Fix lowering of shufflevectors in AArch32Luke Cheeseman2015-07-245-38/+221
| | | | | | | | | | | | | | | | | | | Some shufflevectors are currently being incorrectly lowered in the AArch32 backend as the existing checks for detecting the NEON operations from the shufflevector instruction expects the shuffle mask and the vector operands to be of the same length. This is not always the case as the mask may be twice as long as the operand; here only the lower half of the shufflemask gets checked, so provided the lower half of the shufflemask looks like a vector transpose (or even is just all -1 for undef) then the intrinsics may get incorrectly lowered into a vector transpose (VTRN) instruction. This patch fixes this by accommodating for both cases and adds regression tests. Differential Revision: http://reviews.llvm.org/D11407 llvm-svn: 243103
* When lowering vector shifts a check is performed to see if the value to shift byLuke Cheeseman2015-07-243-17/+27
| | | | | | | | | | | | is an immediate, in this check the value is negated and stored in and int64_t. The value can be -2^63 yet the result cannot be stored in an int64_t and this gives some undefined behaviour causing failures. The negation is only necessary when the values is within a certain range and so it should not need to negate -2^63, this patch introduces this and also a regression test. Differential Revision: http://reviews.llvm.org/D11408 llvm-svn: 243100
* [dsymutil] Implement support for universal mach-o object files.Frederic Riss2015-07-2413-107/+300
| | | | | | | | | | | | | This patch allows llvm-dsymutil to read universal (aka fat) macho object files and archives. The patch touches nearly everything in the BinaryHolder, but it is fairly mechinical: the methods that returned MemoryBufferRefs or ObjectFiles now return a vector of those, and the high-level access function takes a triple argument to select the architecture. There is no support yet for handling fat executables and thus no support for writing fat object files. llvm-svn: 243096
* [dsymutil] Make the triple detection more strict.Frederic Riss2015-07-249-18/+24
| | | | | | | | MachOObjectFile offers a method for detecting the correct triple, use it instead of the previous approximation. This doesn't matter right now, but it will become important for mach-o universal (fat) binaries. llvm-svn: 243095
* [dsymutil] Refactor BinaryHolder internals. NFCFrederic Riss2015-07-242-4/+15
| | | | | | | | Call a helper that resets all the internal state of the BinaryHolder when we change the underlying memory buffer. Makes a followup patch a tiny bit smaller. llvm-svn: 243094
* Revert "Remove access to the DataLayout in the TargetMachine"Mehdi Amini2015-07-2417-75/+61
| | | | | | | | | | This reverts commit 0f720d984f419c747709462f7476dff962c0bc41. It breaks clang too badly, I need to prepare a proper patch for clang first. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243089
* [bpf] initial support for debug_infoAlexei Starovoitov2015-07-243-9/+22
| | | | llvm-svn: 243087
* [llvm-reaobj] Display COFF-specific sections/tables only if the object is COFF.Davide Italiano2015-07-241-9/+10
| | | | | | Just skip them otherwise. llvm-svn: 243086
* Handle resolvable branches in complete loop unroll heuristic.Michael Zolotukhin2015-07-242-2/+267
| | | | | | | | | | | | | | Summary: Resolving a branch allows us to ignore blocks that won't be executed, and thus make our estimate more accurate. This patch is intended to be applied after D10205 (though it could be applied independently). Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10206 llvm-svn: 243084
* Remove access to the DataLayout in the TargetMachineMehdi Amini2015-07-2417-61/+75
| | | | | | | | | | | | | | | | | | | | | | Summary: Replace getDataLayout() with a createDataLayout() method to make explicit that it is intended to create a DataLayout only and not accessing it for other purpose. This change is the last of a series of commits dedicated to have a single DataLayout during compilation by using always the one owned by the module. Reviewers: echristo Subscribers: jholewinski, llvm-commits, rafael, yaron.keren Differential Revision: http://reviews.llvm.org/D11103 (cherry picked from commit 5609fc56bca971e5a7efeaa6ca4676638eaec5ea) From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 243083
* build: fix small typo in cmake doxygen buildSaleem Abdulrasool2015-07-241-1/+1
| | | | | | | | | A search word spelled as "searhc" in the LLVM_DOXYGEN_SEARCHENGINE_URL cmake variable docstring. Patch by Daniel Otero! llvm-svn: 243082
* MIRParser/LLVMBuild.txt: Add MC for MCRegisterInfo::getDwarfRegNum().NAKAMURA Takumi2015-07-241-1/+1
| | | | llvm-svn: 243081
* Reorder alphabetically.NAKAMURA Takumi2015-07-241-1/+1
| | | | llvm-svn: 243080
* Clean up function attributes on PPC fast-isel tests.Eric Christopher2015-07-2416-145/+145
| | | | llvm-svn: 243079
* [libFuzzer] allow users to supply their own implementation of randKostya Serebryany2015-07-2410-32/+85
| | | | llvm-svn: 243078
* [RewriteStatepointsForGC] Fix release build warningPhilip Reames2015-07-241-0/+2
| | | | llvm-svn: 243076
* Add missing underlines for a docs section. NFCJonathan Roelofs2015-07-241-0/+1
| | | | llvm-svn: 243075
* [RewriteStatepointsForGC] Use a worklist algorithm for first part of base ↵Philip Reames2015-07-241-36/+39
| | | | | | | | | | pointer algorithm [NFC] The new code should hopefully be equivalent to the old code; it just uses a worklist to track instructions which need to visited rather than iterating over all instructions visited each time. This should be faster, but the primary benefit is that the purpose should be more clear and the diff of adding another instruction type (forthcoming) much more obvious. Differential Revision: http://reviews.llvm.org/D11480 llvm-svn: 243071
* test commit, only added one spaceLawrence Hu2015-07-231-1/+1
| | | | llvm-svn: 243070
* [NaryReassociate] remove redundant codeJingyue Wu2015-07-231-5/+0
| | | | | | This check is already done by findClosestMatchingDominator. llvm-svn: 243065
OpenPOWER on IntegriCloud