oota-llvm.git
9 years agoTest commit. It will be reverted in the next commit.
Wei Mi [Wed, 4 Mar 2015 17:41:17 +0000 (17:41 +0000)]
Test commit. It will be reverted in the next commit.

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

9 years agoUpdate the out-of-date dwarf expressions in these testcases.
Adrian Prantl [Wed, 4 Mar 2015 17:39:59 +0000 (17:39 +0000)]
Update the out-of-date dwarf expressions in these testcases.

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

9 years agoFix DwarfExpression::AddMachineRegExpression so it doesn't read past the
Adrian Prantl [Wed, 4 Mar 2015 17:39:33 +0000 (17:39 +0000)]
Fix DwarfExpression::AddMachineRegExpression so it doesn't read past the
end of an expression that ends with DW_OP_plus.
Caught by the ASAN build bots.

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

9 years agoR600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32
Marek Olsak [Wed, 4 Mar 2015 17:33:45 +0000 (17:33 +0000)]
R600/SI: Add an intrinsic for S_FLBIT_I32 / V_FFBH_I32

Required by OpenGL (ARB_gpu_shader5).

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

9 years agoTest commit. Removed an unnecessary space
Nemanja Ivanovic [Wed, 4 Mar 2015 17:09:12 +0000 (17:09 +0000)]
Test commit. Removed an unnecessary space

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

9 years agoExplicitly default ilistTest::Node's copy constructor
David Blaikie [Wed, 4 Mar 2015 17:01:18 +0000 (17:01 +0000)]
Explicitly default ilistTest::Node's copy constructor

In the presence of a user-declared dtor, calling an implicit copy ctor
is deprecated in C++11.

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

9 years agoRevert r231221, "Devirtualize ~parser<T> by making it protected in base classes and...
NAKAMURA Takumi [Wed, 4 Mar 2015 16:24:40 +0000 (16:24 +0000)]
Revert r231221, "Devirtualize ~parser<T> by making it protected in base classes and making derived classes final"

It broke seflhosting.

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

9 years agoRevert r231132, "Correctly handle -pass-remarks in the gold plugin.", for now, to...
NAKAMURA Takumi [Wed, 4 Mar 2015 16:24:28 +0000 (16:24 +0000)]
Revert r231132, "Correctly handle -pass-remarks in the gold plugin.", for now, to suppress log floodng in LTO.

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

9 years agoMutate TargetLowering::shouldExpandAtomicRMWInIR to specifically dictate how AtomicRM...
JF Bastien [Wed, 4 Mar 2015 15:47:57 +0000 (15:47 +0000)]
Mutate TargetLowering::shouldExpandAtomicRMWInIR to specifically dictate how AtomicRMWInsts are expanded.

Summary:
In PNaCl, most atomic instructions have their own @llvm.nacl.atomic.* function, each one, with a few exceptions, represents a consistent behaviour across all NaCl-supported targets. Unfortunately, the atomic RMW operations nand, [u]min, and [u]max aren't directly represented by any such @llvm.nacl.atomic.* function. This patch refines shouldExpandAtomicRMWInIR in TargetLowering so that a future `Le32TargetLowering` class can selectively inform the caller how the target desires the atomic RMW instruction to be expanded (ie via load-linked/store-conditional for ARM/AArch64, via cmpxchg for X86/others?, or not at all for Mips) if at all.

This does not represent a behavioural change and as such no tests were added.

Patch by: Richard Diamond.

Reviewers: jfb

Reviewed By: jfb

Subscribers: jfb, aemerson, t.p.northover, llvm-commits

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

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

