summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Make the SelectionDAG graph printer use SDNode::PersistentId labels.James Y Knight2015-10-272-9/+12
| | | | | | | | r248010 changed the -debug output to use short ids, but did not similarly modify the graph printer. Change to be consistent, for ease of cross-reference. llvm-svn: 251465
* Bitcode: Fix more unsigned integer overflow bugs.Peter Collingbourne2015-10-271-7/+7
| | | | llvm-svn: 251464
* [IR] Limit bits used for CallingConv::ID, update testsVedant Kumar2015-10-273-10/+21
| | | | | | | | | | | | Use 10 bits to represent calling convention ID's instead of 13, and update the bitcode compatibility tests accordingly. We now error-out in the bitcode reader when we see bad calling conv ID's. Thanks to rnk and dexonsmith for feedback! Differential Revision: http://reviews.llvm.org/D13826 llvm-svn: 251452
* [AliasSetTracker] Use mod/ref information for UnknownInstrHal Finkel2015-10-271-16/+21
| | | | | | | | | | AliasSetTracker does not need to convert the access mode to ModRefAccess if the new visited UnknownInst has only 'REF' modrefinfo to existing pointers in the sets. Patch by Andrew Zhogin! llvm-svn: 251451
* Create a new interface addSuccessorWithoutWeight(MBB*) in MBB to add ↵Cong Hou2015-10-271-0/+6
| | | | | | | | | | | | | | successors when optimization is disabled. When optimization is disabled, edge weights that are stored in MBB won't be used so that we don't have to store them. Currently, this is done by adding successors with default weight 0, and if all successors have default weights, the weight list will be empty. But that the weight list is empty doesn't mean disabled optimization (as is stated several times in MachineBasicBlock.cpp): it may also mean all successors just have default weights. We should discourage using default weights when adding successors, because it is very easy for users to forget update the correct edge weights instead of using default ones (one exception is that the MBB only has one successor). In order to detect such usages, it is better to differentiate using default weights from the case when optimizations is disabled. In this patch, a new interface addSuccessorWithoutWeight(MBB*) is created for when optimization is disabled. In this case, MBB will try to maintain an empty weight list, but it cannot guarantee this as for many uses of addSuccessor() whether optimization is disabled or not is not checked. But it can guarantee that if optimization is enabled, then the weight list always has the same size of the successor list. Differential revision: http://reviews.llvm.org/D13963 llvm-svn: 251429
* [X86][AVX512] [X86][AVX512] add convert float to halfAsaf Badouh2015-10-271-1/+7
| | | | | | | | convert float to half with mask/maskz for the reg to reg version and mask for the reg to mem version (there is no maskz version for reg to mem). Differential Revision: http://reviews.llvm.org/D14113 llvm-svn: 251409
* [X86] Make elfiamcu an OS, not an environment.Michael Kuperstein2015-10-271-5/+5
| | | | | | | | | | GNU tools require elfiamcu to take up the entire OS field, so, e.g. i?86-*-linux-elfiamcu is not considered a legal triple. Make us compatible. Differential Revision: http://reviews.llvm.org/D14081 llvm-svn: 251390
* Convert cost table lookup functions to return a pointer to the entry or ↵Craig Topper2015-10-271-19/+28
| | | | | | | | | | nullptr instead of the index. This avoid mentioning the table name an extra time and allows the lookup to be done directly in the ifs by relying on the bool conversion of the pointer. While there make use of ArrayRef and std::find_if. llvm-svn: 251382
* [SCEV] Refactor out ScalarEvolution::getDataLayout; NFCSanjoy Das2015-10-271-0/+6
| | | | llvm-svn: 251375
* [LLVMSymbolize] Don't use LLVMSymbolizer::Options in ModuleInfo. NFC.Alexey Samsonov2015-10-261-4/+5
| | | | | | | | | LLVMSymbolizer::Options is mostly used in LLVMSymbolizer class anyway. Let's keep their usage restricted to that class, especially given that it's worth to move ModuleInfo to a different header, independent from the symbolizer class. llvm-svn: 251363
* Initialize BasicAAWrapperPass in it's constructorKeno Fischer2015-10-261-1/+1
| | | | | | | | | | | | Summary: This idiom is used elsewhere in LLVM, but was overlooked here. Reviewers: chandlerc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13628 llvm-svn: 251348
* [LLVMSymbolize] Use std::unique_ptr more extensively to clarify ownership.Alexey Samsonov2015-10-261-3/+2
| | | | llvm-svn: 251336
* [RS4GC] Strip noalias attribute after statepoint rewriteIgor Laevsky2015-10-263-1/+23
| | | | | | | | | We should remove noalias along with dereference and dereference_or_null attributes because statepoint could potentially touch the entire heap including noalias objects. Differential Revision: http://reviews.llvm.org/D14032 llvm-svn: 251333
* Add an (optional) identification block in the bitcodeMehdi Amini2015-10-261-27/+44
| | | | | | | | | | | | | | | | | | | | | | | | Processing bitcode from a different LLVM version can lead to unexpected behavior. The LLVM project guarantees autoupdating bitcode from a previous minor revision for the same major, but can't make any promise when reading bitcode generated from a either a non-released LLVM, a vendor toolchain, or a "future" LLVM release. This patch aims at being more user-friendly and allows a bitcode produce to emit an optional block at the beginning of the bitcode that will contains an opaque string intended to describe the bitcode producer information. The bitcode reader will dump this information alongside any error it reports. The optional block also includes an "epoch" number, monotonically increasing when incompatible changes are made to the bitcode. The reader will reject bitcode whose epoch is different from the one expected. Differential Revision: http://reviews.llvm.org/D13666 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 251325
* [safestack] Fast access to the unsafe stack pointer on AArch64/Android.Evgeniy Stepanov2015-10-261-7/+3
| | | | | | | | | | | | | | | | | | | | | Android libc provides a fixed TLS slot for the unsafe stack pointer, and this change implements direct access to that slot on AArch64 via __builtin_thread_pointer() + offset. This change also moves more code into TargetLowering and its target-specific subclasses to get rid of target-specific codegen in SafeStackPass. This change does not touch the ARM backend because ARM lowers builting_thread_pointer as aeabi_read_tp, which is not available on Android. The previous iteration of this change was reverted in r250461. This version leaves the generic, compiler-rt based implementation in SafeStack.cpp instead of moving it to TargetLoweringBase in order to allow testing without a TargetMachine. llvm-svn: 251324
* BitstreamWriter: Fix integer overflow.Peter Collingbourne2015-10-261-1/+1
| | | | | | | | | | | We were previously overflowing a 32-bit multiply operation when emitting large (>512MB) bitcode files, resulting in corrupted bitcode. Fix by extending one of the operands to 64 bits. There are a few other 32-bit integer types in this code that seem like they also ought to be extended to 64 bits; this will be done separately. llvm-svn: 251323
* ARM/ELF: Better codegen for global variable addresses.Peter Collingbourne2015-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In PIC mode we were previously computing global variable addresses (or GOT entry addresses) by adding the PC, the PC-relative GOT displacement and the GOT-relative symbol/GOT entry displacement. Because the latter two displacements are fixed, we ended up performing one more addition than necessary. This change causes us to compute addresses using a single PC-relative displacement, resulting in a shorter code sequence. This reduces code size by about 4% in a recent build of Chromium for Android. As a result of this change we no longer need to compute the GOT base address in the ARM backend, which allows us to remove the Global Base Reg pass and SDAG lowering for the GOT. We also now no longer use the GOT when addressing a symbol which is known to be defined in the same linkage unit. Specifically, the symbol must have either hidden visibility or a strong definition in the current module in order to not use the the GOT. This is a change from the previous behaviour where we would use the GOT to address externally visible symbols defined in the same module. I think the only cases where this could matter are cases involving symbol interposition, but we don't really support that well anyway. Differential Revision: http://reviews.llvm.org/D13650 llvm-svn: 251322
* Move parts of llvm-symbolizer tool into LLVMSymbolize library.Alexey Samsonov2015-10-261-0/+151
| | | | | | | | | | | | Summary: See http://lists.llvm.org/pipermail/llvm-dev/2015-October/091624.html Reviewers: echristo Subscribers: llvm-commits, aizatsky Differential Revision: http://reviews.llvm.org/D13998 llvm-svn: 251316
* [SCEV] Fix issues found during the review of r251283. NFC.Silviu Baranga2015-10-261-7/+8
| | | | | | | | | | | | | | | Summary: Replace (const SCEVAddRecExpr *) with cast<SCEVAddRecExpr>. Rename SCEVApplyRewriter to SCEVLoopAddRecRewriter (which is a more appropriate name) since the description is "takes a scalar evolution expression and applies the Map (Loop -> SCEV) to all AddRecExprs." Subscribers: llvm-commits, sanjoy Differential Revision: http://reviews.llvm.org/D14065 llvm-svn: 251292
* [SCEV] Factor out common visiting patterns for SCEV rewriters. NFC.Silviu Baranga2015-10-261-93/+44
| | | | | | | | | | | | | | | | | Summary: Add a SCEVRewriteVisitor class which contains the common visiting patterns used when rewriting SCEVs. SCEVParameterRewriter and SCEVApplyRewriter now inherit from SCEVRewriteVisitor (and are therefore much simpler). Reviewers: anemet, mzolotukhin, sanjoy Subscribers: rengolin, llvm-commits, sanjoy Differential Revision: http://reviews.llvm.org/D13242 llvm-svn: 251283
* [Orc] In the CompileOnDemand layer, wrap module ownership in order to preserveLang Hames2015-10-261-19/+46
| | | | | | | | | | | | the module pointer type passed in by the user. The previous ownership scheme, where the user pointer was always moved into a std::shared_ptr, breaks if the user passes in a raw pointer. Discovered while working on the Orc C API, which should be landing shortly. I expect to include a test-case with that. llvm-svn: 251273
* RegionInfo: Correctly expand regionsTobias Grosser2015-10-251-14/+10
| | | | | | | | | | | | | | | | Instead of playing around with dominance to verify if the possible expansion of a scop region is indeed a single entry single exit region, we now distinguish two cases. In case we only append a basic block, all edges entering this basic block need to have come from within the region that is expanded. In case we join two regions, the source basic blocks of the edges that end at the entry node of the region that is appended most be part of either the original region or the region that is appended. This change will be tested through Polly. This fixes llvm.org/PR25242 llvm-svn: 251267
* [ScalarEvolution] Get rid of NDEBUG in header (correctly this time).Davide Italiano2015-10-251-0/+4
| | | | llvm-svn: 251255
* [ScalarEvolution] Get rid of NDEBUG in header.Davide Italiano2015-10-251-6/+0
| | | | llvm-svn: 251249
* Scalarizer for masked.gather and masked.scatter intrinsics.Elena Demikhovsky2015-10-252-0/+18
| | | | | | | | | | When the target does not support these intrinsics they should be converted to a chain of scalar load or store operations. If the mask is not constant, the scalarizer will build a chain of conditional basic blocks. I added isLegalMaskedGather() isLegalMaskedScatter() APIs. Differential Revision: http://reviews.llvm.org/D13722 llvm-svn: 251237
* [X86] Use correct calling convention for MCU psABI libcallsMichael Kuperstein2015-10-251-0/+7
| | | | | | | | | | | | When using the MCU psABI, compiler-generated library calls should pass some parameters in-register. However, since inreg marking for x86 is currently done by the front end, it will not be applied to backend-generated calls. This is a workaround for PR3997, which describes a similar issue for -mregparm. Differential Revision: http://reviews.llvm.org/D13977 llvm-svn: 251223
* [X86] Add support for elfiamcu tripleMichael Kuperstein2015-10-251-1/+6
| | | | | | | | This adds support for the i?86-*-elfiamcu triple, which indicates the IAMCU psABI is used. Differential Revision: http://reviews.llvm.org/D13977 llvm-svn: 251222
* [Support] Add comment to explain why we can't drop NDEBUG.Davide Italiano2015-10-241-0/+5
| | | | | | Discussed with: Benjamin Kramer. llvm-svn: 251210
* [CodeGen] Get rid of NDEBUG to ensure structure stability.Davide Italiano2015-10-242-4/+0
| | | | | | | | | | | I think it's fine to keep this fields around in terms of overhead, I wasn't able to measure any substantial regression while running the test suite, but, in case this causes some regression I'm ready to revert and work on an alternative solution. This was tested building with clang/gcc both in Debug and Release mode and passes the test-suite. llvm-svn: 251209
* Extract out getConstantRangeFromMetadata; NFCSanjoy Das2015-10-241-0/+6
| | | | | | | | | | | | The loop idiom creating a ConstantRange is repeated twice in the codebase, time to give it a name and a home. The loop is also repeated in `rangeMetadataExcludesValue`, but using `getConstantRangeFromMetadata` there would not be an NFC -- the range returned by `getConstantRangeFromMetadata` may contain a value that none of the subranges did. llvm-svn: 251180
* llvm/Transforms/Utils/LoopVersioning.h requires ↵NAKAMURA Takumi2015-10-241-0/+1
| | | | | | llvm/Analysis/LoopAccessAnalysis.h for RuntimePointerChecking::PointerCheck. llvm-svn: 251178
* Fix ADT/UniqueVector.h to resolve implicit dependency.NAKAMURA Takumi2015-10-241-0/+1
| | | | llvm-svn: 251165
* llvm/module.modulemap: AVR.def should be textual header.NAKAMURA Takumi2015-10-241-0/+1
| | | | llvm-svn: 251163
* Add a RAW mode to StringTableBuilder.Rafael Espindola2015-10-232-10/+15
| | | | | | | | | | | | In this mode it just tries to tail merge the strings without imposing any other format constrains. It will not, for example, add a null byte between them. Also add support for keeping a tentative size and offset if we decide to not optimize after all. This will be used shortly in lld for merging SHF_STRINGS sections. llvm-svn: 251153
* Fix the variable names to match the LLVM style.Rafael Espindola2015-10-231-3/+3
| | | | llvm-svn: 251143
* [AVR] Add ELF constants to headersDylan McKay2015-10-233-0/+71
| | | | | | | | Also adds a 'trivial' ELF file. This was generated by assembling and linking a file with the symbol main which contains a single return instruction. llvm-svn: 251096
* Support, IR: silence -Wunused-parameterSaleem Abdulrasool2015-10-233-4/+4
| | | | | | If this is used outside of LLVM with -Werror, this would cause a failure. llvm-svn: 251094
* Add more intrumentation/runtime helper interfaces (NFC)Xinliang David Li2015-10-231-0/+55
| | | | | | | | | | | This patch converts the remaining references to literal strings for names of profile runtime entites (such as profile runtime hook, runtime hook use function, profile init method, register function etc). Also added documentation for all the new interfaces. llvm-svn: 251093
* [CodeGen] Remove usage of NDEBUG in header.Davide Italiano2015-10-231-5/+0
| | | | | | Moreover, this seems unused. llvm-svn: 251081
* Minor bug fix in Profile Name Prefix interfaceXinliang David Li2015-10-221-1/+1
| | | | | | Exposed in uses by clang FE. llvm-svn: 251070
* LoopPass: Remove redoLoop, it isn't used. NFCJustin Bogner2015-10-221-6/+0
| | | | | | | | In r251064 I removed a logically unreachable call to `redoLoop`, and now there aren't any callers of this API at all. Remove the needless complexity. llvm-svn: 251067
* LoopPass: Simplify the API for adding a new loop. NFCJustin Bogner2015-10-221-6/+3
| | | | | | | The insertLoop() API is only used to add new loops, and has confusing ownership semantics. Simplify it by replacing it with addLoop(). llvm-svn: 251064
* Add helper functions and remove hard coded references to instProf related ↵Xinliang David Li2015-10-221-0/+31
| | | | | | | | | | | | name/name-prefixes This is a clean up patch that defines instr prof section and variable name prefixes in a common header with access helper functions. clang FE change will be done as a follow up once this patch is in. Differential Revision: http://reviews.llvm.org/D13919 llvm-svn: 251058
* [SCEV] Opportunistically interpret unsigned constraints as signedSanjoy Das2015-10-221-0/+13
| | | | | | | | | | | | | | | Summary: An unsigned comparision is equivalent to is corresponding signed version if both the operands being compared are positive. Teach SCEV to use this fact when profitable. Reviewers: atrick, hfinkel, reames, nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13687 llvm-svn: 251051
* [SCEV] Teach SCEV some axioms about non-wrapping arithmeticSanjoy Das2015-10-221-0/+8
| | | | | | | | | | | | | | | | | | | Summary: - A s< (A + C)<nsw> if C > 0 - A s<= (A + C)<nsw> if C >= 0 - (A + C)<nsw> s< A if C < 0 - (A + C)<nsw> s<= A if C <= 0 Right now `C` needs to be a constant, but we can later generalize it to be a non-constant if needed. Reviewers: atrick, hfinkel, reames, nlewycky Subscribers: sanjoy, llvm-commits Differential Revision: http://reviews.llvm.org/D13686 llvm-svn: 251050
* Avoid storing a second copy of each string in StringTableBuilder.Rafael Espindola2015-10-221-12/+4
| | | | | | This was only use in the extremely uncommon case of @@@ symbols on ELF. llvm-svn: 251039
* MachineScheduler: Add a way to disable the 'ReduceLatency' heuristicMatthias Braun2015-10-221-1/+5
| | | | llvm-svn: 251037
* CodeGen: increase bits allocated for LegalizeActionsTim Northover2015-10-221-11/+12
| | | | | | | | | | | The array handling CondCodes only allocated 2 bits to describe the desired action for each type. The new addition of a "LibCall" option overflowed this and caused corruption for Custom actions. No in-tree targets have a Custom CondCodeAction, so unfortunately it can't be tested. llvm-svn: 251033
* Change makeLibCall to take an ArrayRef<SDValue> instead of pointer and size. ↵Craig Topper2015-10-221-3/+3
| | | | | | This removes the need to pass a hardcoded size in many places. NFC llvm-svn: 251032
* Use ArrayRef instead of pointer and size. NFCCraig Topper2015-10-221-6/+6
| | | | llvm-svn: 251029
OpenPOWER on IntegriCloud