summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Remove getDataLayout() from Instruction/GlobalValue/BasicBlock/FunctionMehdi Amini2015-03-038-20/+23
| | | | | | | | | | | | | | | | | Summary: This does not conceptually belongs here. Instead provide a shortcut getModule() that provides access to the DataLayout. Reviewers: chandlerc, echristo Reviewed By: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8027 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231147
* Fix the build broken in r231142David Blaikie2015-03-031-1/+1
| | | | | | | | | | I removed the copy ctor, thinking that'd be the end of it - these iterators should be perfectly assignable even from disjoint ranges (as any iterator would be) - exkcept that the member was const. Unconstify it. llvm-svn: 231146
* DAGCombiner::LoadedSlice: Remove explicit copy ctor in favor of the Rule of ZeroDavid Blaikie2015-03-031-3/+0
| | | | | | | This way, the copy assignment operator can be used without hitting the deprecated case in C++11. llvm-svn: 231144
* RewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the ↵David Blaikie2015-03-031-3/+0
| | | | | | | | | | | | Rule of Zero The assertion was just checking a class invariant that's pretty easy to verify by inspection (no mutating operations, and the two non-copy ctors already ensure the state is maintained) so remove the explicit copy ctor in favor of the default, thus allowing the use of the default copy assignment operator without hitting the C++11 deprecation here. llvm-svn: 231143
* CFG::SuccessorIterator: Remove explicit copy assignment, as the default is fineDavid Blaikie2015-03-031-6/+0
| | | | | | | | | There's no reason to disallow assigning an iterator from one range to an iterator that previously iterated over a disjoint range. This then follows the Rule of Zero, allowing implicit copy construction to be used without hitting the case that's deprecated in C++11. llvm-svn: 231142
* CFG::SuccessorIterator::SuccessorProxy:: Expliictly default copy ↵David Blaikie2015-03-031-0/+2
| | | | | | | | construction as it is deprecated in C++11 in the presence of explicit copy assignment. See r231099 for similar issues & details in [Small]BitVector. llvm-svn: 231141
* Teach ComputeNumSignBits about signed divisions.Nadav Rotem2015-03-032-0/+40
| | | | | | | http://reviews.llvm.org/D8028 rdar://20023136 llvm-svn: 231140
* Remove the explicit SDNodeIterator::operator= in favor of the implicit defaultDavid Blaikie2015-03-031-6/+0
| | | | | | | | | | There doesn't seem to be any need to assert that iterator assignment is between iterators over the same node - if you want to reuse an iterator variable to iterate another node, that's perfectly acceptable. Just don't mix comparisons between iterators into disjoint sequences, as usual. llvm-svn: 231138
* Revert "Remove the explicit SDNodeIterator::operator= in favor of the ↵David Blaikie2015-03-0323-91/+60
| | | | | | | | | | | implicit default" Accidentally committed a few more of these cleanup changes than intended. Still breaking these out & tidying them up. This reverts commit r231135. llvm-svn: 231136
* Remove the explicit SDNodeIterator::operator= in favor of the implicit defaultDavid Blaikie2015-03-0323-60/+91
| | | | | | | | | | There doesn't seem to be any need to assert that iterator assignment is between iterators over the same node - if you want to reuse an iterator variable to iterate another node, that's perfectly acceptable. Just don't mix comparisons between iterators into disjoint sequences, as usual. llvm-svn: 231135
* Remove the explicit SUnitIterator::operator= as the default is just fineDavid Blaikie2015-03-031-6/+0
| | | | | | | | | | There doesn't seem to be any need to assert that iterator assignment is between iterators over the same node - if you want to reuse an iterator variable to iterate another node, that's perfectly acceptable. Just don't mix comparisons between iterators into disjoint sequences, as usual. llvm-svn: 231134
* Remove LatencyPriorityQueue::dump because it relies on an implicit copy ctor ↵David Blaikie2015-03-032-15/+0
| | | | | | | | | | | | | which is deprecated in C++11 (due to the presence of a user-declare dtor in the base class) This type could be made copyable (= default a protected copy ctor in the base class, and preferably make the derived class final to avoid risks of providing a slicing copy operation to further derived classes) but it seemed easier to avoid that complexity for a dump function that I assume (by symmetry with ResourcePriorityQueue's dump, which was actively buggy) not often used. llvm-svn: 231133
* Correctly handle -pass-remarks in the gold plugin.Rafael Espindola2015-03-032-5/+19
| | | | llvm-svn: 231132
* [X86][ELF] Correct relocation for DWARF TLS referencesPaul Robinson2015-03-034-11/+20
| | | | | | | | | Previously we had only Linux using DTPOFF for these; all X86 ELF targets should. Fixes a side issue mentioned in PR21077. Differential Revision: http://reviews.llvm.org/D8011 llvm-svn: 231130
* remove enum value names from comments; NFCSanjay Patel2015-03-031-70/+68
| | | | llvm-svn: 231129
* Add support for SunOS function/data sections and associatedEric Christopher2015-03-031-2/+9
| | | | | | | | section gc. Patch by Bill Rushmore. llvm-svn: 231128
* unique_ptrify ResourcePriorityQueue::ResourceModelDavid Blaikie2015-03-032-6/+2
| | | | llvm-svn: 231127
* Remove ResourcePriorityQueue::dump as it relies on copying a non-copyable ↵David Blaikie2015-03-032-16/+0
| | | | | | type which would result in a double-delete llvm-svn: 231126
* [ADT] fail-fast iterators for DenseMapSanjoy Das2015-03-032-20/+138
| | | | | | | | | | | | | | | | | | | | | | This patch was landed in r231035 and reverted because it was buggy. This is fixed version of the same change. Summary: This patch is an attempt at making `DenseMapIterator`s "fail-fast". Fail-fast iterators that have been invalidated due to insertion into the host `DenseMap` deterministically trip an assert (in debug mode) on access, instead of non-deterministically hitting memory corruption issues. Reviewers: dexonsmith, dberlin, ruiu, chandlerc Reviewed By: chandlerc Subscribers: yaron.keren, chandlerc, llvm-commits Differential Revision: http://reviews.llvm.org/D7931 llvm-svn: 231125
* use bool operator shortcut; NFCSanjay Patel2015-03-031-2/+1
| | | | llvm-svn: 231123
* Fixing problem with field initialization orderAndrew Kaylor2015-03-031-2/+2
| | | | llvm-svn: 231122
* Fix PR22762. When emitting a DWARF expression check whether this is theAdrian Prantl2015-03-032-6/+67
| | | | | | | | frame register before checking if there is a DWARF register number for it. Thanks to H.J. Lu for diagnosing this and providing the testcase! llvm-svn: 231121
* Outline cleanup handlers for native Windows C++ exception handlingAndrew Kaylor2015-03-037-111/+357
| | | | | | Differential Revision: http://reviews.llvm.org/D7865 llvm-svn: 231117
* Add the following 64-bit vector integer arithmetic instructions added in POWER8:Kit Barton2015-03-0313-18/+768
| | | | | | | | | | | | | | | | | | | | | | | | | | | | vaddudm vsubudm vmulesw vmulosw vmuleuw vmulouw vmuluwm vmaxsd vmaxud vminsd vminud vcmpequd vcmpequd. vcmpgtsd vcmpgtsd. vcmpgtud vcmpgtud. vrld vsld vsrd vsrad Phabricator review: http://reviews.llvm.org/D7959 llvm-svn: 231115
* DeltaAlgorithm: Provide protected default copy ctor for use by test derived ↵David Blaikie2015-03-032-1/+3
| | | | | | | | | | | | | | | | | | | | class. Without this, use of this copy ctor is deprecated in C++11 due to the presence of a user-declared dtor. Marking the class final is just a little extra security that there are no further derived classes that may then end up using the intermediate base class's copy assignment operator and cause slicing to occur. I didn't bother marking the other (non-test) base class final, since it has reference members so it won't have any implicit assignment operators anyway. Open to ideas on that, though. We probably want a warning about use of a slicing assignment operator, then I wouldn't worry so much about marking the class as final. llvm-svn: 231114
* Remove explicit no-op dtor in favor of the implicit dtor so as not to ↵David Blaikie2015-03-032-4/+0
| | | | | | disable/deprecate the copy operations. llvm-svn: 231113
* Remove no-op dtor so that use of the implicit copy ctor/assignment operator ↵David Blaikie2015-03-031-1/+0
| | | | | | are not deprecated. llvm-svn: 231112
* Add a comment above findRepresentativeClass explaining why it'sEric Christopher2015-03-031-0/+4
| | | | | | where it is so that future generations can understand. llvm-svn: 231111
* Remove explicit copy ctor in favor of the implicit one so that the use of ↵David Blaikie2015-03-031-2/+0
| | | | | | the copy assignment operator is not deprecated. llvm-svn: 231110
* Remove explicit copy assignment operator in favor of the implicit/default to ↵David Blaikie2015-03-031-5/+0
| | | | | | avoid disabling/deprecating the implicit copy ctor. llvm-svn: 231109
* Remove explicit copy ctor in favor of the default so as not to ↵David Blaikie2015-03-031-2/+0
| | | | | | disable/deprecate the implicit copy assignment operator llvm-svn: 231108
* unique_ptrify FullDependenceAnalysis::DVDavid Blaikie2015-03-032-13/+6
| | | | | | | Making this type a little harder to abuse (see workaround relating to use of the implicit copy ctor in the prior commit) llvm-svn: 231104
* FullDependenceAnalysis: Avoid using the (deprecated in C++11) copy ctorDavid Blaikie2015-03-031-23/+22
| | | | llvm-svn: 231103
* Remove some explicit copy assignment operators is favor of implicit ones, as ↵David Blaikie2015-03-031-12/+0
| | | | | | their presence makes the use of the implicit copy ctor deprecated in C++11 llvm-svn: 231102
* Fix PR22750: non-determinism causes assertion failure in DWARF generationDario Domizioli2015-03-031-2/+5
| | | | | | | | | | | | | | | | | | | | | | | The cause of the issue is the interaction of two factors: 1) When generating a DW_TAG_imported_declaration DIE which imports another imported declaration, the code in AsmPrinter/DwarfCompileUnit.cpp asserts that the second imported declaration must already have a DIE. 2) There is a non-determinism in the order in which imported declarations within the same scope are processed. Because of the non-determinism (2), it is possible that an imported declaration is processed before another one it depends on, breaking the assumption in (1). The source of the non-determinism is that the imported declaration DIDescriptors are sorted by scope in DwarfDebug::beginModule(); however that sort is not a stable_sort, therefore the order of the declarations within the same scope is not preserved. The attached patch changes the std::sort to a std::stable_sort and it fixes the problem. Test omitted due to it being non-deterministic and depending on the implementation of std::sort. llvm-svn: 231100
* [Small]BitVector::reference: Explicitly default copy construction as it is ↵David Blaikie2015-03-032-1/+3
| | | | | | | | | | | | | | | | | | | | | deprecated in C++11 in the presence of explicit copy assignment. I tried making these private & friended to the BitVector, but that didn't work - there's one use of BitVector::reference in Clang that actually copies it into a local variable & uses it from there, rather than just using the result of op[] in a temporary expression. Whether or not this is desired is debatable (we could just fix that one use in Clang) & it's not clear which way the C++ standard falls on this for std::bitset's reference type (it has the same bug at least in libstdc++, but Clang's -Wdeprecated doesn't flag it, because it's in a standard header) While it was only BitVector::reference's copy ctor that was referenced by user code, I made SmallBitVector::reference's copy ctor public too, for consistency. llvm-svn: 231099
* Avoid explicitly declaring the copy assignment operator, as this ↵David Blaikie2015-03-031-3/+0
| | | | | | unnecessarily makes the copy ctor deprecated in C++11 llvm-svn: 231095
* Twine: Explicitly default the copy ctor as it's otherwise deprecated in ↵David Blaikie2015-03-031-0/+2
| | | | | | C++11 by the presence of a user-declared copy assignment operator. llvm-svn: 231094
* DenseMapIterator: Avoid explicitly declaring the copy ctor as this makes the ↵David Blaikie2015-03-031-4/+6
| | | | | | copy assignment operator deprecated in C++11 llvm-svn: 231093
* Make Triple::getOSVersion make sense for Android.Dan Albert2015-03-031-0/+8
| | | | | | | | | | | | Reviewers: srhines Reviewed By: srhines Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7928 llvm-svn: 231090
* 80-column fixup.Eric Christopher2015-03-031-1/+2
| | | | llvm-svn: 231088
* Make llvm.eh.begincatch use an outparamReid Kleckner2015-03-039-91/+80
| | | | | | | | | | | | | | Ultimately, __CxxFrameHandler3 needs us to put a stack offset in a table, and it will take responsibility for copying the exception object into that slot. Modelling the exception object as an SSA value returned by begincatch isn't going to work in general, so make it use an output parameter. Reviewers: andrew.w.kaylor Differential Revision: http://reviews.llvm.org/D7920 llvm-svn: 231086
* [AArch64] When combining constant mul of -3, prefer (sub x, (shl x, N)).Chad Rosier2015-03-032-11/+10
| | | | | | This change only effects codegen when the constant is -3. llvm-svn: 231085
* DebugInfo: Move new hierarchy into placeDuncan P. N. Exon Smith2015-03-03380-8179/+7656
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the specialized metadata nodes for the new debug info hierarchy into place, finishing off PR22464. I've done bootstraps (and all that) and I'm confident this commit is NFC as far as DWARF output is concerned. Let me know if I'm wrong :). The code changes are fairly mechanical: - Bumped the "Debug Info Version". - `DIBuilder` now creates the appropriate subclass of `MDNode`. - Subclasses of DIDescriptor now expect to hold their "MD" counterparts (e.g., `DIBasicType` expects `MDBasicType`). - Deleted a ton of dead code in `AsmWriter.cpp` and `DebugInfo.cpp` for printing comments. - Big update to LangRef to describe the nodes in the new hierarchy. Feel free to make it better. Testcase changes are enormous. There's an accompanying clang commit on its way. If you have out-of-tree debug info testcases, I just broke your build. - `upgrade-specialized-nodes.sh` is attached to PR22564. I used it to update all the IR testcases. - Unfortunately I failed to find way to script the updates to CHECK lines, so I updated all of these by hand. This was fairly painful, since the old CHECKs are difficult to reason about. That's one of the benefits of the new hierarchy. This work isn't quite finished, BTW. The `DIDescriptor` subclasses are almost empty wrappers, but not quite: they still have loose casting checks (see the `RETURN_FROM_RAW()` macro). Once they're completely gutted, I'll rename the "MD" classes to "DI" and kill the wrappers. I also expect to make a few schema changes now that it's easier to reason about everything. llvm-svn: 231082
* IR: Add missing API to specialized metadata nodesDuncan P. N. Exon Smith2015-03-032-1/+82
| | | | | | | | | | | | | | | | | | | Add the final bits of API that `DIBuilder` needs before the new nodes can be moved into place. - Add `MDType::clone()` and `MDType::setFlags()` to support `DIBuilder::createTypeWithFlags()`. - Add `MDBasicType::get()` overload that just requires a tag and a name, as a convenience for `DIBuilder::createUnspecifiedType()`. - Add `MDLocalVariable::withInline()` and `MDLocalVariable::withoutInline()` to support `llvm::createInlinedVariable()` and `llvm::cleanseInlinedVariable()`. (Somehow these got lost inside the "move into place" patch I'm about to commit -- better to commit separately!) llvm-svn: 231079
* Make llvm/test/Object/archive-format.test CRLF-tolerant.NAKAMURA Takumi2015-03-031-5/+4
| | | | llvm-svn: 231074
* [X86][Haswell][SchedModel] Fix patterns for scalar FMA3 variants.Michael Kuperstein2015-03-031-2/+2
| | | | llvm-svn: 231073
* AVX-512: Moved patterns for masked load/store under avx_store, avx_load classes.Elena Demikhovsky2015-03-032-74/+94
| | | | | | No functional changes. llvm-svn: 231069
* During PHI elimination, split critical edges that move copies out of loops.Daniel Jasper2015-03-032-8/+51
| | | | | | | | | | | | | | | | | | | | This prevents the behavior observed in llvm.org/PR22369. I am not sure whether I am reading the code correctly, but the early exit based on isLiveOutPastPHIs() seems to make the wrong assumption that RegisterCoalescer won't be able to coalesce those copies later. This change hides the new behavior behind -no-phi-elim-live-out-early-exit as it currently breaks four tests: * Assertion in: CodeGen/Hexagon/hwloop-cleanup.ll * Worse code in: CodeGen/X86/coalescer-commute4.ll CodeGen/X86/phys_subreg_coalesce-2.ll CodeGen/X86/zlib-longest-match.ll The root cause here seems to be that the heuristic that determines the visitation order in RegisterCoalescer gets less lucky. llvm-svn: 231064
* Add range iterators to Extract/InsertValueInst indicesDaniel Berlin2015-03-031-0/+6
| | | | llvm-svn: 231062
OpenPOWER on IntegriCloud