9 years ago[mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator
Jozef Kolek [Wed, 4 Mar 2015 15:47:42 +0000 (15:47 +0000)]
[mips][microMIPS] Make usage of ADDU16 and SUBU16 by code generator

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

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

9 years ago[PowerPC] Remove unnecessary and incomplete commentary
Bill Schmidt [Wed, 4 Mar 2015 14:56:05 +0000 (14:56 +0000)]
[PowerPC] Remove unnecessary and incomplete commentary

This "itinerary class map" in PPCSchedule.td is incomplete and
redundant with the actual code.  As it provides no value, we've
decided to remove it.

No functional change.

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

9 years ago[X86][FastISel] Simplify the logic in method X86SelectSIToFP.
Andrea Di Biagio [Wed, 4 Mar 2015 14:23:25 +0000 (14:23 +0000)]
[X86][FastISel] Simplify the logic in method X86SelectSIToFP.

The target-independent selection algorithm in FastISel already knows how
to select a SINT_TO_FP if the target is SSE but not AVX.

On targets that have SSE but not AVX, the tablegen'd 'fastEmit' functions
for ISD::SINT_TO_FP know how to select instruction X86::CVTSI2SSrr
(for an i32 to f32 conversion) and X86::CVTSI2SDrr (for an i32 to f64
conversion).

This patch simplifies the logic in method X86SelectSIToFP knowing that
the code would not be reachable if the subtarget doesn't have AVX.
No functional change intended.

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

9 years agoasan: do not instrument direct inbounds accesses to stack variables
Dmitry Vyukov [Wed, 4 Mar 2015 13:27:53 +0000 (13:27 +0000)]
asan: do not instrument direct inbounds accesses to stack variables

Do not instrument direct accesses to stack variables that can be
proven to be inbounds, e.g. accesses to fields of structs on stack.

But it eliminates 33% of instrumentation on webrtc/modules_unittests
(number of memory accesses goes down from 290152 to 193998) and
reduces binary size by 15% (from 74M to 64M) and improved compilation time by 6-12%.

The optimization is guarded by asan-opt-stack flag that is off by default.

http://reviews.llvm.org/D7583

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

9 years ago[mips] Rename the LA/LI/DLI TableGen definitions and classes. NFC.
Toma Tabacu [Wed, 4 Mar 2015 13:01:14 +0000 (13:01 +0000)]
[mips] Rename the LA/LI/DLI TableGen definitions and classes. NFC.

Summary:
Use more reasonable names for these pseudo-instructions.
As there's only one definition tied to any one of these classes, I named them with abbreviated versions of their respective class' name.

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

9 years ago[mips] Keep the parameter list of Filler::searchRange() consistent. NFC.
Vasileios Kalintiris [Wed, 4 Mar 2015 12:37:58 +0000 (12:37 +0000)]
[mips] Keep the parameter list of Filler::searchRange() consistent. NFC.

Summary:
Move the "Filler" parameter to the end of the parameter list as it is,
conceptually, the only output parameter of that function.

Reviewers: dsanders

Subscribers: llvm-commits

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

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

9 years ago[MBP] Fix a really horrible bug in MachineBlockPlacement, but behind
Chandler Carruth [Wed, 4 Mar 2015 12:18:08 +0000 (12:18 +0000)]
[MBP] Fix a really horrible bug in MachineBlockPlacement, but behind
a flag for now.

First off, thanks to Daniel Jasper for really pointing out the issue
here. It's been here forever (at least, I think it was there when
I first wrote this code) without getting really noticed or fixed.

The key problem is what happens when two reasonably common patterns
happen at the same time: we outline multiple cold regions of code, and
those regions in turn have diamonds or other CFGs for which we can't
just topologically lay them out. Consider some C code that looks like:

  if (a1()) { if (b1()) c1(); else d1(); f1(); }
  if (a2()) { if (b2()) c2(); else d2(); f2(); }
  done();

Now consider the case where a1() and a2() are unlikely to be true. In
that case, we might lay out the first part of the function like:

  a1, a2, done;

And then we will be out of successors in which to build the chain. We go
to find the best block to continue the chain with, which is perfectly
reasonable here, and find "b1" let's say. Laying out successors gets us
to:

  a1, a2, done; b1, c1;

At this point, we will refuse to lay out the successor to c1 (f1)
because there are still un-placed predecessors of f1 and we want to try
to preserve the CFG structure. So we go get the next best block, d1.

... wait for it ...

Except that the next best block *isn't* d1. It is b2! d1 is waaay down
inside these conditionals. It is much less important than b2. Except
that this is exactly what we didn't want. If we keep going we get the
entire set of the rest of the CFG *interleaved*!!!

  a1, a2, done; b1, c1; b2, c2; d1, f1; d2, f2;

So we clearly need a better strategy here. =] My current favorite
strategy is to actually try to place the block whose predecessor is
closest. This very simply ensures that we unwind these kinds of CFGs the
way that is natural and fitting, and should minimize the number of cache
lines instructions are spread across.

