summaryrefslogtreecommitdiffstats
path: root/llvm/include
Commit message (Collapse)AuthorAgeFilesLines
* Avoid using a raw AssumptionCacheTracker in various inliner functions.Sean Silva2016-07-233-20/+17
| | | | | | | | | | This unblocks the new PM part of River's patch in https://reviews.llvm.org/D22706 Conveniently, this same change was needed for D21921 and so these changes are just spun out from there. llvm-svn: 276515
* [SCEV] Make isImpliedCondOperandsViaRanges smarterSanjoy Das2016-07-231-9/+0
| | | | | | | | | | | | This change lets us prove things like "{X,+,10} s< 5000" implies "{X+7,+,10} does not sign overflow" It does this by replacing replacing getConstantDifference by computeConstantDifference (which is smarter) in isImpliedCondOperandsViaRanges. llvm-svn: 276505
* [SCEV] Change the interface of computeConstantDifference; NFCSanjoy Das2016-07-231-4/+8
| | | | | | | This is in preparation of s/getConstantDifference/computeConstantDifference/ in a later change. llvm-svn: 276503
* [LoopDataPrefetch] Include hotness of region in opt remarkAdam Nemet2016-07-221-0/+24
| | | | llvm-svn: 276488
* GlobalISel: allow multiple types on MachineInstrs.Tim Northover2016-07-221-3/+4
| | | | llvm-svn: 276481
* [Coverage] Mark more methods const (NFC)Vedant Kumar2016-07-221-4/+8
| | | | llvm-svn: 276474
* Add invariant start call creation in IRBuilder.NFCAnna Thomas2016-07-221-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D22700 llvm-svn: 276471
* Use RValue refs in APInt add/sub methods.Pete Cooper2016-07-221-25/+58
| | | | | | | | | | | | | This adds versions of operator + and - which are optimized for the LHS/RHS of the operator being RValue's. When an RValue is available, we can use its storage space instead of allocating new space. On code such as ConstantRange which makes heavy use of APInt's over 64-bits in size, this results in significant numbers of saved allocations. Thanks to David Blaikie for all the review and most of the code here. llvm-svn: 276470
* [SCEV] Extract out a helper function; NFCSanjoy Das2016-07-221-0/+9
| | | | | | | The helper will get smarter in a later change, but right now this is just code reorganization. llvm-svn: 276467
* GlobalISel: implement legalization pass, with just one transformation.Tim Northover2016-07-2210-12/+221
| | | | | | | | | This adds the actual MachineLegalizeHelper to do the work and a trivial pass wrapper that legalizes all instructions in a MachineFunction. Currently the only transformation supported is splitting up a vector G_ADD into one acting on smaller vectors. llvm-svn: 276461
* Make PDBFile store an msf::Layout.Zachary Turner2016-07-222-9/+8
| | | | | | | | | | | Previously it was storing all the fields of an msf::Layout as separate members. This is a trivial cleanup to make it store an msf::Layout directly. This makes the code more readable since it becomes clear which fields of PDBFile are actually the msf specific layout information in a sea of other bookkeeping fields. llvm-svn: 276460
* [pdb] Have builders share a single BumpPtrAllocator.Zachary Turner2016-07-223-9/+14
| | | | | | | | | | | | | This makes it easier to have the writable and readable PDB interfaces share code since the read/write and write-only interfaces now share a single allocator, you don't have to worry about a builder building a read only interface and then having the read-only interface's data become corrupt when the builder goes out of scope. Now the allocator is specified explicitly to all constructors, so all interfaces can share a single allocator that is scoped appropriately. llvm-svn: 276459
* [msf] Create LLVMDebugInfoMsfZachary Turner2016-07-2232-340/+374
| | | | | | | | | | | | | | This provides a better layering of responsibilities among different aspects of PDB writing code. Some of the MSF related code was contained in CodeView, and some was in PDB prior to this. Further, we were often saying PDB when we meant MSF, and the two are actually independent of each other since in theory you can have other types of data besides PDB data in an MSF. So, this patch separates the MSF specific code into its own library, with no dependencies on anything else, and DebugInfoCodeView and DebugInfoPDB take dependencies on DebugInfoMsf. llvm-svn: 276458
* [PM] Port BreakCriticalEdges to the new PM.Wei Mi2016-07-221-0/+29
| | | | | | Differential Revision: https://reviews.llvm.org/D22688 llvm-svn: 276449
* Invariant start/end intrinsics overloaded for address spaceAnna Thomas2016-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | Summary: The llvm.invariant.start and llvm.invariant.end intrinsics currently support specifying invariant memory objects only in the default address space. With this change, these intrinsics are overloaded for any adddress space for memory objects and we can use these llvm invariant intrinsics in non-default address spaces. Example: llvm.invariant.start.p1i8(i64 4, i8 addrspace(1)* %ptr) This overloaded intrinsic is needed for representing final or invariant memory in managed languages. Reviewers: apilipenko, reames Subscribers: llvm-commits llvm-svn: 276447
* AMDGPU: Add HSA dispatch id intrinsicMatt Arsenault2016-07-221-20/+32
| | | | llvm-svn: 276437
* GlobalISel: implement alloca instructionTim Northover2016-07-225-14/+59
| | | | llvm-svn: 276433
* [Profile] Cleanup: remove unused interfaceXinliang David Li2016-07-221-7/+1
| | | | llvm-svn: 276431
* [Support] Make ErrorAsOutParameter take an Error* rather than an Error&.Lang Hames2016-07-223-8/+16
| | | | | | | | | | | | | | | | | | | | | | This allows ErrorAsOutParameter to work better with "optional" errors. For example, consider a function where for certain input values it is known that the function can't fail. This can now be written as: Result foo(Arg X, Error *Err) { ErrorAsOutParameter EAO(Err); if (<Error Condition>) { if (Err) *Err = <report error>; else llvm_unreachable("Unexpected failure!"); } } Rather than having to construct an ErrorAsOutParameter under every conditional where Err is known to be non-null. llvm-svn: 276430
* [pdb] Move file layout header structs to RawTypes.hZachary Turner2016-07-224-80/+184
| | | | | | | | This facilitates code reuse between the builder classes and the "frozen" read only versions of the classes used for parsing existing PDB files. llvm-svn: 276427
* [pdb] Round-trip module & file info to/from YAML.Zachary Turner2016-07-224-2/+87
| | | | | | | | | | This implements support for writing compiland and compiland source file info to a binary PDB. This is tested by adding support for dumping these fields from an existing PDB to yaml, reading them back in, and dumping them again and verifying the values are as expected. llvm-svn: 276426
* [X86][AVX] Added support for lowering to VBROADCASTF128/VBROADCASTI128 ↵Simon Pilgrim2016-07-221-10/+0
| | | | | | | | | | | | | | | | (reapplied) As reported on PR26235, we don't currently make use of the VBROADCASTF128/VBROADCASTI128 instructions (or the AVX512 equivalents) to load+splat a 128-bit vector to both lanes of a 256-bit vector. This patch enables lowering from subvector insertion/concatenation patterns and auto-upgrades the llvm.x86.avx.vbroadcastf128.pd.256 / llvm.x86.avx.vbroadcastf128.ps.256 intrinsics to match. We could possibly investigate using VBROADCASTF128/VBROADCASTI128 to load repeated constants as well (similar to how we already do for scalar broadcasts). Reapplied with fix for PR28657 - removed intrinsic definitions (clang companion patch to be be submitted shortly). Differential Revision: https://reviews.llvm.org/D22460 llvm-svn: 276416
* Sync up InstrProfData.inc with compiler-rt with fixes to referencesXinliang David Li2016-07-221-1/+2
| | | | llvm-svn: 276388
* Revert 276386Xinliang David Li2016-07-221-2/+1
| | | | llvm-svn: 276387
* Sync up InstrProfData.inc with compiler-rtXinliang David Li2016-07-221-1/+2
| | | | llvm-svn: 276386
* Avoid dsymutil calls to getFileNameByIndex.Pete Cooper2016-07-221-0/+2
| | | | | | | | | | | | This change adds a hasFileAtIndex method. getChildDeclContext can first call this method, and if it returns true it knows it can then lookup the resolved path cache for the given file index. If we hit that cache then we don't even have to call getFileNameByIndex. Running dsymutil against the swift executable built from github gives a 20% performance improvement without any change in the binary. Differential Revision: https://reviews.llvm.org/D22655 Reviewed by friss. llvm-svn: 276380
* [Profile] deprecate __llvm_profile_override_default_filenameXinliang David Li2016-07-211-0/+4
| | | | | | | | This eliminates unncessary calls and init functions. Differential Revision: http://reviews.llvm.org/D22613 llvm-svn: 276354
* [PM] Port NaryReassociate to the new PMWei Mi2016-07-212-1/+175
| | | | | | Differential Revision: https://reviews.llvm.org/D22648 llvm-svn: 276349
* [PGO] Make needsComdatForCounter() available (NFC)Rong Xu2016-07-211-0/+4
| | | | | | | | | | Move needsComdatForCounter() to lib/ProfileData/InstrProf.cpp from lib/Transforms/Instrumentation/InstrProfiling.cpp to make is available for other files. Differential Revision: https://reviews.llvm.org/D22643 llvm-svn: 276330
* Revert "Invariant start/end intrinsics overloaded for address space"Anna Thomas2016-07-211-2/+2
| | | | | | This reverts commit r276316. llvm-svn: 276320
* Invariant start/end intrinsics overloaded for address spaceAnna Thomas2016-07-211-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: The llvm.invariant.start and llvm.invariant.end intrinsics currently support specifying invariant memory objects only in the default address space. With this change, these intrinsics are overloaded for any adddress space for memory objects and we can use these llvm invariant intrinsics in non-default address spaces. Example: llvm.invariant.start.p1i8(i64 4, i8 addrspace(1)* %ptr) This overloaded intrinsic is needed for representing final or invariant memory in managed languages. Reviewers: tstellarAMD, reames, apilipenko Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22519 llvm-svn: 276316
* [IRTranslator] Add G_SUB opcode.Quentin Colombet2016-07-212-0/+11
| | | | | | This commit adds a generic SUB opcode to global-isel. llvm-svn: 276308
* [IRTranslator] Add G_AND opcode.Quentin Colombet2016-07-212-0/+11
| | | | | | This commit adds a generic AND opcode to global-isel. llvm-svn: 276297
* AMDGPU/SI: Add support for R_AMDGPU_ABS32Konstantin Zhuravlyov2016-07-211-0/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D21646 llvm-svn: 276294
* Weaken ThreadSafeRefCountedBase atomics.Benjamin Kramer2016-07-211-2/+2
| | | | | | | Doesn't make a difference on x86, but avoids memory barriers on weakly-ordered archs like PowerPC and ARM. llvm-svn: 276291
* [DenseMap] Add a C++17-style try_emplace method.Benjamin Kramer2016-07-211-37/+35
| | | | | | | | This provides an elegant pattern to solve the "construct if not in map already" problem we have many times in LLVM. Without try_emplace we either have to rely on a sentinel value (nullptr) or do two lookups. llvm-svn: 276277
* Rename StringMap::emplace_second to try_emplace.Benjamin Kramer2016-07-211-5/+3
| | | | | | | Coincidentally this function maps to the C++17 try_emplace. Rename it for consistentcy with C++17 std::map. NFC. llvm-svn: 276276
* Expose AttributeSetNode, use it to provide aggregate getter for attribute in ↵Amaury Sechet2016-07-212-0/+7
| | | | | | | | | | | | | | the C API. Summary: See D19181 for context. Reviewers: whitequark, Wallbraker, jyknight, echristo, bkramer, void Subscribers: mehdi_amini Differential Revision: http://reviews.llvm.org/D21265 llvm-svn: 276236
* [OptDiag] Missed these when making the IR Value a const pointerAdam Nemet2016-07-211-3/+4
| | | | llvm-svn: 276224
* [OptDiag,LV] Add hotness attribute to applied-optimization remarksAdam Nemet2016-07-212-2/+18
| | | | | | | Test coverage is provided by modifying the function in the FP-math testcase that we are allowed to vectorize. llvm-svn: 276223
* [OptDiag,LV] Add hotness attribute to the derived analysis remarksAdam Nemet2016-07-202-17/+45
| | | | | | | | This includes FPCompute and Aliasing. Testcase is based on no_fpmath.ll. llvm-svn: 276211
* GlobalISel: Remove explicit enumerator values from .def file.Tim Northover2016-07-202-30/+30
| | | | | | | | | | They were all auto-incremented from 0 anyway, and I'm getting really annoying conflicts and runtime failures when different people add more for GlobalISel (and even when I'm refactoring my own patches). NFC. llvm-svn: 276204
* [OptDiag,LV] Add hotness attribute to analysis remarksAdam Nemet2016-07-203-6/+23
| | | | | | | | The earlier change added hotness attribute to missed-optimization remarks. This follows up with the analysis remarks (the ones explaining the reason for the missed optimization). llvm-svn: 276192
* [OptDiag] Take the IR Value as a const pointerAdam Nemet2016-07-201-2/+2
| | | | | | | | This helps because LoopAccessReport is passed around as a const reference and we derive the basic block passed as the Value parameter from the instruction in LoopAccessReport. llvm-svn: 276191
* GlobalISel: implement Legalization querying framework.Tim Northover2016-07-202-0/+158
| | | | | | | This adds an (incomplete, inefficient) framework for deciding what to do with some operation on a given type. llvm-svn: 276184
* [MSSA] Add an overload for getClobberingMemoryAccess.George Burgess IV2016-07-201-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A seemingly common use for the walker's getClobberingMemoryAccess function is: ``` MemoryAccess *getClobber(MemorySSAWalker *W, MemoryUseOrDef *MUD) { const Instruction *I = MUD->getMemoryInst(); return W->getClobberingMemoryAccess(I); } ``` Which is kind of redundant, since walkers will ultimately query MSSA to find out which MemoryAccess `I` maps to (...which is always `MUD`). So, this patch adds an overload of getClobberingMemoryAccess that accepts MemoryAccesses directly. As a result, the Instruction overload of getClobberingMemoryAccess becomes a lightweight wrapper around our new overload. Additionally, this patch un`virtual`izes the Instruction overload of getClobberingMemoryAccess, since there doesn't seem to be a walker that benefits from that being virtual, and I can't think of how else one would implement it. Happy to make it virtual again if we would benefit from doing so. llvm-svn: 276169
* GlobalISel: properly conditionalize LLT use.Tim Northover2016-07-201-2/+0
| | | | | | | We can't guard the include of LowLevelType.h because getType and setType are (trivial) functions even when GlobalISel isn't built. llvm-svn: 276160
* GlobalISel: implement low-level type with just size & vector lanes.Tim Northover2016-07-204-53/+199
| | | | | | | | This should be all the low-level instruction selection needs to determine how to implement an operation, with the remaining context taken from the opcode (e.g. G_ADD vs G_FADD) or other flags not based on type (e.g. fast-math). llvm-svn: 276158
* [OptDiag] Fix function commentAdam Nemet2016-07-201-4/+3
| | | | | | | Function is not passed unlike in the original of this (llvm::emitOptimizationRemarkMissed). llvm-svn: 276150
* move decomposeBitTestICmp() to Transforms/Utils; NFCSanjay Patel2016-07-201-0/+5
| | | | | | | | As noted in https://reviews.llvm.org/D22537 , we can use this functionality in visitSelectInstWithICmp() and InstSimplify, but currently we have duplicated code. llvm-svn: 276140
OpenPOWER on IntegriCloud