oota-llvm.git
10 years agoRemove unused field from Operand
Matt Arsenault [Thu, 9 Oct 2014 19:15:18 +0000 (19:15 +0000)]
Remove unused field from Operand

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

10 years agoFix typo
Matt Arsenault [Thu, 9 Oct 2014 19:15:15 +0000 (19:15 +0000)]
Fix typo

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

10 years agoR600/SI: Legalize CopyToReg during instruction selection
Tom Stellard [Thu, 9 Oct 2014 19:06:00 +0000 (19:06 +0000)]
R600/SI: Legalize CopyToReg during instruction selection

The instruction emitter will crash if it encounters a CopyToReg
node with a non-register operand like FrameIndex.

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

10 years ago[PBQP] Add missing headers from r219421.
Lang Hames [Thu, 9 Oct 2014 18:36:59 +0000 (18:36 +0000)]
[PBQP] Add missing headers from r219421.

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

10 years agoSink DwarfDebug::createScopeChildrenDIE down into DwarfCompileUnit.
David Blaikie [Thu, 9 Oct 2014 18:24:28 +0000 (18:24 +0000)]
Sink DwarfDebug::createScopeChildrenDIE down into DwarfCompileUnit.

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

10 years ago[PBQP] Replace PBQPBuilder with composable constraints (PBQPRAConstraint).
Lang Hames [Thu, 9 Oct 2014 18:20:51 +0000 (18:20 +0000)]
[PBQP] Replace PBQPBuilder with composable constraints (PBQPRAConstraint).

This patch removes the PBQPBuilder class and its subclasses and replaces them
with a composable constraints class: PBQPRAConstraint. This allows constraints
that are only required for optimisation (e.g. coalescing, soft pairing) to be
mixed and matched.

This patch also introduces support for target writers to supply custom
constraints for their targets by overriding a TargetSubtargetInfo method:

std::unique_ptr<PBQPRAConstraints> getCustomPBQPConstraints() const;

This patch should have no effect on allocations.

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

10 years agoR600/SI: Legalize INSERT_SUBREG instructions during PostISelFolding
Tom Stellard [Thu, 9 Oct 2014 18:09:15 +0000 (18:09 +0000)]
R600/SI: Legalize INSERT_SUBREG instructions during PostISelFolding

LLVM assumes INSERT_SUBREG will always have register operands, so
we need to legalize non-register operands, like FrameIndexes, to
avoid random assertion failures.

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

10 years agoSink DwarfDebug.cpp::constructVariableDIE into DwarfCompileUnit.
David Blaikie [Thu, 9 Oct 2014 17:56:39 +0000 (17:56 +0000)]
Sink DwarfDebug.cpp::constructVariableDIE into DwarfCompileUnit.

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

10 years agoMove DwarfUnit::constructVariableDIE down to DwarfCompileUnit, since it's only needed...
David Blaikie [Thu, 9 Oct 2014 17:56:36 +0000 (17:56 +0000)]
Move DwarfUnit::constructVariableDIE down to DwarfCompileUnit, since it's only needed there.

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

10 years ago[PPC64] VSX indexed-form loads use wrong instruction format
Bill Schmidt [Thu, 9 Oct 2014 17:51:35 +0000 (17:51 +0000)]
[PPC64] VSX indexed-form loads use wrong instruction format

The VSX instruction definitions for lxsdx, lxvd2x, lxvdsx, and lxvw4x
incorrectly use the XForm_1 instruction format, rather than the
XX1Form instruction format.  This is likely a pasto when creating
these instructions, which were based on lvx and so forth.  This patch
uses the correct format.

The existing reformatting test (test/MC/PowerPC/vsx.s) missed this
because the two formats differ only in that XX1Form has an extension
to the target register field in bit 31.  The tests for these
instructions used a target register of 7, so the default of 0 in bit
31 for XForm_1 didn't expose a problem.  For register numbers 32-63
this would be noticeable.  I've changed the test to use higher
register numbers to verify my change is effective.

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

10 years agoSink DwarfDebug::constructLexicalScopeDIE into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 17:08:42 +0000 (17:08 +0000)]
Sink DwarfDebug::constructLexicalScopeDIE into DwarfCompileUnit

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

10 years agoMissing reformatting
David Blaikie [Thu, 9 Oct 2014 17:08:38 +0000 (17:08 +0000)]
Missing reformatting

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

10 years agoSink DwarfDebug::constructInlinedScopeDIE into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 16:50:53 +0000 (16:50 +0000)]
Sink DwarfDebug::constructInlinedScopeDIE into DwarfCompileUnit