It also happens to be *dead simple*. It's like the datastructure was
specifically set up for this use case or something. We only push blocks
onto the work list when the last predecessor for them is placed into the
chain. So the back of the worklist *is* the nearest next block.

Unfortunately, a change like this is going to cause *soooo* many
benchmarks to swing wildly. So for now I'm adding this under a flag so
that we and others can validate that this is fixing the problems
described, that it seems possible to enable, and hopefully that it fixes
more of our problems long term.

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

9 years ago[mips] Specify the correct value type when combining a CMovFP node.
Vasileios Kalintiris [Wed, 4 Mar 2015 12:10:18 +0000 (12:10 +0000)]
[mips] Specify the correct value type when combining a CMovFP node.

This commit fixes a bug introduced in r230956 where we were creating
CMovFP_{T,F} nodes with multiple return value types (one for each operand).
With this change the return value type of the new node is the same as the
value type of the True/False operands of the original node.

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

9 years agoAdd a flag to experiment with outlining optional branches.
Daniel Jasper [Wed, 4 Mar 2015 11:05:34 +0000 (11:05 +0000)]
Add a flag to experiment with outlining optional branches.

In a CFG with the edges A->B->C and A->C, B is an optional branch.

LLVM's default behavior is to lay the blocks out naturally, i.e. A, B,
C, in order to improve code locality and fallthroughs. However, if a
function contains many of those optional branches only a few of which
are taken, this leads to a lot of unnecessary icache misses. Moving B
out of line can work around this.

Review: http://reviews.llvm.org/D7719

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

9 years agoFix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle...
Kristof Beyls [Wed, 4 Mar 2015 09:12:08 +0000 (09:12 +0000)]
Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle yet.

As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers
ld.bfd and ld.gold currently only support a subset of the whole range of AArch64
ELF TLS relocations. Furthermore, they assume that some of the code sequences to
access thread-local variables are produced in a very specific sequence.
When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize
the instructions.
Even if that wouldn't be the case, it's good to produce the exact sequence,
as that ensures that linkers can perform optimizing relaxations.

This patch:

* implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang
  would grow an -mtls-size option to allow support for both, but that's not part of this patch.
* by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold
  linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation)
  is added to enable generation of local dynamic code sequence, but is off by default.
* makes sure that the exact expected code sequence for local dynamic and general dynamic
  accesses is produced, by making use of a new pseudo instruction. The patch also removes
  two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo
  SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ).

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

9 years ago[Tablegen] Use correct result number variables with the pattern nodes they go with...
Craig Topper [Wed, 4 Mar 2015 09:04:54 +0000 (09:04 +0000)]
[Tablegen] Use correct result number variables with the pattern nodes they go with when handling SDTCisSameAs. No functional change as they are always both 0 unless you try to define a multi result type profile that uses SDTCisSame on one of the other results.

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

9 years agoExplicitly default DenseMapTest::CtorTest::operator=
David Blaikie [Wed, 4 Mar 2015 07:57:45 +0000 (07:57 +0000)]
Explicitly default DenseMapTest::CtorTest::operator=

Using the implicit default copy assignment operator in the presence of a
user-declared copy ctor is deprecated in C++11.

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

9 years agoRemove explicit RNSuccIterator copy assignment in favor of implicit default
David Blaikie [Wed, 4 Mar 2015 07:51:50 +0000 (07:51 +0000)]
Remove explicit RNSuccIterator copy assignment in favor of implicit default

Asserting that the source and destination iterators are from the same
region is unnecessary - there's no reason to disallow reassignment from
any regions, so long as they aren't compared.

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

9 years agouse = default instead of {}
David Blaikie [Wed, 4 Mar 2015 07:35:04 +0000 (07:35 +0000)]
use = default instead of {}

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

9 years agoMake format_object_base explicitly copyable, so format_objects can be copied without...
David Blaikie [Wed, 4 Mar 2015 07:35:02 +0000 (07:35 +0000)]
Make format_object_base explicitly copyable, so format_objects can be copied without relying on the implicit copy ctor

Use of the implicit copy ctor is deprecated in C++11 in the presence of
a user declared dtor.

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

