summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* IR: Add MDLocation::getTemporary()Duncan P. N. Exon Smith2015-01-192-0/+13
| | | | llvm-svn: 226502
* IR: Remove MDNodeFwdDeclDuncan P. N. Exon Smith2015-01-1913-95/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove `MDNodeFwdDecl` (as promised in r226481). Aside from API changes, there's no real functionality change here. `MDNode::getTemporary()` now forwards to `MDTuple::getTemporary()`, which returns a tuple with `isTemporary()` equal to true. The main point is that we can now add temporaries of other `MDNode` subclasses, needed for PR22235 (I introduced `MDNodeFwdDecl` in the first place because I didn't recognize this need, and thought they were only needed to handle forward references). A few things left out of (or highlighted by) this commit: - I've had to remove the (few) uses of `std::unique_ptr<>` to deal with temporaries, since the destructor is no longer public. `getTemporary()` should probably return the equivalent of `std::unique_ptr<T, MDNode::deleteTemporary>`. - `MDLocation::getTemporary()` doesn't exist yet (worse, it actually does exist, but does the wrong thing: `MDNode::getTemporary()` is inherited and returns an `MDTuple`). - `MDNode` now only has one subclass, `UniquableMDNode`, and the distinction between them is actually somewhat confusing. I'll fix those up next. llvm-svn: 226501
* [Hexagon] Updating muxir/ri/ii intrinsics. Setting predicate registers as ↵Colin LeMahieu2015-01-194-101/+129
| | | | | | compatible with i32 rather than doing custom type conversion. llvm-svn: 226500
* IR: Extract out and reuse `storeImpl()`, NFCDuncan P. N. Exon Smith2015-01-192-28/+22
| | | | llvm-svn: 226499
* IR: Extract out getUniqued(), NFCDuncan P. N. Exon Smith2015-01-191-28/+24
| | | | llvm-svn: 226498
* IR: Reuse `getImpl()` for `getDistinct()`, NFCDuncan P. N. Exon Smith2015-01-192-63/+72
| | | | | | | | Merge `getDistinct()`'s implementation with those of `get()` and `getIfExists()` for both `MDTuple` and `MDLocation`. This will make it easier to scale to supporting temporaries. llvm-svn: 226497
* IR: Move replaceAllUsesWith() back up to MDNodeDuncan P. N. Exon Smith2015-01-191-5/+9
| | | | | | | Move `MDNodeFwdDecl::replaceAllUsesWith()` back up to `MDNode`, but assert `isTemporary()`. llvm-svn: 226495
* IR: Be specific about what MDNode::get() returns, NFCDuncan P. N. Exon Smith2015-01-191-8/+8
| | | | llvm-svn: 226494
* Remove dead code, NFCDuncan P. N. Exon Smith2015-01-191-3/+0
| | | | llvm-svn: 226493
* IR: Simplify MDNode::setOperand(), NFCDuncan P. N. Exon Smith2015-01-191-5/+1
| | | | llvm-svn: 226492
* IR: Simplify handleChangedOperand() fast path, NFCDuncan P. N. Exon Smith2015-01-191-3/+1
| | | | | | | Use `isUniqued()` instead of `isStoredDistinctInContext()`, and remove an assertion that won't be valid once temporaries are merged back in. llvm-svn: 226491
* IR: Remove direct comparisons against Metadata::Storage, NFCDuncan P. N. Exon Smith2015-01-191-3/+3
| | | | llvm-svn: 226490
* IR: Assert that resolve() is only called on uniqued nodes, NFCDuncan P. N. Exon Smith2015-01-191-1/+3
| | | | | | | | | Add an assertion in `UniquableMDNode::resolve()` to prevent temporaries from being resolved (once they're merged back in). Needed to shuffle order of `resolve()` and `storeDistinctInContext()` to prevent it from firing. llvm-svn: 226489
* IR: Remove isa<UniquableMDNode>, NFCDuncan P. N. Exon Smith2015-01-191-1/+1
| | | | llvm-svn: 226488
* IR: Simplify DIBuilder::trackIfUnresolved(), NFCDuncan P. N. Exon Smith2015-01-191-8/+6
| | | | llvm-svn: 226487
* IR: Remove isa<MDNodeFwdDecl>, NFCDuncan P. N. Exon Smith2015-01-191-4/+1
| | | | llvm-svn: 226486
* IR: Unify code for MDNode::isResolved(), NFCDuncan P. N. Exon Smith2015-01-192-17/+11
| | | | | | | | | | Unify the definitions of `MDNode::isResolved()` and `UniquableMDNode::isResolved()`. Previously, `UniquableMDNode` could answer this question more efficiently, but now that RAUW support has been unified with `MDNodeFwdDecl`, `MDNode` doesn't need any casts to figure out the answer. llvm-svn: 226485
* IR: Store RAUW support and Context in the same pointer, NFCDuncan P. N. Exon Smith2015-01-194-24/+135
| | | | | | | | | | | | | | Add an `LLVMContext &` to `ReplaceableMetadataImpl`, create a class that either holds a reference to an `LLVMContext` or owns a `ReplaceableMetadataImpl`, and use the new class in `MDNode`. - This saves a pointer in `UniquableMDNode` at the cost of a pointer in `ValueAsMetadata` (which didn't used to store the `LLVMContext`). There are far more of the former. - Unifies RAUW support between `MDNodeFwdDecl` (which is going away, see r226481) and `UniquableMDNode`. llvm-svn: 226484
* [Hexagon] Converting intrinsics combine imm/imm, simple shifts and extends.Colin LeMahieu2015-01-193-0/+135
| | | | llvm-svn: 226483
* IR: Add isUniqued() and isTemporary()Duncan P. N. Exon Smith2015-01-194-12/+32
| | | | | | | | Change `MDNode::isDistinct()` to only apply to 'distinct' nodes (not temporaries), and introduce `MDNode::isUniqued()` and `MDNode::isTemporary()` for the other two possibilities. llvm-svn: 226482
* IR: Use an enum to describe Metadata storage, NFCDuncan P. N. Exon Smith2015-01-192-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | More clearly describe the type of storage used for `Metadata`. - `Uniqued`: uniqued, stored in the context. - `Distinct`: distinct, stored in the context. - `Temporary`: not owned by anyone. This is the first in a series of commits to fix a design problem with `MDNodeFwdDecl` that I need to solve for PR22235. While `MDNodeFwdDecl` works well as a forward declaration, we use `MDNode::getTemporary()` for more than forward declarations -- we also need to create early versions of nodes (with fields not filled in) that we'll fill out later (see `DIBuilder::finalize()` and `CGDebugInfo::finalize()` for examples). This was a blind spot I had when I introduced `MDNodeFwdDecl` (which David Blaikie (indirectly) highlighted in an unrelated review [1]). [1]: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150112/252381.html In general, we need `MDTuple::getTemporary()` to give a temporary tuple (like `MDNodeFwdDecl`), `MDLocation::getTemporary()` to give a temporary location, and (the problem at hand) `GenericDebugMDNode::getTemporary()` to give a temporary generic debug node. So I need to fold the idea of "temporary" nodes back into `UniquableMDNode`. (More commits to follow as I refactor.) llvm-svn: 226481
* [Hexagon] Converting remaining ALU32/ALU intrinsics.Colin LeMahieu2015-01-194-29/+60
| | | | llvm-svn: 226480
* [Hexagon] Converting ALU32/ALU intrinsics to new patterns.Colin LeMahieu2015-01-192-30/+141
| | | | llvm-svn: 226478
* Remove support for DIVariable's FlagIndirectVariable and expectAdrian Prantl2015-01-1918-69/+45
| | | | | | | | | | | | | | | frontends to use a DIExpression with a DW_OP_deref instead. This is not only a much more natural place for this informationl; there is also a technical reason: The FlagIndirectVariable is used to mark a variable that is turned into a reference by virtue of the calling convention; this happens for example to aggregate return values. The inliner, for example, may actually need to undo this indirection to correctly represent the value in its new context. This is impossible to implement because the DIVariable can't be safely modified. We can however safely construct a new DIExpression on the fly. llvm-svn: 226476
* [AArch64] Implement GHC calling conventionGreg Fitzgerald2015-01-196-1/+151
| | | | | | | | | | Original patch by Luke Iannini. Minor improvements and test added by Erik de Castro Lopo. Differential Revision: http://reviews.llvm.org/D6877 From: Erik de Castro Lopo <erikd@mega-nerd.com> llvm-svn: 226473
* [Hexagon] Converting halfword to double accumulating multiply intrinsics.Colin LeMahieu2015-01-192-141/+440
| | | | llvm-svn: 226472
* Produce errors when an assignment expression would use a common symbol.Rafael Espindola2015-01-193-1/+23
| | | | | | | | | | | An assignment will produce a symbol with a given section and offset. There is no way to represent something like "1 byte after a common symbol". This matches the behavior of GNU as. Part of PR22217. llvm-svn: 226470
* [ARM] SSAT/USAT with an 'asr #32' shift should result in an undefined ↵Bradley Smith2015-01-192-2/+5
| | | | | | encoding rather than unpredictable llvm-svn: 226469
* [ARM] Fixup sign extend instruction availability w.r.t. DSP extensionBradley Smith2015-01-192-22/+57
| | | | llvm-svn: 226468
* Bring r226038 back.Rafael Espindola2015-01-1915-137/+63
| | | | | | | | | | | | | | | | No change in this commit, but clang was changed to also produce trivial comdats when needed. Original message: Don't create new comdats in CodeGen. This patch stops the implicit creation of comdats during codegen. Clang now sets the comdat explicitly when it is required. With this patch clang and gcc now produce the same result in pr19848. llvm-svn: 226467
* [PM] Replace the Pass argument to SplitEdge with specific analyses usedChandler Carruth2015-01-197-25/+15
| | | | | | | | | | | | | | | and updated. This may appear to remove handling for things like alias analysis when splitting critical edges here, but in fact no callers of SplitEdge relied on this. Similarly, all of them wanted to preserve LCSSA if there was any update of the loop info. That makes the interface much simpler. With this, all of BasicBlockUtils.h is free of Pass arguments and prepared for the new pass manager. This is tho majority of utilities that relied on pass arguments. llvm-svn: 226459
* [PM] Cleanup a dead option to critical edge splitting that I noticedChandler Carruth2015-01-192-15/+4
| | | | | | | | | while refactoring this API for the new pass manager. No functionality changed here, the code didn't actually support this option. llvm-svn: 226457
* [PM] Remove the Pass argument from all of the critical edge splittingChandler Carruth2015-01-199-75/+141
| | | | | | | | | | | | | | | | | | | APIs and replace it and numerous booleans with an option struct. The critical edge splitting API has a really large surface of flags and so it seems worth burning a small option struct / builder. This struct can be constructed with the various preserved analyses and then flags can be flipped in a builder style. The various users are now responsible for directly passing along their analysis information. This should be enough for the critical edge splitting to work cleanly with the new pass manager as well. This API is still pretty crufty and could be cleaned up a lot, but I've focused on this change just threading an option struct rather than a pass through the API. llvm-svn: 226456
* [NFC] Update createMachineScheduler() commentSergey Dmitrouk2015-01-191-1/+1
| | | | | | It became invalid after signature changes. llvm-svn: 226455
* Suppress the newly added Clang warning for the inaccessible base in thisChandler Carruth2015-01-191-4/+4
| | | | | | | | test. Do that after we suppress the warnings for unknown pragmas as this warning flag is quite new in Clang and so old Clang's would warn all the time on this file. llvm-svn: 226444
* [PM] Relax asserts and always try to reconstruct loop simplify form whenChandler Carruth2015-01-191-10/+4
| | | | | | | | | | | | | | | | | we can while splitting critical edges. The only code which called this and didn't require simplified loops to be preserved is polly, and the code behaves correctly there anyways. Without this change, it becomes really hard to share this code with the new pass manager where things like preserving loop simplify form don't make any sense. If anyone discovers this code behaving incorrectly, what it *should* be testing for is whether the loops it needs to be in simplified form are in fact in that form. It should always be trying to preserve that form when it exists. llvm-svn: 226443
* SLPVectorizer: limit the number of alias checks to reduce the runtime.Erik Eckstein2015-01-191-1/+16
| | | | | | | | In case of blocks with many memory-accessing instructions, alias checking can take lot of time (because calculating the memory dependencies has quadratic complexity). I chose a limit which resulted in no changes when running the benchmarks. llvm-svn: 226439
* [PowerPC] Minor correction to r226432Hal Finkel2015-01-191-2/+1
| | | | | | | | | | We don't need to exclude patchpoints from the implicit r2 dependence in FastISel because it is added as an implicit operand and, thus, should not confuse that StackMap code. By inspection / no test case. llvm-svn: 226434
* [MIScheduler] Slightly better handling of constrainLocalCopy when both ↵Michael Kuperstein2015-01-194-21/+61
| | | | | | | | | | source and dest are local This fixes PR21792. Differential Revision: http://reviews.llvm.org/D6823 llvm-svn: 226433
* [PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2Hal Finkel2015-01-193-7/+20
| | | | | | | | | | | Our PPC64 ELF V2 call lowering logic added r2 as an operand to all direct call instructions in order to represent the dependency on the TOC base pointer value. Restricting this to ELF V2, however, does not seem to make sense: calls under ELF V1 have the same dependence, and indirect calls have an r2 dependence just as direct ones. Make sure the dependence is noted for all calls under both ELF V1 and ELF V2. llvm-svn: 226432
* [x86] Change AVX512 intrinsics to take a 8-bit immediate for the comparision ↵Craig Topper2015-01-194-10/+43
| | | | | | kind instead of a 32-bit immediate. This better aligns with the emitted instruction. It also matches SSE and AVX1 equivalents. Also add auto upgrade support. llvm-svn: 226430
* [tinyptrvector] Add in a MutableArrayRef implicit conversion operator to ↵Michael Gottesman2015-01-192-0/+30
| | | | | | complement the ArrayRef implicit conversion operator. llvm-svn: 226428
* [PM] Lift the analyses into the interface forChandler Carruth2015-01-197-20/+21
| | | | | | | | | | SplitLandingPadPredecessors and remove the Pass argument from its interface. Another step to the utilities being usable with both old and new pass managers. llvm-svn: 226426
* Change using => typedef to please the MSVC bots.Michael Gottesman2015-01-191-3/+3
| | | | llvm-svn: 226425
* Hide the state of TinyPtrVector and remove the single element constructor.Michael Gottesman2015-01-191-7/+11
| | | | | | | | There is no reason for this state to be exposed as public. The single element constructor was superfulous in light of the single element ArrayRef constructor. llvm-svn: 226424
* Reorder.NAKAMURA Takumi2015-01-195-5/+5
| | | | llvm-svn: 226419
* [CMake] examples/Kaleidoscope: Prune redundant libdeps.NAKAMURA Takumi2015-01-195-9/+0
| | | | llvm-svn: 226418
* [CMake] Update libdeps in examples/Kaleidoscope/Chapter4.NAKAMURA Takumi2015-01-191-0/+1
| | | | llvm-svn: 226417
* unique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizerDavid Blaikie2015-01-185-29/+22
| | | | llvm-svn: 226416
* Attempt to fix the MSVC build by working around a layering issueDavid Blaikie2015-01-181-1/+1
| | | | | | | | Since MCStreamer isn't part of Support, the dtor can't be called from here - so just pass by reference instead. This is rather imperfect, but will hopefully suffice. llvm-svn: 226415
OpenPOWER on IntegriCloud