This introduces access to the AbstractSPDies map from DwarfDebug so
DwarfCompileUnit can access it. Eventually this'll sink down to
DwarfFile, but it'll still be generically accessible - not much
encapsulation to provide it. (constructInlinedScopeDIE could stay
further up, in DwarfFile to avoid exposing this - but I don't think
that's particularly better)

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

10 years ago[InstCombine] Fix wrong folding of constant comparisons involving ashr and negative...
Andrea Di Biagio [Thu, 9 Oct 2014 12:41:49 +0000 (12:41 +0000)]
[InstCombine] Fix wrong folding of constant comparisons involving ashr and negative values.

This patch fixes a bug in method InstCombiner::FoldCmpCstShrCst where we
wrongly computed the distance between the highest bits set of two negative
values.

This fixes PR21222.

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

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

10 years ago[AArch64] Enable partial & runtime unrolling on cortex-a57.
Kevin Qin [Thu, 9 Oct 2014 10:13:27 +0000 (10:13 +0000)]
[AArch64] Enable partial & runtime unrolling on cortex-a57.

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

10 years agoObject, COFF: Move the VirtualSize/SizeOfRawData logic to getSectionSize
David Majnemer [Thu, 9 Oct 2014 08:42:31 +0000 (08:42 +0000)]
Object, COFF: Move the VirtualSize/SizeOfRawData logic to getSectionSize

While getSectionContents was updated to do the right thing,
getSectionSize wasn't.  Move the logic to getSectionSize and leverage it
from getSectionContents.

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

10 years ago[AVX512] Extended avx512_binop_rm for AVX512VL subsets.
Robert Khasanov [Thu, 9 Oct 2014 08:38:48 +0000 (08:38 +0000)]
[AVX512] Extended avx512_binop_rm for AVX512VL subsets.
Added avx512_binop_rm_vl multiclass for VL subset
Added encoding tests

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

10 years agoObject, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData)
David Majnemer [Thu, 9 Oct 2014 07:49:28 +0000 (07:49 +0000)]
Object, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData)

It is not useful to return the data beyond VirtualSize it's less than
SizeOfRawData.

An implementation detail of COFF requires the section size to be rounded
up to a multiple of FileAlignment; this means that SizeOfRawData is not
representative of how large the section is.  Instead, we should cap it
to VirtualSize when this occurs as it represents the true size of the
section.

Note that this is only relevant in executable files because this
rounding doesn't occur in object files (and VirtualSize is always zero).

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

10 years agoRemove more calls to getSubtargetImpl from the schedulers and
Eric Christopher [Thu, 9 Oct 2014 06:28:06 +0000 (06:28 +0000)]
Remove more calls to getSubtargetImpl from the schedulers and
remove cached or unnecessary TargetMachines.

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

10 years agoUse triple's isiOS() and isOSDarwin() methods.
Bob Wilson [Thu, 9 Oct 2014 05:43:30 +0000 (05:43 +0000)]
Use triple's isiOS() and isOSDarwin() methods.

These methods are already used in lots of places. This makes things more
consistent. NFC.

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

10 years agoObject: Add range iterators for COFF import/export table
Rui Ueyama [Thu, 9 Oct 2014 02:16:38 +0000 (02:16 +0000)]
Object: Add range iterators for COFF import/export table

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

10 years agoRemove unused argument to CreateTargetScheduleState and change
Eric Christopher [Thu, 9 Oct 2014 01:59:35 +0000 (01:59 +0000)]
Remove unused argument to CreateTargetScheduleState and change
the TargetMachine to a TargetSubtargetInfo since everything
we wanted is off of that.

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

10 years agoRemove uses of getSubtargetImpl from ResourcePriorityQueue and
Eric Christopher [Thu, 9 Oct 2014 01:59:31 +0000 (01:59 +0000)]
Remove uses of getSubtargetImpl from ResourcePriorityQueue and
replace them with calls off of the MachineFuncton.

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

10 years agoRemove the uses of getSubtargetImpl from InstrEmitter and remove
Eric Christopher [Thu, 9 Oct 2014 01:35:29 +0000 (01:35 +0000)]
Remove the uses of getSubtargetImpl from InstrEmitter and remove
the now unused TargetMachine variable.

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

10 years agoUse the subtarget on the dag to get TargetFrameLowering rather
Eric Christopher [Thu, 9 Oct 2014 01:35:27 +0000 (01:35 +0000)]
Use the subtarget on the dag to get TargetFrameLowering rather
than off the target machine.

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

10 years agoRemove uses of the TargetMachine from FunctionLoweringInfo
Eric Christopher [Thu, 9 Oct 2014 00:57:31 +0000 (00:57 +0000)]
Remove uses of the TargetMachine from FunctionLoweringInfo
via caching TargetLowering and using the MachineFunction.

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

10 years agoPush DwarfDebug::attachRangesOrLowHighPC down into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 00:21:42 +0000 (00:21 +0000)]
Push DwarfDebug::attachRangesOrLowHighPC down into DwarfCompileUnit

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

