Commit Graph

114547 Commits

Author SHA1 Message Date
David Blaikie
fdba200203 Remove the explicit SDNodeIterator::operator= in favor of the implicit default
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231138 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 21:26:17 +00:00
David Blaikie
317ccafdbd Revert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default"
Accidentally committed a few more of these cleanup changes than
intended. Still breaking these out & tidying them up.

This reverts commit r231135.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231136 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 21:18:16 +00:00
David Blaikie
b13215ec3b Remove the explicit SDNodeIterator::operator= in favor of the implicit default
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231135 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 21:17:08 +00:00
David Blaikie
113c43b2c6 Remove the explicit SUnitIterator::operator= as the default is just fine
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 21:17:00 +00:00
David Blaikie
fd9cb11cd4 Remove LatencyPriorityQueue::dump because it relies on an implicit copy ctor 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231133 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 21:16:56 +00:00
Rafael Espindola
0685d06674 Correctly handle -pass-remarks in the gold plugin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231132 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 21:11:13 +00:00
Paul Robinson
1f8fa31e5d [X86][ELF] Correct relocation for DWARF TLS references
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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231130 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 21:01:27 +00:00
Sanjay Patel
4549d733da remove enum value names from comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231129 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:58:35 +00:00
Eric Christopher
221418eee1 Add support for SunOS function/data sections and associated
section gc.

Patch by Bill Rushmore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231128 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:54:29 +00:00
David Blaikie
0bec909f40 unique_ptrify ResourcePriorityQueue::ResourceModel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231127 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:49:08 +00:00
David Blaikie
d6b76f9466 Remove ResourcePriorityQueue::dump as it relies on copying a non-copyable type which would result in a double-delete
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231126 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:49:05 +00:00
Sanjoy Das
4b7263d855 [ADT] fail-fast iterators for DenseMap
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231125 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:46:45 +00:00
Sanjay Patel
d885b861e6 use bool operator shortcut; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231123 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:41:27 +00:00
Andrew Kaylor
630bf05f92 Fixing problem with field initialization order
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231122 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:22:09 +00:00
Adrian Prantl
e8e51a18a2 Fix PR22762. When emitting a DWARF expression check whether this is the
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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231121 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:12:52 +00:00
Andrew Kaylor
83eaade2b4 Outline cleanup handlers for native Windows C++ exception handling
Differential Revision: http://reviews.llvm.org/D7865



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231117 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 20:00:16 +00:00
Kit Barton
40057e8ee8 Add the following 64-bit vector integer arithmetic instructions added in POWER8:
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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231115 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:55:45 +00:00
David Blaikie
7462aeac16 DeltaAlgorithm: Provide protected default copy ctor for use by test derived 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231114 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:53:04 +00:00
David Blaikie
394b3ac916 Remove explicit no-op dtor in favor of the implicit dtor so as not to disable/deprecate the copy operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:53:02 +00:00
David Blaikie
b858734918 Remove no-op dtor so that use of the implicit copy ctor/assignment operator are not deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:52:59 +00:00
Eric Christopher
7b1d76b9e5 Add a comment above findRepresentativeClass explaining why it's
where it is so that future generations can understand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231111 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:47:14 +00:00
David Blaikie
dddc3986e3 Remove explicit copy ctor in favor of the implicit one so that the use of the copy assignment operator is not deprecated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231110 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:29:14 +00:00
David Blaikie
7ff255b5f2 Remove explicit copy assignment operator in favor of the implicit/default to avoid disabling/deprecating the implicit copy ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231109 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:29:13 +00:00
David Blaikie
f9a9c6f660 Remove explicit copy ctor in favor of the default so as not to disable/deprecate the implicit copy assignment operator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231108 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:29:11 +00:00
David Blaikie
6e274fd1ab unique_ptrify FullDependenceAnalysis::DV
Making this type a little harder to abuse (see workaround relating to
use of the implicit copy ctor in the prior commit)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231104 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:20:18 +00:00
David Blaikie
9fefa526a2 FullDependenceAnalysis: Avoid using the (deprecated in C++11) copy ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231103 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:20:16 +00:00
David Blaikie
f7699e85c0 Remove some explicit copy assignment operators is favor of implicit ones, as their presence makes the use of the implicit copy ctor deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231102 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 19:20:13 +00:00
Dario Domizioli
2a6c6e914a Fix PR22750: non-determinism causes assertion failure in DWARF generation
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.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231100 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:40:53 +00:00
David Blaikie
f5e27edc7b [Small]BitVector::reference: Explicitly default copy construction as it is 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231099 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:39:00 +00:00
David Blaikie
24a7df3690 Avoid explicitly declaring the copy assignment operator, as this unnecessarily makes the copy ctor deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231095 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:29:27 +00:00
David Blaikie
6283687346 Twine: Explicitly default the copy ctor as it's otherwise deprecated in C++11 by the presence of a user-declared copy assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231094 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:29:25 +00:00
David Blaikie
88f45e5ecd DenseMapIterator: Avoid explicitly declaring the copy ctor as this makes the copy assignment operator deprecated in C++11
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231093 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:29:23 +00:00
Dan Albert
a33c652878 Make Triple::getOSVersion make sense for Android.
Reviewers: srhines