9 years agoDevirtualize ~parser<T> by making it protected in base classes and making derived...
David Blaikie [Wed, 4 Mar 2015 07:29:01 +0000 (07:29 +0000)]
Devirtualize ~parser<T> by making it protected in base classes and making derived classes final

These objects are never owned/destroyed polymorphically, so there's no
need for a virtual dtor.

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

9 years agoAvoid copying parser objects
David Blaikie [Wed, 4 Mar 2015 07:28:59 +0000 (07:28 +0000)]
Avoid copying parser objects

Use of their copy members is deprecated since they have a user-declared
dtor.

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

9 years ago[DAGCombine] Fix a bug in a BUILD_VECTOR combine
Michael Kuperstein [Wed, 4 Mar 2015 07:27:39 +0000 (07:27 +0000)]
[DAGCombine] Fix a bug in a BUILD_VECTOR combine

When trying to convert a BUILD_VECTOR into a shuffle, we try to split a single source vector that is twice as wide as the destination vector.
We can not do this when we also need the zero vector to create a blend.
This fixes PR22774.

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

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

9 years agoMake OptionValue explicitly copyable
David Blaikie [Wed, 4 Mar 2015 07:09:53 +0000 (07:09 +0000)]
Make OptionValue explicitly copyable

Since OptionValue (& its base classes) have user-declared dtors, use of
the implicit copy ctor/assignment operator is deprecated in C++11.
Provide them explicitly (defaulted) to avoid depending on this
deprecated feature.

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

9 years agoDevirtualize OptionValue::~OptionValue in favor of protected in the base, with final...
David Blaikie [Wed, 4 Mar 2015 06:57:14 +0000 (06:57 +0000)]
Devirtualize OptionValue::~OptionValue in favor of protected in the base, with final derived classes

These objects are never polymorphically owned, so there's no need for
virtual dtors - just make the dtor protected in the base classes, and
make the derived classes final.

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

9 years ago[MC][Target] Implement support for R_X86_64_SIZE{32,64}.
Davide Italiano [Wed, 4 Mar 2015 06:49:39 +0000 (06:49 +0000)]
[MC][Target] Implement support for R_X86_64_SIZE{32,64}.

Differential Revision: D7990
Reviewed by: rafael, majnemer

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

9 years ago[llvm-pdbdump] Display full enum definitions.
Zachary Turner [Wed, 4 Mar 2015 06:09:53 +0000 (06:09 +0000)]
[llvm-pdbdump] Display full enum definitions.

This will now display enum definitions both at the global
scope as well as nested inside of classes.  Additionally,
it will no longer display enums at the global scope if the
enum is nested.  Instead, it will omit the definition of
the enum globally and instead emit it in the corresponding
class definition.

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

9 years agoRevert "[ADT] fail-fast iterators for DenseMap"
Chaoren Lin [Wed, 4 Mar 2015 06:05:37 +0000 (06:05 +0000)]
Revert "[ADT] fail-fast iterators for DenseMap"

This reverts commit 4b7263d855006988854036b4a4891fcf19aebe65.

r231125 http://reviews.llvm.org/D7931

This was causing many LLDB tests to fail on OS X, Linux, and FreeBSD.

https://bpaste.net/show/6a23e1f53623

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

9 years agoMove emitDIE and emitAbbrevs to AsmPrinter. NFC.
Frederic Riss [Wed, 4 Mar 2015 02:30:17 +0000 (02:30 +0000)]
Move emitDIE and emitAbbrevs to AsmPrinter. NFC.

(They are called emitDwarfDIE and emitDwarfAbbrevs in their new home)

llvm-dsymutil wants to reuse that code, but it doesn't have a DwarfUnit or
a DwarfDebug object to call those. It has access to an AsmPrinter though.

Having emitDIE in the AsmPrinter also removes the DwarfFile dependency
on DwarfDebug, and thus the patch drops that field.

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

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

9 years agoConstify AsmPrinter passed to DIE methods.
Frederic Riss [Wed, 4 Mar 2015 02:30:08 +0000 (02:30 +0000)]
Constify AsmPrinter passed to DIE methods.

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

9 years agoFix the test for r231201. We don't crash anymore.
Filipe Cabecinhas [Wed, 4 Mar 2015 02:09:40 +0000 (02:09 +0000)]
Fix the test for r231201. We don't crash anymore.

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