10 years agoSink DwarfDebug::addScopeRangeList down into DwarfCompileUnit
David Blaikie [Thu, 9 Oct 2014 00:11:39 +0000 (00:11 +0000)]
Sink DwarfDebug::addScopeRangeList down into DwarfCompileUnit

(& add a few accessors/make a couple of things public for this - it's a
bit of a toss-up, but I think I prefer it this way, keeping some more of
the meaty code down in DwarfCompileUnit - if only to make for smaller
implementation files, etc)

I think we could simplify range handling a bit if we removed the range
lists from each unit and just put a single range list on DwarfDebug,
similar to address pooling.

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

10 years agoRemove unnecessary include.
Eric Christopher [Wed, 8 Oct 2014 23:38:40 +0000 (23:38 +0000)]
Remove unnecessary include.

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

10 years agoUse both the cached TLI and the subtarget off of the DAG in
Eric Christopher [Wed, 8 Oct 2014 23:38:39 +0000 (23:38 +0000)]
Use both the cached TLI and the subtarget off of the DAG in
the DAG combiner.

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

10 years agoRemove getSubtargetImpl calls from FastISel, we can get it from
Eric Christopher [Wed, 8 Oct 2014 23:38:33 +0000 (23:38 +0000)]
Remove getSubtargetImpl calls from FastISel, we can get it from
the MachineFunction where it's already cached.

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

10 years agoFix typo in comment
Robin Morisset [Wed, 8 Oct 2014 23:30:45 +0000 (23:30 +0000)]
Fix typo in comment

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

10 years agoSink DwarfUnit::addSectionDelta into DwarfCompileUnit, the only place it's needed.
David Blaikie [Wed, 8 Oct 2014 23:30:05 +0000 (23:30 +0000)]
Sink DwarfUnit::addSectionDelta into DwarfCompileUnit, the only place it's needed.

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

10 years ago[AVX512] Rename AVX512_masking* to AVX512_maskable*
Adam Nemet [Wed, 8 Oct 2014 23:25:39 +0000 (23:25 +0000)]
[AVX512] Rename AVX512_masking* to AVX512_maskable*

No functional change.

This is the current AVX512_maskable multiclass hierarchy:

                 maskable_custom
                    /       \
                   /         \
          maskable_common   maskable_in_asm
            /         \
           /           \
      maskable        maskable_3src

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

10 years ago[AVX512] Intrinsics for vextract*x4
Adam Nemet [Wed, 8 Oct 2014 23:25:37 +0000 (23:25 +0000)]
[AVX512] Intrinsics for vextract*x4

This adds the Pat<>'s for the intrinsics.  These are necessary because we
don't lower these intrinsics to SDNodes but match them directly.  See the
rational in the previous commit.

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

10 years ago[AVX512] Add asm-only support for vextract*x4 masking variants
Adam Nemet [Wed, 8 Oct 2014 23:25:33 +0000 (23:25 +0000)]
[AVX512] Add asm-only support for vextract*x4 masking variants

These derive from the new asm-only masking definitions.

Unfortunately I wasn't able to find a ISel pattern that we could legally
generate for the masking variants.  The problem is that since the destination
is v4* we would need VK4 register classes and v4i1 value types to express the
masking.  These are however not legal types/classes in AVX512f but only in VL,
so things get complicated pretty quickly.  We can revisit this question later
if we have a more pressing need to express something like this.

So the ISel patterns are empty for the masking instructions and the next patch
will add Pat<>s instead to match the intrinsics calls with instructions.

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

10 years ago[AVX512] Move DAG for all-zero node to X86VectorVTInfo
Adam Nemet [Wed, 8 Oct 2014 23:25:31 +0000 (23:25 +0000)]
[AVX512] Move DAG for all-zero node to X86VectorVTInfo

No functional change.

No change in X86.td.expanded except for the appearance of the new attributes.

The new attributes will be used in the subsequent patch.

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

10 years ago[AVX512] Support mask register in MRMDestReg format
Adam Nemet [Wed, 8 Oct 2014 23:25:29 +0000 (23:25 +0000)]
[AVX512] Support mask register in MRMDestReg format

This is necessary for masking vextract*x4.

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

10 years ago[AVX512] Peel off an asm-only class from AVX512_masking_common.
Adam Nemet [Wed, 8 Oct 2014 23:25:23 +0000 (23:25 +0000)]
[AVX512] Peel off an asm-only class from AVX512_masking_common.

No functional change.

This enables the generation of masking instructions that don't provide a
ISel pattern.

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

10 years ago[X86] Don't transform atomic-load-add into an inc/dec when inc/dec is slow
Robin Morisset [Wed, 8 Oct 2014 23:16:23 +0000 (23:16 +0000)]
[X86] Don't transform atomic-load-add into an inc/dec when inc/dec is slow

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

