oota-llvm.git
9 years agoRemove getDataLayout() from Instruction/GlobalValue/BasicBlock/Function
Mehdi Amini [Tue, 3 Mar 2015 22:01:13 +0000 (22:01 +0000)]
Remove getDataLayout() from Instruction/GlobalValue/BasicBlock/Function

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>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231147 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix the build broken in r231142
David Blaikie [Tue, 3 Mar 2015 21:56:11 +0000 (21:56 +0000)]
Fix the build broken in r231142

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231146 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDAGCombiner::LoadedSlice: Remove explicit copy ctor in favor of the Rule of Zero
David Blaikie [Tue, 3 Mar 2015 21:50:47 +0000 (21:50 +0000)]
DAGCombiner::LoadedSlice: Remove explicit copy ctor in favor of the Rule of Zero

This way, the copy assignment operator can be used without hitting the
deprecated case in C++11.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231144 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the Rule...
David Blaikie [Tue, 3 Mar 2015 21:49:07 +0000 (21:49 +0000)]
RewriteStatepointsForGC::PhiState: Remove explicit copy ctor in favor of the 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231143 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCFG::SuccessorIterator: Remove explicit copy assignment, as the default is fine
David Blaikie [Tue, 3 Mar 2015 21:45:54 +0000 (21:45 +0000)]
CFG::SuccessorIterator: Remove explicit copy assignment, as the default is fine

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231142 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoCFG::SuccessorIterator::SuccessorProxy:: Expliictly default copy construction as...
David Blaikie [Tue, 3 Mar 2015 21:44:06 +0000 (21:44 +0000)]
CFG::SuccessorIterator::SuccessorProxy:: Expliictly default copy construction as it is deprecated in C++11 in the presence of explicit copy assignment.

See r231099 for similar issues & details in [Small]BitVector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231141 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTeach ComputeNumSignBits about signed divisions.
Nadav Rotem [Tue, 3 Mar 2015 21:39:02 +0000 (21:39 +0000)]
Teach ComputeNumSignBits about signed divisions.

http://reviews.llvm.org/D8028
rdar://20023136

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231140 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove the explicit SDNodeIterator::operator= in favor of the implicit default
David Blaikie [Tue, 3 Mar 2015 21:26:17 +0000 (21:26 +0000)]
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

9 years agoRevert "Remove the explicit SDNodeIterator::operator= in favor of the implicit default"
David Blaikie [Tue, 3 Mar 2015 21:18:16 +0000 (21:18 +0000)]
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

9 years agoRemove the explicit SDNodeIterator::operator= in favor of the implicit default
David Blaikie [Tue, 3 Mar 2015 21:17:08 +0000 (21:17 +0000)]
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

9 years agoRemove the explicit SUnitIterator::operator= as the default is just fine
David Blaikie [Tue, 3 Mar 2015 21:17:00 +0000 (21:17 +0000)]
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

9 years agoRemove LatencyPriorityQueue::dump because it relies on an implicit copy ctor which...
David Blaikie [Tue, 3 Mar 2015 21:16:56 +0000 (21:16 +0000)]
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

9 years agoCorrectly handle -pass-remarks in the gold plugin.
Rafael Espindola [Tue, 3 Mar 2015 21:11:13 +0000 (21:11 +0000)]
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