9 years agoWorkaround MSVC not providing implicit move members
David Blaikie [Wed, 4 Mar 2015 02:07:51 +0000 (02:07 +0000)]
Workaround MSVC not providing implicit move members

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

9 years agoObject: Add range iterators to Archive symbols
Rui Ueyama [Wed, 4 Mar 2015 02:05:06 +0000 (02:05 +0000)]
Object: Add range iterators to Archive symbols

Also define operator* for symbol iterator just like Archive children iterator.

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

9 years agoUse report_fatal_error instead of unreachable for -fast-isel-abort
Mehdi Amini [Wed, 4 Mar 2015 01:48:39 +0000 (01:48 +0000)]
Use report_fatal_error instead of unreachable for -fast-isel-abort

Suggestion by Andrea Di Biagio

From: Mehdi Amini <mehdi.amini@apple.com>

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

9 years agounique_ptrify ValID::ConstantStructElts
David Blaikie [Wed, 4 Mar 2015 01:41:01 +0000 (01:41 +0000)]
unique_ptrify ValID::ConstantStructElts

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

9 years agoLLParser: Avoid copying ValIDs, the copy ctor is deprecated in C++11 due to the prese...
David Blaikie [Wed, 4 Mar 2015 01:40:07 +0000 (01:40 +0000)]
LLParser: Avoid copying ValIDs, the copy ctor is deprecated in C++11 due to the presence of a user-declared dtor

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

9 years agoUse the vanilla func_end symbol for .size.
Rafael Espindola [Wed, 4 Mar 2015 01:35:23 +0000 (01:35 +0000)]
Use the vanilla func_end symbol for .size.

No need to create yet another temp symbol.

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

9 years agoRemove MCStreamer include which isn't used here. NFC
Pete Cooper [Wed, 4 Mar 2015 01:24:26 +0000 (01:24 +0000)]
Remove MCStreamer include which isn't used here.  NFC

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

9 years agoThis file should always have included MCAssembler and not MCStreamer. NFC
Pete Cooper [Wed, 4 Mar 2015 01:24:24 +0000 (01:24 +0000)]
This file should always have included MCAssembler and not MCStreamer.  NFC

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

9 years agoRemove MCStreamer.h include from MCContext.h and explictly include it where necessary...
Pete Cooper [Wed, 4 Mar 2015 01:24:11 +0000 (01:24 +0000)]
Remove MCStreamer.h include from MCContext.h and explictly include it where necessary.  NFC

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

9 years agoRecommit r231168: unique_ptrify LiveRange::segmentSet
David Blaikie [Wed, 4 Mar 2015 01:20:33 +0000 (01:20 +0000)]
Recommit r231168: unique_ptrify LiveRange::segmentSet

GCC 4.7's libstdc++ doesn't have std::map::emplace, but it does have
std::unordered_map::emplace, and the use case here doesn't appear to
need ordering. The container has been changed in a separate/precursor
patch, and now this patch should hopefully build cleanly even with
GCC 4.7.

& then I realized the order of the container did matter, so extra
handling of ordering was added in r231189.

Original commit message:
This makes LiveRange non-copyable, and LiveInterval is already
non-movable (due to the explicit dtor), so now it's non-copyable and
non-movable.

Fix the one case where we were relying on the (deprecated in C++11)
implicit copy ctor of LiveInterval (which happened to work because the
ctor created an object with a null segmentSet, so double-deleting the
null pointer was fine).

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

9 years agoWeaken the check for a specific movl on the twoaddr-coalesce-3
Eric Christopher [Wed, 4 Mar 2015 01:19:17 +0000 (01:19 +0000)]
Weaken the check for a specific movl on the twoaddr-coalesce-3
test - we only care that there are two moves in the loop and not
which part is relative to which register anyhow.

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

9 years agoReverse the order libc++ and libc++abi are added in CMake.
Eric Fiselier [Wed, 4 Mar 2015 01:16:43 +0000 (01:16 +0000)]
Reverse the order libc++ and libc++abi are added in CMake.

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

9 years agoRecommit r231175: Change LiveStackAnalysis::SS2IntervalMap from std::map to std:...
David Blaikie [Wed, 4 Mar 2015 01:15:53 +0000 (01:15 +0000)]
Recommit r231175: Change LiveStackAnalysis::SS2IntervalMap from std::map to std::unordered_map