10 years agoReformat some stuff I missed in recent previous commits
David Blaikie [Wed, 8 Oct 2014 23:09:42 +0000 (23:09 +0000)]
Reformat some stuff I missed in recent previous commits

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

10 years agoRevert r219354. It seems to break some buildbots.
Alexey Samsonov [Wed, 8 Oct 2014 23:07:59 +0000 (23:07 +0000)]
Revert r219354. It seems to break some buildbots.

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

10 years agoUse llvm-symbolizer to symbolize LLVM/Clang crash dumps.
Alexey Samsonov [Wed, 8 Oct 2014 22:57:47 +0000 (22:57 +0000)]
Use llvm-symbolizer to symbolize LLVM/Clang crash dumps.

This change modifies fatal signal handler used in LLVM tools.
Now it attempts to find llvm-symbolizer binary and communicates
with it in order to turn instruction addresses into
function/file/line info entries. This should significantly improve
stack traces readability in Debug builds.

This feature only works on selected platforms (including Darwin
and Linux). If the symbolization fails for some reason, signal
handler will fallback to the original behavior.

Reviewed in http://reviews.llvm.org/D5610

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

10 years agoSink and coalesce DwarfDebug.cpp::addSectionLabel and DwarfUnit::addSectionLabel...
David Blaikie [Wed, 8 Oct 2014 22:46:27 +0000 (22:46 +0000)]
Sink and coalesce DwarfDebug.cpp::addSectionLabel and DwarfUnit::addSectionLabel down into DwarfCompileUnit::addSectionLabel

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

10 years agoRemove dead call to getTypeToTransformTo. The result is
Eric Christopher [Wed, 8 Oct 2014 22:25:45 +0000 (22:25 +0000)]
Remove dead call to getTypeToTransformTo. The result is
unused.

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

10 years agoDebugInfo: The rest of pushing DwarfDebug::constructScopeDIE down into DwarfCompileUnit
David Blaikie [Wed, 8 Oct 2014 22:23:10 +0000 (22:23 +0000)]
DebugInfo: The rest of pushing DwarfDebug::constructScopeDIE down into DwarfCompileUnit

Funnily enough, I copied it, but didn't actually remove the original in
r219345. Let's do that.

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

10 years agoPush DwarfDebug::constructScopeDIE down into DwarfCompileUnit
David Blaikie [Wed, 8 Oct 2014 22:20:02 +0000 (22:20 +0000)]
Push DwarfDebug::constructScopeDIE down into DwarfCompileUnit

One of many steps to generalize subprogram emission to both the DWO and
non-DWO sections (to emit -gmlt-like data under fission). Once the
functions are pushed down into DwarfCompileUnit some of the data
structures will be pushed at least into DwarfFile so that they can be
unique per-file, allowing emission to both files independently.

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

10 years agoRemove a bunch of getSubtargetImpl calls since we already have
Eric Christopher [Wed, 8 Oct 2014 21:08:32 +0000 (21:08 +0000)]
Remove a bunch of getSubtargetImpl calls since we already have
a cached TLI instance.

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

10 years ago[X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())
Robin Morisset [Wed, 8 Oct 2014 19:38:18 +0000 (19:38 +0000)]
[X86] Avoid generating inc/dec when slow for x.atomic_store(1 + x.atomic_load())

Summary:
I had forgotten to check for NotSlowIncDec in the patterns that can generate
inc/dec for the above pattern (added in D4796).
This currently applies to Atom Silvermont, KNL and SKX.

Test Plan: New checks on atomic_mi.ll

Reviewers: jfb, nadav

Subscribers: llvm-commits

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

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

10 years agoInliner: Non-local functions in COMDATs shouldn't be dropped
David Majnemer [Wed, 8 Oct 2014 19:32:32 +0000 (19:32 +0000)]
Inliner: Non-local functions in COMDATs shouldn't be dropped

A function with discardable linkage cannot be discarded if its a member
of a COMDAT group without considering all the other COMDAT members as
well.  This sort of thing is already handled by GlobalOpt/GlobalDCE.

This fixes PR21206.

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

10 years agoFix COFF section index relocation should be 16 bits, not 32
Timur Iskhodzhanov [Wed, 8 Oct 2014 18:01:49 +0000 (18:01 +0000)]
Fix COFF section index relocation should be 16 bits, not 32

Original patch by Andrey Guskov!
http://reviews.llvm.org/D5651

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

10 years agoCorrectly compute the size of common symbols in COFF.
Rafael Espindola [Wed, 8 Oct 2014 17:37:19 +0000 (17:37 +0000)]
Correctly compute the size of common symbols in COFF.

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