9 years ago[X86][ELF] Correct relocation for DWARF TLS references
Paul Robinson [Tue, 3 Mar 2015 21:01:27 +0000 (21:01 +0000)]
[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

9 years agoremove enum value names from comments; NFC
Sanjay Patel [Tue, 3 Mar 2015 20:58:35 +0000 (20:58 +0000)]
remove enum value names from comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231129 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd support for SunOS function/data sections and associated
Eric Christopher [Tue, 3 Mar 2015 20:54:29 +0000 (20:54 +0000)]
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

9 years agounique_ptrify ResourcePriorityQueue::ResourceModel
David Blaikie [Tue, 3 Mar 2015 20:49:08 +0000 (20:49 +0000)]
unique_ptrify ResourcePriorityQueue::ResourceModel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231127 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove ResourcePriorityQueue::dump as it relies on copying a non-copyable type which...
David Blaikie [Tue, 3 Mar 2015 20:49:05 +0000 (20:49 +0000)]
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

9 years ago[ADT] fail-fast iterators for DenseMap
Sanjoy Das [Tue, 3 Mar 2015 20:46:45 +0000 (20:46 +0000)]
[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

9 years agouse bool operator shortcut; NFC
Sanjay Patel [Tue, 3 Mar 2015 20:41:27 +0000 (20:41 +0000)]
use bool operator shortcut; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231123 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFixing problem with field initialization order
Andrew Kaylor [Tue, 3 Mar 2015 20:22:09 +0000 (20:22 +0000)]
Fixing problem with field initialization order

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231122 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix PR22762. When emitting a DWARF expression check whether this is the
Adrian Prantl [Tue, 3 Mar 2015 20:12:52 +0000 (20:12 +0000)]
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

9 years agoOutline cleanup handlers for native Windows C++ exception handling
Andrew Kaylor [Tue, 3 Mar 2015 20:00:16 +0000 (20:00 +0000)]
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

9 years agoAdd the following 64-bit vector integer arithmetic instructions added in POWER8:
Kit Barton [Tue, 3 Mar 2015 19:55:45 +0000 (19:55 +0000)]
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

9 years agoDeltaAlgorithm: Provide protected default copy ctor for use by test derived class.
David Blaikie [Tue, 3 Mar 2015 19:53:04 +0000 (19:53 +0000)]
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

9 years agoRemove explicit no-op dtor in favor of the implicit dtor so as not to disable/depreca...
David Blaikie [Tue, 3 Mar 2015 19:53:02 +0000 (19:53 +0000)]
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

9 years agoRemove no-op dtor so that use of the implicit copy ctor/assignment operator are not...
David Blaikie [Tue, 3 Mar 2015 19:52:59 +0000 (19:52 +0000)]
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

9 years agoAdd a comment above findRepresentativeClass explaining why it's
Eric Christopher [Tue, 3 Mar 2015 19:47:14 +0000 (19:47 +0000)]
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

9 years agoRemove explicit copy ctor in favor of the implicit one so that the use of the copy...
David Blaikie [Tue, 3 Mar 2015 19:29:14 +0000 (19:29 +0000)]
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

9 years agoRemove explicit copy assignment operator in favor of the implicit/default to avoid...
David Blaikie [Tue, 3 Mar 2015 19:29:13 +0000 (19:29 +0000)]
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

9 years agoRemove explicit copy ctor in favor of the default so as not to disable/deprecate...
David Blaikie [Tue, 3 Mar 2015 19:29:11 +0000 (19:29 +0000)]
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

9 years agounique_ptrify FullDependenceAnalysis::DV
David Blaikie [Tue, 3 Mar 2015 19:20:18 +0000 (19:20 +0000)]
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

9 years agoFullDependenceAnalysis: Avoid using the (deprecated in C++11) copy ctor
David Blaikie [Tue, 3 Mar 2015 19:20:16 +0000 (19:20 +0000)]
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

9 years agoRemove some explicit copy assignment operators is favor of implicit ones, as their...
David Blaikie [Tue, 3 Mar 2015 19:20:13 +0000 (19:20 +0000)]
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

9 years agoFix PR22750: non-determinism causes assertion failure in DWARF generation
Dario Domizioli [Tue, 3 Mar 2015 18:40:53 +0000 (18:40 +0000)]
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

9 years ago[Small]BitVector::reference: Explicitly default copy construction as it is deprecated...
David Blaikie [Tue, 3 Mar 2015 18:39:00 +0000 (18:39 +0000)]
[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

9 years agoAvoid explicitly declaring the copy assignment operator, as this unnecessarily makes...
David Blaikie [Tue, 3 Mar 2015 18:29:27 +0000 (18:29 +0000)]
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

9 years agoTwine: Explicitly default the copy ctor as it's otherwise deprecated in C++11 by...
David Blaikie [Tue, 3 Mar 2015 18:29:25 +0000 (18:29 +0000)]
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

9 years agoDenseMapIterator: Avoid explicitly declaring the copy ctor as this makes the copy...
David Blaikie [Tue, 3 Mar 2015 18:29:23 +0000 (18:29 +0000)]
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

9 years agoMake Triple::getOSVersion make sense for Android.
Dan Albert [Tue, 3 Mar 2015 18:23:51 +0000 (18:23 +0000)]
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

9 years ago80-column fixup.
Eric Christopher [Tue, 3 Mar 2015 17:54:39 +0000 (17:54 +0000)]
80-column fixup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231088 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake llvm.eh.begincatch use an outparam
Reid Kleckner [Tue, 3 Mar 2015 17:41:09 +0000 (17:41 +0000)]
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

9 years ago[AArch64] When combining constant mul of -3, prefer (sub x, (shl x, N)).
Chad Rosier [Tue, 3 Mar 2015 17:31:01 +0000 (17:31 +0000)]
[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

9 years agoDebugInfo: Move new hierarchy into place
Duncan P. N. Exon Smith [Tue, 3 Mar 2015 17:24:31 +0000 (17:24 +0000)]
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

9 years agoIR: Add missing API to specialized metadata nodes
Duncan P. N. Exon Smith [Tue, 3 Mar 2015 16:45:34 +0000 (16:45 +0000)]
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

9 years agoMake llvm/test/Object/archive-format.test CRLF-tolerant.
NAKAMURA Takumi [Tue, 3 Mar 2015 15:54:48 +0000 (15:54 +0000)]
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

9 years ago[X86][Haswell][SchedModel] Fix patterns for scalar FMA3 variants.
Michael Kuperstein [Tue, 3 Mar 2015 15:47:02 +0000 (15:47 +0000)]
[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

9 years agoAVX-512: Moved patterns for masked load/store under avx_store, avx_load classes.
Elena Demikhovsky [Tue, 3 Mar 2015 15:03:35 +0000 (15:03 +0000)]
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

9 years agoDuring PHI elimination, split critical edges that move copies out of loops.
Daniel Jasper [Tue, 3 Mar 2015 10:23:11 +0000 (10:23 +0000)]
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

9 years agoAdd range iterators to Extract/InsertValueInst indices
Daniel Berlin [Tue, 3 Mar 2015 09:31:01 +0000 (09:31 +0000)]
Add range iterators to Extract/InsertValueInst indices

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231062 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSwitch up whitespace with better whitespace.
Nick Lewycky [Tue, 3 Mar 2015 07:59:45 +0000 (07:59 +0000)]
Switch up whitespace with better whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231059 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert the non-cleanup part of r230769 because it introduced a non-determinism found...
Nick Lewycky [Tue, 3 Mar 2015 07:57:45 +0000 (07:57 +0000)]
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

9 years agoCleanup after r230934 per Dave's suggestions.
Owen Anderson [Tue, 3 Mar 2015 05:39:27 +0000 (05:39 +0000)]
Cleanup after r230934 per Dave's suggestions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231056 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[X86] Remove some unused code from disassembler.
Craig Topper [Tue, 3 Mar 2015 05:24:03 +0000 (05:24 +0000)]
[X86] Remove some unused code from disassembler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231055 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "[ADT] fail-fast iterators for DenseMap"
Sanjoy Das [Tue, 3 Mar 2015 01:59:38 +0000 (01:59 +0000)]
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

9 years agoAdd explicit type to empty std::set initializer to fix the libc++ build.
Peter Collingbourne [Tue, 3 Mar 2015 01:39:13 +0000 (01:39 +0000)]
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

9 years ago[X86] Special-case 2x CMOV when custom-inserting.
Ahmed Bougacha [Tue, 3 Mar 2015 01:21:16 +0000 (01:21 +0000)]
[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

9 years ago[X86] Combine (cmov (and/or (setcc) (setcc))) into (cmov (cmov)).
Ahmed Bougacha [Tue, 3 Mar 2015 01:09:14 +0000 (01:09 +0000)]
[X86] Combine (cmov (and/or (setcc) (setcc))) into (cmov (cmov)).

Fold and/or of setcc's to double CMOV:

(CMOV F, T, ((cc1 | cc2) != 0)) -> (CMOV (CMOV F, T, cc1), T, cc2)
(CMOV F, T, ((cc1 & cc2) != 0)) -> (CMOV (CMOV T, F, !cc1), F, !cc2)

When we can't use the CMOV instruction, it might increase branch
mispredicts.  When we can, or when there is no mispredict, this
improves throughput and reduces register pressure.

These can't be catched by generic combines, because the pattern can
appear when legalizing some instructions (such as fcmp une).

rdar://19767934
http://reviews.llvm.org/D7634

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231045 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix cppeh breakage due to racing commits
Reid Kleckner [Tue, 3 Mar 2015 01:04:39 +0000 (01:04 +0000)]
Fix cppeh breakage due to racing commits

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231044 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets.
Peter Collingbourne [Tue, 3 Mar 2015 00:49:28 +0000 (00:49 +0000)]
LowerBitSets: Use byte arrays instead of bit sets to represent in-memory bit sets.

By loading from indexed offsets into a byte array and applying a mask, a
program can test bits from the bit set with a relatively short instruction
sequence. For example, suppose we have 15 bit sets to lay out:

A (16 bits), B (15 bits), C (14 bits), D (13 bits), E (12 bits),
F (11 bits), G (10 bits), H (9 bits), I (7 bits), J (6 bits), K (5 bits),
L (4 bits), M (3 bits), N (2 bits), O (1 bit)

These bits can be laid out in a 16-byte array like this:

      Byte Offset
    0123456789ABCDEF
Bit
  7 HHHHHHHHHIIIIIII
  6 GGGGGGGGGGJJJJJJ
  5 FFFFFFFFFFFKKKKK
  4 EEEEEEEEEEEELLLL
  3 DDDDDDDDDDDDDMMM
  2 CCCCCCCCCCCCCCNN
  1 BBBBBBBBBBBBBBBO
  0 AAAAAAAAAAAAAAAA

For example, to test bit X of A, we evaluate ((bits[X] & 1) != 0), or to
test bit X of I, we evaluate ((bits[9 + X] & 0x80) != 0). This can be done
in 1-2 machine instructions on x86, or 4-6 instructions on ARM.

This uses the LPT multiprocessor scheduling algorithm to lay out the bits
efficiently.

Saves ~450KB of instructions in a recent build of Chromium.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231043 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemap arguments and non-alloca values used by outlined C++ exception handlers.
Andrew Kaylor [Tue, 3 Mar 2015 00:41:03 +0000 (00:41 +0000)]
Remap arguments and non-alloca values used by outlined C++ exception handlers.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231042 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoLoopIdiom: Give globals for memset_pattern16 private linkage.
Benjamin Kramer [Tue, 3 Mar 2015 00:17:09 +0000 (00:17 +0000)]
LoopIdiom: Give globals for memset_pattern16 private linkage.

There's really no reason to have them have entries in the symbol table
anymore. Old versions of ld64 had some bugs in this area but those have
been fixed long ago.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231041 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoWinEH: Run opt -instnamer over some cppeh tests and update CHECKs
Reid Kleckner [Tue, 3 Mar 2015 00:05:35 +0000 (00:05 +0000)]
WinEH: Run opt -instnamer over some cppeh tests and update CHECKs

In the future, we should run the output of clang through instnamer to
make it easier to manually edit test cases.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231037 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[ADT] fail-fast iterators for DenseMap
Sanjoy Das [Mon, 2 Mar 2015 23:29:37 +0000 (23:29 +0000)]
[ADT] fail-fast iterators for DenseMap

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@231035 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTLI: Factor out sanitizeFunctionName. NFC.
Michael Zolotukhin [Mon, 2 Mar 2015 23:24:40 +0000 (23:24 +0000)]
TLI: Factor out sanitizeFunctionName. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231034 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoIndexedMap: Document why SmallVector<T, 0> is preferable here.
Benjamin Kramer [Mon, 2 Mar 2015 22:20:22 +0000 (22:20 +0000)]
IndexedMap: Document why SmallVector<T, 0> is preferable here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231028 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Revert "For the dwarf expression code get the subtarget off of the current""
Adrian Prantl [Mon, 2 Mar 2015 22:02:36 +0000 (22:02 +0000)]
Revert "Revert "For the dwarf expression code get the subtarget off of the current""

This reapplies r230990 without modifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231024 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactor DebugLocDWARFExpression so it doesn't require access to the
Adrian Prantl [Mon, 2 Mar 2015 22:02:33 +0000 (22:02 +0000)]
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes
of the pre-calculated DWARF expression.

Ought to be NFC, but it does slightly alter the output format of the
textual assembly.

This reapplies 230930 without the assertion in DebugLocEntry::finalize()
because not all Machine registers can be lowered into DWARF register
numbers and floating point constants cannot be expressed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231023 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agocmake: Use MSVC atomics with clang-cl
Reid Kleckner [Mon, 2 Mar 2015 22:00:23 +0000 (22:00 +0000)]
cmake: Use MSVC atomics with clang-cl

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231022 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSupport: Use const pointers for reads.
Jan Vesely [Mon, 2 Mar 2015 21:50:28 +0000 (21:50 +0000)]
Support: Use const pointers for reads.

Fixes tons of const-cast warnings.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Rui Ueyama <ruiu@google.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231021 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert some changes that were made to fix PR20680.
Sanjoy Das [Mon, 2 Mar 2015 21:41:07 +0000 (21:41 +0000)]
Revert some changes that were made to fix PR20680.

This re-lands change r230921.  r230921 was reverted because it broke a
clang test; a checkin fixing the clang test will be commited shortly.

Summary:
As far as I can tell, the real bug causing the issue was fixed in
r230533.  SCEVExpander should mark an increment operation as nuw or nsw
only if it can *prove* that the operation does not overflow.  There
shouldn't be any situation where we have to do something different
because of no-wrap flags generated by SCEVExpander.

Revert "IndVarSimplify: Allow LFTR to fire more often"

This reverts commit 1ade0f0faa98877b688e0b9da58e876052c1e04e (SVN: 222213).

Revert "IndVarSimplify: Don't let LFTR compare against a poison value"

This reverts commit c0f2b8b528d8a37b0a1522aae90af649d6357eb5 (SVN: 217102).

Reviewers: majnemer, atrick, spatel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231018 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agolit: Add 'cd' support to the internal shell and port some tests
Reid Kleckner [Mon, 2 Mar 2015 21:33:18 +0000 (21:33 +0000)]
lit: Add 'cd' support to the internal shell and port some tests

The internal shell was already threading around a 'cwd' parameter. We
just have to make it mutable so that we can update it as the test script
executes.

If the shell ever grows support for environment variable substitution,
we could also implement support for export.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231017 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoUse read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>().
Rui Ueyama [Mon, 2 Mar 2015 21:19:12 +0000 (21:19 +0000)]
Use read{16,32,64}{le,be}() instead of *reinterpret_cast<u{little,big}{16,32,64}_t>().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231016 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSmallVector: Allow initialization and assignment from initializer_list.
Benjamin Kramer [Mon, 2 Mar 2015 21:16:04 +0000 (21:16 +0000)]
SmallVector: Allow initialization and assignment from initializer_list.

Modeled after std::vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231015 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTLI: Use lambda. NFC.
Michael Zolotukhin [Mon, 2 Mar 2015 20:50:08 +0000 (20:50 +0000)]
TLI: Use lambda. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231011 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMake ToVectorTy static.
Michael Zolotukhin [Mon, 2 Mar 2015 20:43:24 +0000 (20:43 +0000)]
Make ToVectorTy static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231007 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFix a copy-paste bug.
Michael Zolotukhin [Mon, 2 Mar 2015 20:37:10 +0000 (20:37 +0000)]
Fix a copy-paste bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231006 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "Refactor DebugLocDWARFExpression so it doesn't require access to the"
Adrian Prantl [Mon, 2 Mar 2015 20:01:54 +0000 (20:01 +0000)]
Revert "Refactor DebugLocDWARFExpression so it doesn't require access to the"

This reverts commit 230975 to investigate buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231004 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert "For the dwarf expression code get the subtarget off of the current"
Adrian Prantl [Mon, 2 Mar 2015 20:01:47 +0000 (20:01 +0000)]
Revert "For the dwarf expression code get the subtarget off of the current"

This reverts commit 230990 because also reverting 230975.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231003 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSupport: Add {read,write}{16,32,64}{le,be} functions.
Rui Ueyama [Mon, 2 Mar 2015 20:00:15 +0000 (20:00 +0000)]
Support: Add {read,write}{16,32,64}{le,be} functions.

Add convenient functions for endian-aware reads/writes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231002 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRemove useless .debug_macinfo section setup.
Paul Robinson [Mon, 2 Mar 2015 19:52:42 +0000 (19:52 +0000)]
Remove useless .debug_macinfo section setup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231001 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoChange SystemZ large tests to use the existing long_tests property
David Blaikie [Mon, 2 Mar 2015 19:34:11 +0000 (19:34 +0000)]
Change SystemZ large tests to use the existing long_tests property

(this is already used in Clang for a couple of tests)

Reviewers: uweigand

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230998 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PerformanceTips] Document various items folks have suggested
Philip Reames [Mon, 2 Mar 2015 19:19:04 +0000 (19:19 +0000)]
[PerformanceTips] Document various items folks have suggested

This could stand to be expanded - patches welcome! - but let's at least write them down so they don't get forgotten.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230995 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAdd r230655 back with a fix.
Rafael Espindola [Mon, 2 Mar 2015 19:08:03 +0000 (19:08 +0000)]
Add r230655 back with a fix.

The issue is that now we have a diag handler during optimizations
and get forward every optimization remark, flooding stdout.

The same filtering should probably be done with or without a
custom handler, but for now just ignore remarks.

Original message:

gold-plugin: "Upgrade" debug info and handle its warnings.

The gold plugin never calls MaterializeModule, so any old debug info
was not deleted and could cause crashes.

Now that it is being "upgraded", the plugin also has to handle warnings
and create Modules with a nice id (it shows in the warning).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230991 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoFor the dwarf expression code get the subtarget off of the current
Eric Christopher [Mon, 2 Mar 2015 19:01:47 +0000 (19:01 +0000)]
For the dwarf expression code get the subtarget off of the current
MachineFunction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230990 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRestore LLVMLinkModules C API until it is properly deprecated.
Juergen Ributzka [Mon, 2 Mar 2015 18:59:38 +0000 (18:59 +0000)]
Restore LLVMLinkModules C API until it is properly deprecated.

Add the enum "LLVMLinkerMode" back for backwards-compatibility and add the
linker mode parameter back to the "LLVMLinkModules" function. The paramter is
ignored and has no effect.

Patch provided by: Filip Pizlo
Reviewed by: Rafael and Sean

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230988 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoR600: Use c++11 style for loop
Jan Vesely [Mon, 2 Mar 2015 18:56:52 +0000 (18:56 +0000)]
R600: Use c++11 style for loop

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <tom@stellard.net>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230987 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRevert r230979, should apply to all X86 ELF.
Paul Robinson [Mon, 2 Mar 2015 18:50:18 +0000 (18:50 +0000)]
Revert r230979, should apply to all X86 ELF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230985 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoMaking the SO version major.minor instead of just major because ABI and API change...
Chris Bieneman [Mon, 2 Mar 2015 17:50:13 +0000 (17:50 +0000)]
Making the SO version major.minor instead of just major because ABI and API change between minor versions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230981 91177308-0d34-0410-b5e6-96231b3b80d8

9 years ago[PS4] Correct relocation for DWARF TLS references.
Paul Robinson [Mon, 2 Mar 2015 17:44:52 +0000 (17:44 +0000)]
[PS4] Correct relocation for DWARF TLS references.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230979 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoexport.sh: Make sure umask is not too restrictive (PR22742)
Hans Wennborg [Mon, 2 Mar 2015 17:30:42 +0000 (17:30 +0000)]
export.sh: Make sure umask is not too restrictive (PR22742)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230977 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoDetect malformed YAML sequence in yaml::Input::beginSequence()
Justin Bogner [Mon, 2 Mar 2015 17:26:43 +0000 (17:26 +0000)]
Detect malformed YAML sequence in yaml::Input::beginSequence()

When reading a yaml::SequenceTraits object, YAMLIO does not report an
error if the yaml item is not a sequence. Instead, YAMLIO reads an
empty sequence. For example:

---
seq:
    foo: 1
    bar: 2
...

If `seq` is a SequenceTraits object, then reading the above yaml will
yield `seq` as an empty sequence.

Fix this to report an error for the above mapping ("not a sequence")

Patch by William Fisher. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230976 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoRefactor DebugLocDWARFExpression so it doesn't require access to the
Adrian Prantl [Mon, 2 Mar 2015 17:21:06 +0000 (17:21 +0000)]
Refactor DebugLocDWARFExpression so it doesn't require access to the
TargetRegisterInfo. DebugLocEntry now holds a buffer with the raw bytes
of the pre-calculated DWARF expression.

Ought to be NFC, but it does slightly alter the output format of the
textual assembly.

This reapplies 230930 with a relaxed assertion in DebugLocEntry::finalize()
that allows for empty DWARF expressions for constant FP values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230975 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAccidentaly inverted the condition again. Sorry.
Benjamin Kramer [Mon, 2 Mar 2015 16:45:08 +0000 (16:45 +0000)]
Accidentaly inverted the condition again. Sorry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230973 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAvoid assertion in MSVC 2013 debug builds.
Benjamin Kramer [Mon, 2 Mar 2015 16:42:56 +0000 (16:42 +0000)]
Avoid assertion in MSVC 2013 debug builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230972 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAsmWriter: Only print one space after the load type
Benjamin Kramer [Mon, 2 Mar 2015 15:24:41 +0000 (15:24 +0000)]
AsmWriter: Only print one space after the load type

Before: %x = load i32,  i32* %i
After:  %x = load i32, i32* %i

Purely cosmetic, so no new test case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230966 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoSLPVectorizer: Rewrite ArrayRef slice compare to be more idiomatic.
Benjamin Kramer [Mon, 2 Mar 2015 15:24:36 +0000 (15:24 +0000)]
SLPVectorizer: Rewrite ArrayRef slice compare to be more idiomatic.

NFC intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230965 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoTblGen: Remove copy of SmallVector::operator==. NFC intended.
Benjamin Kramer [Mon, 2 Mar 2015 15:24:30 +0000 (15:24 +0000)]
TblGen: Remove copy of SmallVector::operator==. NFC intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230964 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoAVX-512: Add assembly parser support for Rounding mode
Elena Demikhovsky [Mon, 2 Mar 2015 15:00:34 +0000 (15:00 +0000)]
AVX-512: Add assembly parser support for Rounding mode
By Asaf Badouh <asaf.badouh@intel.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230962 91177308-0d34-0410-b5e6-96231b3b80d8

9 years agoNVPTX: Remove dead code.
Benjamin Kramer [Mon, 2 Mar 2015 13:16:28 +0000 (13:16 +0000)]
NVPTX: Remove dead code.

Fun fact: This file was never referenced since the initial checkin of
the NVPTX backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230957 91177308-0d34-0410-b5e6-96231b3b80d8