The order of this container was needed at one point - so, at that point
create a temporary array of pointers, sort those, then iterate them.
This keeps lookup efficient (& the lesser issue, of allowing the use of
emplace... ), object identity preserved, and ordered iteration in the
one place that requires it.

While this has no functional change, I realize it does mean allocating
an extra data structure and performing a sort - so if this looks suspect
to anyone regarding perf characteristics, I'm all ears.

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

9 years agoFix the x86-upgrade-avx2-vbroadcast.ll test by commenting the CHECK lines
Filipe Cabecinhas [Wed, 4 Mar 2015 00:49:12 +0000 (00:49 +0000)]
Fix the x86-upgrade-avx2-vbroadcast.ll test by commenting the CHECK lines

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

9 years agoRegisterCoalescer: Gracefully continue if subrange merging fails.
Matthias Braun [Wed, 4 Mar 2015 00:43:50 +0000 (00:43 +0000)]
RegisterCoalescer: Gracefully continue if subrange merging fails.

There is a known bug where the register coalescer fails to merge
subranges when multiple ranges end up in the "overflow" bit 32 of the
lanemasks. A proper fix for this is complicated so for now this is a
workaround which lets the register coalescer drop the subregister
liveness information (we just loose some precision by that) and
continue.

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

9 years agoDrop the "eh_" from eh_func_begin and eh_func_end.
Rafael Espindola [Wed, 4 Mar 2015 00:27:43 +0000 (00:27 +0000)]
Drop the "eh_" from eh_func_begin and eh_func_end.

They will be used for more than eh tables.

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

9 years agoRevert "unique_ptrify LiveRange::segmentSet"
David Blaikie [Wed, 4 Mar 2015 00:15:02 +0000 (00:15 +0000)]
Revert "unique_ptrify LiveRange::segmentSet"

Apparently something does care about ordering of LiveIntervals... so
revert all that stuff (r231175, r231176, r231177) & take some time to
re-evaluate.

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

9 years ago[RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instruc...
Philip Reames [Wed, 4 Mar 2015 00:13:52 +0000 (00:13 +0000)]
[RewriteStatepointsForGC] Fix a relocation bug w.r.t values defined by invoke instructions

RewriteStatepointsForGC pass emits an alloca for each GC pointer which will be relocated. It then inserts stores after def and all relocations, and inserts loads before each use as well. In the end, mem2reg is used to update IR with relocations in SSA form.

However, there is a problem with inserting stores for values defined by invoke instructions. The code didn't expect a def was a terminator instruction, and inserting instructions after these terminators resulted in malformed IR.

This patch fixes this problem by handling invoke instructions as a special case. If the def is an invoke instruction, the store will be inserted at the beginning of the normal destination block. Since return value from invoke instruction does not dominate the unwind destination block, no action is needed there.

Patch by: Chen Li
Differential Revision: http://reviews.llvm.org/D7923

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

9 years agoRemove 'llvm.x86.avx2.vbroadcasti128' intrinsic.
Juergen Ributzka [Wed, 4 Mar 2015 00:13:25 +0000 (00:13 +0000)]
Remove 'llvm.x86.avx2.vbroadcasti128' intrinsic.

The intrinsic is no longer generated by the front-end. Remove the intrinsic and
auto-upgrade it to a vector shuffle.

Reviewed by Nadav

This is related to rdar://problem/18742778.

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

9 years agoDocument the LLVM "thunk" attribute added back in r226708
Reid Kleckner [Wed, 4 Mar 2015 00:08:56 +0000 (00:08 +0000)]
Document the LLVM "thunk" attribute added back in r226708

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

9 years agoUpdate twoaddr-coalesce-3.ll to run on darwin and linux machines:
Eric Christopher [Tue, 3 Mar 2015 23:56:20 +0000 (23:56 +0000)]
Update twoaddr-coalesce-3.ll to run on darwin and linux machines:

a) Default relocation model differences,
b) Different numbers of # in comments

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

9 years agoAdd missing header include
David Blaikie [Tue, 3 Mar 2015 23:54:35 +0000 (23:54 +0000)]
Add missing header include

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