10 years agoPrint symbol sizes in this test in preparation for fixing COFF common sizes.
Rafael Espindola [Wed, 8 Oct 2014 17:19:42 +0000 (17:19 +0000)]
Print symbol sizes in this test in preparation for fixing COFF common sizes.

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

10 years agoRevert "[InstCombine] re-commit r218721 with fix for pr21199"
Justin Bogner [Wed, 8 Oct 2014 16:30:22 +0000 (16:30 +0000)]
Revert "[InstCombine] re-commit r218721 with fix for pr21199"

This seems to cause a miscompile when building clang, which causes a
bootstrapped clang to fail or crash in several of its tests.

See:
  http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-RA/builds/1184
  http://bb.pgr.jp/builders/clang-3stage-x86_64-linux/builds/7813

This reverts commit r219282.

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

10 years ago[AVX512] Added intrinsics for 128-, 256- and 512-bit versions of VPCMP/VPCMPU{BWDQ}
Robert Khasanov [Wed, 8 Oct 2014 15:49:26 +0000 (15:49 +0000)]
[AVX512] Added intrinsics for 128-, 256- and 512-bit versions of VPCMP/VPCMPU{BWDQ}
Added CMP_MASK_CC intrinsic type.
Added tests for intrinsics.

Patch by Sergey Lisitsyn <sergey.lisitsyn@intel.com>

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

10 years agoRemove bogus std::error_code returns form SectionRef.
Rafael Espindola [Wed, 8 Oct 2014 15:28:58 +0000 (15:28 +0000)]
Remove bogus std::error_code returns form SectionRef.

There are two methods in SectionRef that can fail:

* getName: The index into the string table can be invalid.
* getContents: The section might point to invalid contents.

Every other method will always succeed and returning and std::error_code just
complicates the code. For example, a section can have an invalid alignment,
but if we are able to get to the section structure at all and create a
SectionRef, we will always be able to read that invalid alignment.

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

10 years agoFix indentation.
Rafael Espindola [Wed, 8 Oct 2014 15:12:20 +0000 (15:12 +0000)]
Fix indentation.

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

10 years agoUpdate dwarf::ApplePropertyAttributes enum to meaningful values.
Frederic Riss [Wed, 8 Oct 2014 14:59:44 +0000 (14:59 +0000)]
Update dwarf::ApplePropertyAttributes enum to meaningful values.

Summary:
We currently emit an DW_AT_APPLE_property_attribute with a value that is a
bitfield describing the various attributes applied to an ObjectiveC property.
While trying to add testing to one of my dwarfdump patches that would pretty
print that, I realized this information looks totally broken and has maybe
never been correct.

As with every DWARF info, we have some enum in Dwarf.h that describes this
attribute (enum ApplePropertyAttributes). It seems however that the attribute
value is set from another definition of these flags in Sema/DeclSpec.h (enum
ObjCPropertyAttributeKind). And these 2 enums aren't in sync.

This patch updates the Dwarf.h values to the ones we are (and have been for
a very long time) emitting. We change some publicly (and even documented
in SourceLevelDebugging.rst) values, but I doubt this could be an issue as
the information has been wrong for so long...

Reviewers: echristo, dblaikie, aprantl

Subscribers: llvm-commits

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

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

10 years ago[AVX512] Refactoring of avx512_binop_rm multiclass through AVX512_masking.
Robert Khasanov [Wed, 8 Oct 2014 14:37:45 +0000 (14:37 +0000)]
[AVX512] Refactoring of avx512_binop_rm multiclass through AVX512_masking.
Added new argrument for AVX512_masking: InstrItinClass and bit isCommutable.
No functional change.

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

10 years agoRemove an out of date comment.
Rafael Espindola [Wed, 8 Oct 2014 14:27:05 +0000 (14:27 +0000)]
Remove an out of date comment.

After 4 years there is still no normalization library. We do support
disassembly and relocations, so it doesn't look like we need it.

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

10 years agoEmit unaligned access build attribute for ARM
Renato Golin [Wed, 8 Oct 2014 12:26:22 +0000 (12:26 +0000)]
Emit unaligned access build attribute for ARM

Patch by Charlie Turner.

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

10 years agoRefactor isThumb1Only() && isMClass() into a predicate called isV6M()
Renato Golin [Wed, 8 Oct 2014 12:26:16 +0000 (12:26 +0000)]
Refactor isThumb1Only() && isMClass() into a predicate called isV6M()

This must be enforced for all v6M cores, not just the cortex-m0,
irregardless of the user-specified alignment.

Patch by Charlie Turner.

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

10 years agoSimplify switch statement in ARM subtarget align access
Renato Golin [Wed, 8 Oct 2014 12:26:13 +0000 (12:26 +0000)]
Simplify switch statement in ARM subtarget align access

This switch can be reduced to a simpler if/else statement.