Reviewed By: srhines

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7928

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231090 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:23:51 +00:00
Eric Christopher
b900a6d000 80-column fixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231088 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 17:54:39 +00:00
Reid Kleckner
9c28314a68 Make llvm.eh.begincatch use an outparam
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231086 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 17:41:09 +00:00
Chad Rosier
f1de1adc82 [AArch64] When combining constant mul of -3, prefer (sub x, (shl x, N)).
This change only effects codegen when the constant is -3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231085 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 17:31:01 +00:00
Duncan P. N. Exon Smith
b056aa798d DebugInfo: Move new hierarchy into place
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231082 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 17:24:31 +00:00
Duncan P. N. Exon Smith
853cd2630e IR: Add missing API to specialized metadata nodes
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!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231079 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 16:45:34 +00:00
NAKAMURA Takumi
6800198300 Make llvm/test/Object/archive-format.test CRLF-tolerant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231074 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 15:54:48 +00:00
Michael Kuperstein
822a753804 [X86][Haswell][SchedModel] Fix patterns for scalar FMA3 variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231073 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 15:47:02 +00:00
Elena Demikhovsky
ae765411fc AVX-512: Moved patterns for masked load/store under avx_store, avx_load classes.
No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231069 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 15:03:35 +00:00
Daniel Jasper
bbaf4fd14c During PHI elimination, split critical edges that move copies out of loops.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231064 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 10:23:11 +00:00
Daniel Berlin
21d5465831 Add range iterators to Extract/InsertValueInst indices
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 09:31:01 +00:00
Nick Lewycky
ca99858baa Switch up whitespace with better whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231059 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 07:59:45 +00:00
Nick Lewycky
146db69645 Revert the non-cleanup part of r230769 because it introduced a non-determinism found only in the names of symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231058 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 07:57:45 +00:00
Owen Anderson
25dc6c8a08 Cleanup after r230934 per Dave's suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231056 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 05:39:27 +00:00
Craig Topper
fc2c7a558b [X86] Remove some unused code from disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231055 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 05:24:03 +00:00
Sanjoy Das
e288a5bb3b Revert "[ADT] fail-fast iterators for DenseMap"
This reverts commit r231035.  It breaks clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 01:59:38 +00:00
Peter Collingbourne
7abe807c7a Add explicit type to empty std::set initializer to fix the libc++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231047 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 01:39:13 +00:00
Ahmed Bougacha
14593eb417 [X86] Special-case 2x CMOV when custom-inserting.
This lets us avoid a few copies that are otherwise hard to get rid of.
The way this is done is, the custom-inserter looks at the following
instruction for another CMOV, and replaces both at the same time.
A previous version used a new CMOV2 opcode, but the custom inserter
is expected to be able to return a different basic block anyway, which
means it's OK - though far from ideal - to alter that block's contents.
Explicitly document that, in case it ever makes a difference.
Alternatives welcome!

Follow-up to r231045.

rdar://19767934
Closes http://reviews.llvm.org/D8019


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231046 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 01:21:16 +00:00