9 years agoRecommit r231168: unique_ptrify LiveRange::segmentSet
David Blaikie [Tue, 3 Mar 2015 23:53:03 +0000 (23:53 +0000)]
Recommit r231168: unique_ptrify LiveRange::segmentSet

GCC 4.7's libstdc++ doesn't have std::map::emplace, but it does have
std::unordered_map::emplace, and the use case here doesn't appear to
need ordering. The container has been changed in a separate/precursor
patch, and now this patch should hopefully build cleanly even with
GCC 4.7.

Original commit message:
This makes LiveRange non-copyable, and LiveInterval is already
non-movable (due to the explicit dtor), so now it's non-copyable and
non-movable.

Fix the one case where we were relying on the (deprecated in C++11)
implicit copy ctor of LiveInterval (which happened to work because the
ctor created an object with a null segmentSet, so double-deleting the
null pointer was fine).

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

9 years agoChange LiveStackAnalysis::SS2IntervalMap from std::map to std::unordered_map
David Blaikie [Tue, 3 Mar 2015 23:53:00 +0000 (23:53 +0000)]
Change LiveStackAnalysis::SS2IntervalMap from std::map to std::unordered_map

This use case doesn't appear to benefit from ordering, and
std::unordered_map has the advantage that it supports emplace (the
LiveInterval values really shouldn't be copyable or movable & they won't
be in a near-future patch).

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

9 years agoRevert "unique_ptrify LiveRange::segmentSet"
David Blaikie [Tue, 3 Mar 2015 23:44:07 +0000 (23:44 +0000)]
Revert "unique_ptrify LiveRange::segmentSet"