Patch by Charlie Turner.

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

10 years agoUse the TargetLowering information we already have on the
Eric Christopher [Wed, 8 Oct 2014 09:50:54 +0000 (09:50 +0000)]
Use the TargetLowering information we already have on the
SelectionDAG in SelectionDAGBuilder rather than going through
the TargetMachine for lookup.

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

10 years agoGrab the TargetRegisterInfo off of the subtarget from the
Eric Christopher [Wed, 8 Oct 2014 09:50:52 +0000 (09:50 +0000)]
Grab the TargetRegisterInfo off of the subtarget from the
MachineFunction rather than a lookup on the TargetMachine
to avoid unnecessary lookups.

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

10 years agoUpdate git-svnrevert to accept git and svn revisions
Renato Golin [Wed, 8 Oct 2014 09:32:47 +0000 (09:32 +0000)]
Update git-svnrevert to accept git and svn revisions

Interchangeable commit ids can now be used on this git-svnrevert, which
will figure out what kind of commit that is (if you use format rNNNN for SVN
commits) and make sure the right ids are used in the right places.

It's a little bit more robust and user-friendly.

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

10 years agoUnix/Process: Don't use pthread_sigmask if we aren't built with threads
David Majnemer [Wed, 8 Oct 2014 08:48:43 +0000 (08:48 +0000)]
Unix/Process: Don't use pthread_sigmask if we aren't built with threads

We won't link in pthreads if we weren't built with LLVM_ENABLE_THREADS
which means we won't get access to pthread_sigmask.  Use sigprocmask
instead.

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

10 years agoReplace calls to get the subtarget and TargetFrameLowering with
Eric Christopher [Wed, 8 Oct 2014 08:46:34 +0000 (08:46 +0000)]
Replace calls to get the subtarget and TargetFrameLowering with
cached variables and a single call in the constructor.

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

10 years agoFormat spacing and remove extra lines to comply with standards. NFC.
Suyog Sarda [Wed, 8 Oct 2014 08:37:49 +0000 (08:37 +0000)]
Format spacing and remove extra lines to comply with standards. NFC.

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

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

10 years agoUse cached subtarget rather than looking it up on the
Eric Christopher [Wed, 8 Oct 2014 07:51:41 +0000 (07:51 +0000)]
Use cached subtarget rather than looking it up on the
TargetMachine again.

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

10 years agoCache TargetLowering on SelectionDAGISel and update previous
Eric Christopher [Wed, 8 Oct 2014 07:32:17 +0000 (07:32 +0000)]
Cache TargetLowering on SelectionDAGISel and update previous
calls to getTargetLowering() with the cached variable.

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

10 years agoGlobalOpt: Don't drop unused memberes of a Comdat
David Majnemer [Wed, 8 Oct 2014 07:23:31 +0000 (07:23 +0000)]
GlobalOpt: Don't drop unused memberes of a Comdat

A linkonce_odr member of a COMDAT shouldn't be dropped if we need to
keep the entire COMDAT group.

This fixes PR21191.

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

10 years ago[InstCombine] re-commit r218721 with fix for pr21199
Gerolf Hoflehner [Wed, 8 Oct 2014 06:42:19 +0000 (06:42 +0000)]
[InstCombine] re-commit r218721 with fix for pr21199

The icmp-select-icmp optimization targets select-icmp.eq
only. This is now ensured by testing the branch predicate
explictly. This commit also includes the test case for pr21199.

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

10 years agoCOFF: Don't oversize COMMON symbols when targeting BFD ld
David Majnemer [Wed, 8 Oct 2014 06:38:53 +0000 (06:38 +0000)]
COFF: Don't oversize COMMON symbols when targeting BFD ld

COFF normally doesn't allow us to describe the alignment of COMMON
symbols.

It turns out that most linkers use the symbol size as a hint as to how
aligned the symbol should be.

However the BFD folks have added a .drectve command, which we
now support as of r219229, that allows us to specify the alignment
precisely.  With this in mind, stop rounding sizes up.

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

10 years agollvm-dwarfdump: Add support for some COFF relocations
David Majnemer [Wed, 8 Oct 2014 06:38:50 +0000 (06:38 +0000)]
llvm-dwarfdump: Add support for some COFF relocations

DWARF in COFF utilizes several relocations.  Implement support for them
in RelocVisitor to support llvm-dwarfdump.

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

10 years ago[AArch64] Generate vector signed/unsigned mul and mla/mls long.
Chad Rosier [Wed, 8 Oct 2014 02:31:24 +0000 (02:31 +0000)]
[AArch64] Generate vector signed/unsigned mul and mla/mls long.

Phabricator Revision: http://reviews.llvm.org/D5589
Patch by Balaram Makam <bmakam@codeaurora.org>!!

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

10 years agollvm-readobj: add test for r219228
Rui Ueyama [Wed, 8 Oct 2014 02:06:11 +0000 (02:06 +0000)]
llvm-readobj: add test for r219228

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

10 years agoCache SelectionDAGISel TargetInstrInfo lookups on the class and
Eric Christopher [Wed, 8 Oct 2014 01:58:03 +0000 (01:58 +0000)]
Cache SelectionDAGISel TargetInstrInfo lookups on the class and
propagate. Also use the TargetSubtargetInfo and the MachineFunction
and move TargetRegisterInfo query closer to uses.

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

10 years agoReset the target options and optimization level as the first
Eric Christopher [Wed, 8 Oct 2014 01:58:01 +0000 (01:58 +0000)]
Reset the target options and optimization level as the first
thing we do inside selection dag. This code needs to be
migrated to queries on the function rather than global
data, but this organizes things before we start grabbing
the subtarget.

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

10 years agoHave the selection dag grab TargetLowering off of the subtarget
Eric Christopher [Wed, 8 Oct 2014 01:57:58 +0000 (01:57 +0000)]
Have the selection dag grab TargetLowering off of the subtarget
inside init rather than have it passed in as an argument.

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

10 years agoRevert r219175 - [InstCombine] re-commit r218721 icmp-select-icmp optimization
Hans Wennborg [Wed, 8 Oct 2014 01:05:57 +0000 (01:05 +0000)]
Revert r219175 - [InstCombine] re-commit r218721 icmp-select-icmp optimization

This seems to have caused PR21199.

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

10 years agoHave SelectionDAG's subtarget TargetSelectionDAGInfo be set
Eric Christopher [Wed, 8 Oct 2014 00:32:59 +0000 (00:32 +0000)]
Have SelectionDAG's subtarget TargetSelectionDAGInfo be set
during init rather than construction time.

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

10 years ago[DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).
Alexey Samsonov [Wed, 8 Oct 2014 00:24:41 +0000 (00:24 +0000)]
[DebugInfo] Pass DWARFSection down to DWARFUnit constructor (NFC).

Keep the actual section contents and the relocation map together.

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

10 years ago[Support] Add MemoryBuffer::getFileSlice()
Nick Kledzik [Wed, 8 Oct 2014 00:22:18 +0000 (00:22 +0000)]
[Support] Add MemoryBuffer::getFileSlice()

mach-o supports "fat" files which are a header/table-of-contents followed by a
concatenation of mach-o files built for different architectures. Currently,
MemoryBuffer has no easy way to map a subrange (slice) of a file which lld
will need to select a mach-o slice of a fat file. The new function provides
an easy way to map a slice of a file into a MemoryBuffer. Test case included.

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

10 years ago[DebugInfo] Pass DWARFSection into DWARFUnitSection constructor (NFC).
Alexey Samsonov [Wed, 8 Oct 2014 00:07:53 +0000 (00:07 +0000)]
[DebugInfo] Pass DWARFSection into DWARFUnitSection constructor (NFC).

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

10 years ago[X86] Fix a bug with fetch_add(INT32_MIN)
Robin Morisset [Tue, 7 Oct 2014 23:53:57 +0000 (23:53 +0000)]
[X86] Fix a bug with fetch_add(INT32_MIN)

Summary:
Fix pr21099

The pseudocode of what we were doing (spread through two functions) was:
if (operand.doesNotFitIn32Bits())
  Opc.initializeWithFoo();
if (operand < 0)
  operand = -operand;
if (operand.doesFitIn8Bits())
  Opc.initializeWithBar();
else if (operand.doesFitIn32Bits())
  Opc.initializeWithBlah();
doStuff(Opc);

So for operand == INT32_MIN, Opc was never initialized because the operand changes
from fitting in 32 bits to not fitting, causing the various bugs/error messages
noted by pr21099.

This patch adds an extra test at the beginning for this case, and an
llvm_unreachable to have better error message if the operand ends up
not fitting in 32-bits at the end.

Test Plan: new test + make check

Reviewers: jfb

Subscribers: llvm-commits

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

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

10 years agoR600/SI: Refactor VOP3 instruction defs
Tom Stellard [Tue, 7 Oct 2014 23:51:41 +0000 (23:51 +0000)]
R600/SI: Refactor VOP3 instruction defs

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

10 years agoR600/SI: Refactor VOPC instruction defs
Tom Stellard [Tue, 7 Oct 2014 23:51:39 +0000 (23:51 +0000)]
R600/SI: Refactor VOPC instruction defs

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

10 years agoR600/SI: Refactor VOP2 instruction defs
Tom Stellard [Tue, 7 Oct 2014 23:51:38 +0000 (23:51 +0000)]
R600/SI: Refactor VOP2 instruction defs

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