GCC 4.7 *shakes fist* (doesn't have std::map::emplace... )

This reverts commit r231168.

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

9 years agoMove TargetLibraryInfo data from two files into one common .def file.
Jan Wen Voung [Tue, 3 Mar 2015 23:41:58 +0000 (23:41 +0000)]
Move TargetLibraryInfo data from two files into one common .def file.

Summary:
This makes it more obvious that the enum definition and the
"StandardName" array is in sync. Mechanically refactored w/ a
python script.

Test Plan: still compiles

Subscribers: llvm-commits

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

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

9 years agounique_ptrify LiveRange::segmentSet
David Blaikie [Tue, 3 Mar 2015 23:30:40 +0000 (23:30 +0000)]
unique_ptrify LiveRange::segmentSet

This makes LiveRange non-copyable, and LiveInterval is already
non-movable (due to the explicit dtor), so now it's non-copyable and
non-movable.

Fix the one case where we were relying on the (deprecated in C++11)
implicit copy ctor of LiveInterval (which happened to work because the
ctor created an object with a null segmentSet, so double-deleting the
null pointer was fine).

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

9 years ago[sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing).
Kostya Serebryany [Tue, 3 Mar 2015 23:27:02 +0000 (23:27 +0000)]
[sanitizer/coverage] Add AFL-style coverage counters (search heuristic for fuzzing).

Introduce -mllvm -sanitizer-coverage-8bit-counters=1
which adds imprecise thread-unfriendly 8-bit coverage counters.

The run-time library maps these 8-bit counters to 8-bit bitsets in the same way
AFL (http://lcamtuf.coredump.cx/afl/technical_details.txt) does:
counter values are divided into 8 ranges and based on the counter
value one of the bits in the bitset is set.
The AFL ranges are used here: 1, 2, 3, 4-7, 8-15, 16-31, 32-127, 128+.

These counters provide a search heuristic for single-threaded
coverage-guided fuzzers, we do not expect them to be useful for other purposes.

Depending on the value of -fsanitize-coverage=[123] flag,
these counters will be added to the function entry blocks (=1),
every basic block (=2), or every edge (=3).

Use these counters as an optional search heuristic in the Fuzzer library.
Add a test where this heuristic is critical.

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

9 years agoRemove subtarget dependence in pass pipeline setup for AArch64.
Eric Christopher [Tue, 3 Mar 2015 23:22:40 +0000 (23:22 +0000)]
Remove subtarget dependence in pass pipeline setup for AArch64.

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

9 years agoWinEH: Remove vestigial EH object
Reid Kleckner [Tue, 3 Mar 2015 23:20:30 +0000 (23:20 +0000)]
WinEH: Remove vestigial EH object

Ultimately, we'll need to leave something behind to indicate which
alloca will hold the exception, but we can figure that out when it comes
time to emit the __CxxFrameHandler3 catch handler table.

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

9 years agoLangRef: Clarify select's semantics with vector arguments
David Majnemer [Tue, 3 Mar 2015 22:45:47 +0000 (22:45 +0000)]
LangRef: Clarify select's semantics with vector arguments

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

9 years agoInstCombine: Ensure select condition types are identical before merging
David Majnemer [Tue, 3 Mar 2015 22:40:36 +0000 (22:40 +0000)]
InstCombine: Ensure select condition types are identical before merging

Selection conditions may be vectors or scalars.  Make sure InstCombine
doesn't indiscriminately assume that a select which is value dependent
on another select have identical select condition types.

This fixes PR22773.

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

9 years agoMoving WinEH outlining tests to an architecture neutral location
Andrew Kaylor [Tue, 3 Mar 2015 22:33:39 +0000 (22:33 +0000)]
Moving WinEH outlining tests to an architecture neutral location

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

9 years agoAvoid copying LiveInterval, this could lead to a double-delete
David Blaikie [Tue, 3 Mar 2015 22:25:48 +0000 (22:25 +0000)]
Avoid copying LiveInterval, this could lead to a double-delete

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

9 years agoFix a problem where the TwoAddressInstructionPass which generate redundant register...
Eric Christopher [Tue, 3 Mar 2015 22:03:03 +0000 (22:03 +0000)]
Fix a problem where the TwoAddressInstructionPass which generate redundant register moves in a loop.

From:
int M, total;
void foo() {
int i;
for (i = 0; i < M; i++) {
  total = total + i / 2;
}
}

This is the kernel loop:

.LBB0_2: # %for.body

=>This Inner Loop Header: Depth=1
movl %edx, %esi
movl %ecx, %edx
shrl $31, %edx
addl %ecx, %edx
sarl %edx
addl %esi, %edx
incl %ecx
cmpl %eax, %ecx
jl .LBB0_2
--------------------------
The first mov insn "movl %edx, %esi" could be removed if we change "addl %esi, %edx" to "addl %edx, %esi".

The IR before TwoAddressInstructionPass is:
BB#2: derived from LLVM BB %for.body

Predecessors according to CFG: BB#1 BB#2
    %vreg3<def> = COPY %vreg12<kill>; GR32:%vreg3,%vreg12
    %vreg2<def> = COPY %vreg11<kill>; GR32:%vreg2,%vreg11
    %vreg7<def,tied1> = SHR32ri %vreg3<tied0>, 31, %EFLAGS<imp-def,dead>; GR32:%vreg7,%vreg3
    %vreg8<def,tied1> = ADD32rr %vreg3<tied0>, %vreg7<kill>, %EFLAGS<imp-def,dead>; GR32:%vreg8,%vreg3,%vreg7
    %vreg9<def,tied1> = SAR32r1 %vreg8<kill,tied0>, %EFLAGS<imp-def,dead>; GR32:%vreg9,%vreg8
    %vreg4<def,tied1> = ADD32rr %vreg9<kill,tied0>, %vreg2<kill>, %EFLAGS<imp-def,dead>; GR32:%vreg4,%vreg9,%vreg2
    %vreg5<def,tied1> = INC64_32r %vreg3<kill,tied0>, %EFLAGS<imp-def,dead>; GR32:%vreg5,%vreg3
    CMP32rr %vreg5, %vreg0, %EFLAGS<imp-def>; GR32:%vreg5,%vreg0
    %vreg11<def> = COPY %vreg4; GR32:%vreg11,%vreg4
    %vreg12<def> = COPY %vreg5<kill>; GR32:%vreg12,%vreg5
    JL_4 <BB#2>, %EFLAGS<imp-use,kill>
Now TwoAddressInstructionPass will choose vreg9 to be tied with vreg4. However, it doesn't see that there is copy from vreg4 to vreg11 and another copy from vreg11 to vreg2 inside the loop body. To remove those copies, it is necessary to choose vreg2 to be tied with vreg4 instead of vreg9. This code pattern commonly appears when there is reduction operation in a loop.

So check for a reversed copy chain and if we encounter one then we can commute the add instruction so we can avoid a copy.

Patch by Wei Mi.
http://reviews.llvm.org/D7806

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

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