10 years agoR600/SI: Refactor VOP1 instruction defs
Tom Stellard [Tue, 7 Oct 2014 23:51:34 +0000 (23:51 +0000)]
R600/SI: Refactor VOP1 instruction defs

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

10 years ago[DebugInfo] Turn DWARFContext::Section into DWARFSection (NFC).
Alexey Samsonov [Tue, 7 Oct 2014 23:45:11 +0000 (23:45 +0000)]
[DebugInfo] Turn DWARFContext::Section into DWARFSection (NFC).

It would be more convenient to pass DWARFSection into DWARFUnitSection
constructor, instead of passing its components (Data and RelocAddrMap)
as a separate arguments.

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

10 years agoAdd return value and negative checks to MapVector::erase from r219240.
Kaelyn Takata [Tue, 7 Oct 2014 23:11:49 +0000 (23:11 +0000)]
Add return value and negative checks to MapVector::erase from r219240.

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

10 years agoDebugInfo+DFSan: Ensure that debug info references to llvm::Functions remain pointing...
David Blaikie [Tue, 7 Oct 2014 22:59:46 +0000 (22:59 +0000)]
DebugInfo+DFSan: Ensure that debug info references to llvm::Functions remain pointing to the underlying function when wrappers are created

This is somewhat the inverse of how similar bugs in DAE and ArgPromo
manifested and were addressed. In those passes, individual call sites
were visited explicitly, and then the old function was deleted. This
left the debug info with a null llvm::Function* that needed to be
updated to point to the new function.

In the case of DFSan, it RAUWs the old function with the wrapper, which
includes debug info. So now the debug info refers to the wrapper, which
doesn't actually have any instructions with debug info in it, so it is
ignored entirely - resulting in a DW_TAG_subprogram with no high/low pc,
etc. Instead, fix up the debug info to refer to the original function
after the RAUW messed it up.

Reviewed/discussed with Peter Collingbourne on the llvm-dev mailing
list.

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

10 years ago[Bugpoint] Close error log in ProcessFailure. Bugpoint had been failing to close
Lang Hames [Tue, 7 Oct 2014 21:47:23 +0000 (21:47 +0000)]
[Bugpoint] Close error log in ProcessFailure. Bugpoint had been failing to close
this, and in some circumstances (e.g. reducing particularly large test-cases)
this was causing bugpoint to be killed for hitting open file-handle limits.

No test case: I was only able to trigger this with test cases taking upwards of
10 mins to run.

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

10 years agoR600: Remove dead code
Matt Arsenault [Tue, 7 Oct 2014 21:29:56 +0000 (21:29 +0000)]
R600: Remove dead code

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

10 years agoLoopUnroll: Create sub-loops in LoopInfo
Duncan P. N. Exon Smith [Tue, 7 Oct 2014 21:19:00 +0000 (21:19 +0000)]
LoopUnroll: Create sub-loops in LoopInfo

`LoopUnrollPass` says that it preserves `LoopInfo` -- make it so.  In
particular, tell `LoopInfo` about copies of inner loops when unrolling
the outer loop.

Conservatively, also tell `ScalarEvolution` to forget about the original
versions of these loops, since their inputs may have changed.

Fixes PR20987.

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

10 years agoAdd size_t MapVector::erase(KeyT) similar to the one in std::map.
Kaelyn Takata [Tue, 7 Oct 2014 21:15:51 +0000 (21:15 +0000)]
Add size_t MapVector::erase(KeyT) similar to the one in std::map.

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

10 years agoLoopUnroll: Only check for ScalarEvolution analysis once, NFC
Duncan P. N. Exon Smith [Tue, 7 Oct 2014 21:12:44 +0000 (21:12 +0000)]
LoopUnroll: Only check for ScalarEvolution analysis once, NFC

A follow-up commit will add use to a tight loop.  We might as well just
find it once anyway.

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

10 years agoR600: Remove some redundant initializations from AMDGPUMCAsmInfo
Tom Stellard [Tue, 7 Oct 2014 21:09:25 +0000 (21:09 +0000)]
R600: Remove some redundant initializations from AMDGPUMCAsmInfo

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

10 years agoR600: Use MCAsmInfoELF as AMDGPUMCAsmInfo base class
Tom Stellard [Tue, 7 Oct 2014 21:09:23 +0000 (21:09 +0000)]
R600: Use MCAsmInfoELF as AMDGPUMCAsmInfo base class

The main reason for this is that the MCAsmInfo class,
which we were previously using as the base class, sets
PrivateGlobalPrefix to "L", which causes all global
functions that start with L to be treated as local symbols.

MCAsmInfoELF sets PrivateGlobalPrefix to ".L", which is what
we want, and it is probably a good idea to use this as the
base class anyway, since we are emitting ELF binaries.

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