oota-llvm.git
10 years agoAvoid using subtarget features when initializing the pass pipeline
Eric Christopher [Thu, 22 May 2014 01:21:35 +0000 (01:21 +0000)]
Avoid using subtarget features when initializing the pass pipeline
on PPC.

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

10 years agoReset the subtarget for DAGToDAG on every iteration of runOnMachineFunction.
Eric Christopher [Thu, 22 May 2014 01:07:24 +0000 (01:07 +0000)]
Reset the subtarget for DAGToDAG on every iteration of runOnMachineFunction.
This required updating the generated functions and TD file accordingly
to be pointers rather than const references.

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

10 years agoReset the subtarget for DAGToDAG on every iteration of runOnMachineFunction.
Eric Christopher [Thu, 22 May 2014 01:07:21 +0000 (01:07 +0000)]
Reset the subtarget for DAGToDAG on every iteration of runOnMachineFunction.

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

10 years agoSort includes.
Eric Christopher [Thu, 22 May 2014 01:07:18 +0000 (01:07 +0000)]
Sort includes.

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

10 years agoDebugInfo: Simplify dead variable collection slightly.
David Blaikie [Thu, 22 May 2014 00:48:36 +0000 (00:48 +0000)]
DebugInfo: Simplify dead variable collection slightly.

constructSubprogramDIE was already called for every subprogram in every
CU when the module was started - there's no need to call it again at
module finalization.

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

10 years agoFix a bug in SCEV's backedge taken count computation from my prior fix in Jan.
Andrew Trick [Thu, 22 May 2014 00:37:03 +0000 (00:37 +0000)]
Fix a bug in SCEV's backedge taken count computation from my prior fix in Jan.

This has to do with the trip count computation for loops with multiple
exits, which is quite subtle. Most passes just ask for a single trip
count number, so we must be conservative assuming any exit could be
taken.  Normally, we rely on the "exact" trip count, which was
correctly given as "unknown". However, SCEV also gives a "max"
back-edge taken count. The loops max BE taken count is conservatively
a maximum over the max of each exit's non-exiting iterations
count. Note that some exit tests can be skipped so the max loop
back-edge taken count can actually exceed the max non-exiting
iterations for some exits. However, when we know the loop *latch*
cannot be skipped, we can directly use its max taken count
disregarding other exits. I previously took the minimum here without
checking whether the other exit could be skipped. The correct, and
simpler thing to do here is just to directly use the loop latch's max
non-exiting iterations as the loops max back-edge count.

In the problematic test case, the first loop exit had a max of zero
non-exiting iterations, but could be skipped. The loop latch was known
not to be skipped but had max of one non-exiting iteration. We
incorrectly claimed the loop back-edge could be taken zero times, when
it is actually taken one time.

Fixes Loop %for.body.i: <multiple exits> Unpredictable backedge-taken count.
Loop %for.body.i: max backedge-taken count is 1.

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

10 years agoSimilar to bitcast, treat addrspacecast as a foldable operand.
Eli Bendersky [Thu, 22 May 2014 00:02:52 +0000 (00:02 +0000)]
Similar to bitcast, treat addrspacecast as a foldable operand.

Added a test sink-addrspacecast.ll to verify this change.

Patch by Jingyue Wu.

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

10 years agoFix compilation issues.
Eric Christopher [Wed, 21 May 2014 23:51:57 +0000 (23:51 +0000)]
Fix compilation issues.

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

10 years agoMake early if conversion dependent upon the subtarget and add
Eric Christopher [Wed, 21 May 2014 23:40:26 +0000 (23:40 +0000)]
Make early if conversion dependent upon the subtarget and add
a subtarget hook to enable. Unconditionally add to the pass pipeline
for targets that might want to use it. No functional change.

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

10 years agoGroup the scheduling functions together.
Eric Christopher [Wed, 21 May 2014 23:40:18 +0000 (23:40 +0000)]
Group the scheduling functions together.

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

10 years agoRevert "DebugInfo: Don't put fission type units in comdat sections."
David Blaikie [Wed, 21 May 2014 23:27:41 +0000 (23:27 +0000)]
Revert "DebugInfo: Don't put fission type units in comdat sections."

This reverts commit r208930, r208933, and r208975.

It seems not all fission consumers are ready to handle this behavior.
Reverting until tools are brought up to spec.

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

10 years agoMC: correct IMAGE_REL_ARM_MOV32T relocation emission
Saleem Abdulrasool [Wed, 21 May 2014 23:17:56 +0000 (23:17 +0000)]
MC: correct IMAGE_REL_ARM_MOV32T relocation emission

This corrects the emission of IMAGE_REL_ARM_MOV32T relocations.  Previously, we
were avoiding the high portion of the relocation too early.  If there was a
section-relative relocation with an offset greater than 16-bits (65535), you
would end up truncating the high order bits of the offset.  Allow the current
relocation representation to flow through out the MC layer to the object writer.
Use the new ability to restrict recorded relocations to avoid emitting the
relocation into the final object.

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

10 years agoMC: introduce ability to restrict recorded relocations
Saleem Abdulrasool [Wed, 21 May 2014 23:17:50 +0000 (23:17 +0000)]
MC: introduce ability to restrict recorded relocations

Add support to allow a target specific COFF object writer to restrict the
recorded resolutions in the emitted object files.  This is motivated by the need
in Windows on ARM, where an intermediate relocation needs to be prevented from
being emitted in the object file.

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

10 years agoDebugInfo: Use the SPMap to find the parent CU of inlined functions as they may not...
David Blaikie [Wed, 21 May 2014 23:14:12 +0000 (23:14 +0000)]
DebugInfo: Use the SPMap to find the parent CU of inlined functions as they may not be in the current CU

Committed in r209178 then reverted in r209251 due to LTO breakage,
here's a proper fix for the case of the missing subprogram DIE. The DIEs
were there, just in other compile units. Using the SPMap we can find the
right compile unit to search for and produce cross-unit references to
describe this kind of inlining.

One existing test case needed to be updated because it had a function
that wasn't in the CU's subprogram list, so it didn't appear in the
SPMap.

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

10 years agoR600: Add comment describing problems with LowerConstantInitializer
Matt Arsenault [Wed, 21 May 2014 22:59:17 +0000 (22:59 +0000)]
R600: Add comment describing problems with LowerConstantInitializer

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

10 years agoR600: Partially fix constant initializers for structs and vectors.
Matt Arsenault [Wed, 21 May 2014 22:42:42 +0000 (22:42 +0000)]
R600: Partially fix constant initializers for structs and vectors.

This should extend the current workaround to work with structs
that only contain legal, scalar types.

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

10 years agoR600: Add failing testcases for constant initializers.
Matt Arsenault [Wed, 21 May 2014 22:42:38 +0000 (22:42 +0000)]
R600: Add failing testcases for constant initializers.

Constant initializers involving illegal types hit an assertion.

Patch by: Jan Vesely <jan.vesely@rutgers.edu>

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

10 years agoRemove getTargetLowering from TargetPassConfig as the target lowering
Eric Christopher [Wed, 21 May 2014 22:42:07 +0000 (22:42 +0000)]
Remove getTargetLowering from TargetPassConfig as the target lowering
can change depending upon subtarget/subtarget features for a function.

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

10 years agoRemove unused member variable from hexagon pass.
Eric Christopher [Wed, 21 May 2014 22:42:02 +0000 (22:42 +0000)]
Remove unused member variable from hexagon pass.

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

10 years agoDebugInfo: Ensure concrete out of line variables from inlined functions reference...
David Blaikie [Wed, 21 May 2014 22:41:17 +0000 (22:41 +0000)]
DebugInfo: Ensure concrete out of line variables from inlined functions reference their abstract origins.

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

10 years ago[X86] Fix a bug in the lowering of BLENDI introduced in r209043.
Quentin Colombet [Wed, 21 May 2014 22:00:39 +0000 (22:00 +0000)]
[X86] Fix a bug in the lowering of BLENDI introduced in r209043.
ISD::VSELECT mask uses 1 to identify the first argument and 0 to identify the
second argument.
On the other hand, BLENDI uses 0 to identify the first argument and 1 to
identify the second argument.
Fix the generation of the blend mask to account for this difference.

The bug did not show up with r209043, because we were not checking for the
actual arguments of the blend instruction!
This commit also fixes the test cases.

Note: The same mask works for the BLENDr variant because the arguments are
swapped during instruction selection (see the BLENDXXrr patterns).

<rdar://problem/16975435>

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

10 years agoMove MCOptions that aren't shared between programs into their specific
Eric Christopher [Wed, 21 May 2014 21:05:09 +0000 (21:05 +0000)]
Move MCOptions that aren't shared between programs into their specific
program and have them initialize the MCOptions struct explicitly.

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

10 years agoMake a couple of command lines static and remove an unnecessary
Eric Christopher [Wed, 21 May 2014 21:05:05 +0000 (21:05 +0000)]
Make a couple of command lines static and remove an unnecessary
initialization.

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

10 years agoDebugInfo: Simplify subprogram declaration creation/references and accidentally refix...
David Blaikie [Wed, 21 May 2014 18:04:33 +0000 (18:04 +0000)]
DebugInfo: Simplify subprogram declaration creation/references and accidentally refix PR11300.

Also simplifies the linkage name handling a little too.

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

10 years agoUse cast<> instead of unchecked dyn_cast
Matt Arsenault [Wed, 21 May 2014 18:03:59 +0000 (18:03 +0000)]
Use cast<> instead of unchecked dyn_cast

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

10 years agoMC: loosen an overzealous assertion
Saleem Abdulrasool [Wed, 21 May 2014 17:53:18 +0000 (17:53 +0000)]
MC: loosen an overzealous assertion

Permit active macro expansions when terminating the assembler if there were
errors during the expansion.  This would only trigger on invalid input when
built with assertions.

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

10 years agoUse llvm-lit if LLVM source tree is unavailable.
Greg Fitzgerald [Wed, 21 May 2014 16:44:03 +0000 (16:44 +0000)]
Use llvm-lit if LLVM source tree is unavailable.

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

10 years agoTest comment commit.
Dave Estes [Wed, 21 May 2014 16:19:51 +0000 (16:19 +0000)]
Test comment commit.

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

10 years ago[mips][mips64r6] Add bc[12](eq|ne)z
Daniel Sanders [Wed, 21 May 2014 12:56:39 +0000 (12:56 +0000)]
[mips][mips64r6] Add bc[12](eq|ne)z

Summary: Depends on D3691

Reviewers: jkolek, zoran.jovanovic, vmedic

Reviewed By: vmedic

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

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

10 years ago[asm matcher] Fix incorrect assertion when there are exactly 32 SubtargetFeatures
Daniel Sanders [Wed, 21 May 2014 10:11:24 +0000 (10:11 +0000)]
[asm matcher] Fix incorrect assertion when there are exactly 32 SubtargetFeatures

Summary:
The minimal type needs to hold a value of '1ULL << 31' but
getMinimalTypeForRange() is called with a value of '1ULL << 32'.

This patch will also reduce the size of the matcher table when there are 8
or 16 SubtargetFeatures.

Also added a dump of the SubtargetFeatures to the -debug output and corrected getMinimalTypeInRange() to consider 0xffffffffull to be a 32-bit value.

The testcase is that no existing code is broken and that LLVM still successfully
compiles after adding MIPS64r6 CodeGen support.

Reviewers: rafael

Reviewed By: rafael

Subscribers: llvm-commits

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

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

10 years ago[asan] Fix x86-32 asm instrumentation to preserve flags.
Evgeniy Stepanov [Wed, 21 May 2014 08:14:24 +0000 (08:14 +0000)]
[asan] Fix x86-32 asm instrumentation to preserve flags.

Patch by Yuri Gorshenin.

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

10 years agoMC: mark COFF .drectve section as REMOVE
Saleem Abdulrasool [Wed, 21 May 2014 05:15:01 +0000 (05:15 +0000)]
MC: mark COFF .drectve section as REMOVE

The .drectve section should be marked as IMAGE_SCN_LNK_REMOVE.  This matches what
the MSVC toolchain does and accurately reflects that this section should not be
emitted into the final binary.  This section is merely information for the
linker, comprising of additional linker directives.

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

10 years ago[modules] Add module maps for LLVM. These are not quite ready for prime-time
Richard Smith [Wed, 21 May 2014 02:46:14 +0000 (02:46 +0000)]
[modules] Add module maps for LLVM. These are not quite ready for prime-time
yet, but only a few more Clang patches need to land. (I have 'ninja check'
passing locally.)

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

10 years agoARM: correct bundle generation for MOV32T relocations
Saleem Abdulrasool [Wed, 21 May 2014 01:25:24 +0000 (01:25 +0000)]
ARM: correct bundle generation for MOV32T relocations

Although the previous code would construct a bundle and add the correct elements
to it, it would not finalise the bundle.  This resulted in the InternalRead
markers not being added to the MachineOperands nor, more importantly, the
externally visible defs to the bundle itself.  So, although the bundle was not
exposing the def, the generated code would be correct because there was no
optimisations being performed.  When optimisations were enabled, the post
register allocator would kick in, and the hazard recognizer would reorder
operations around the load which would define the value being operated upon.

Rather than manually constructing the bundle, simply construct and finalise the
bundle via the finaliseBundle call after both MIs have been emitted.  This
improves the code generation with optimisations where IMAGE_REL_ARM_MOV32T
relocations are emitted.

The changes to the other tests are the result of the bundle generation
preventing the scheduler from hoisting the moves across the loads.  The net
effect of the generated code is equivalent, but, is much more identical to what
is actually being lowered.

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

10 years agoThis command line option is only used in one place. Move it there and
Eric Christopher [Wed, 21 May 2014 00:20:01 +0000 (00:20 +0000)]
This command line option is only used in one place. Move it there and
rename it to something more descriptive.

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

10 years agoAdd a comment here.
Eric Christopher [Wed, 21 May 2014 00:02:50 +0000 (00:02 +0000)]
Add a comment here.

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

10 years agoMove this test to the backend from the frontend.
Eric Christopher [Tue, 20 May 2014 23:59:54 +0000 (23:59 +0000)]
Move this test to the backend from the frontend.

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

10 years agoMove the verbose asm option to be part of the options struct and
Eric Christopher [Tue, 20 May 2014 23:59:50 +0000 (23:59 +0000)]
Move the verbose asm option to be part of the options struct and
set appropriately.

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

10 years agoUpdate MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
Kevin Enderby [Tue, 20 May 2014 23:04:47 +0000 (23:04 +0000)]
Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress
does.  This allows llvm-nm to print spaces instead of 0’s for the value
of undefined symbols in Mach-O files.

To make this change other uses of MachOObjectFile::getSymbolAddress
are updated to handle when the Value is returned as UnknownAddressOrSize.
Which is needed to keep two of the ExecutionEngine tests working for example.

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

10 years agoFix test added in r209242: llc shouldn't create files in source tree
Alexey Samsonov [Tue, 20 May 2014 22:40:31 +0000 (22:40 +0000)]
Fix test added in r209242: llc shouldn't create files in source tree

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

10 years agoRevert "DebugInfo: Assume all subprogram DIEs have been created before any abstract...
David Blaikie [Tue, 20 May 2014 22:33:09 +0000 (22:33 +0000)]
Revert "DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed."

This reverts commit r209178.

This seems to be asserting in an LTO build on some internal Apple
buildbots. No upstream reproduction (and I don't have an LLVM-aware gold
built right now to reproduce it personally) but it's a small patch & the
failure's semi-plausible so I'm going to revert first while I try to
reproduce this.

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

10 years ago[ARM64] PR19792: Fix cycle in DAG after performPostLD1Combine
Adam Nemet [Tue, 20 May 2014 21:47:07 +0000 (21:47 +0000)]
[ARM64] PR19792: Fix cycle in DAG after performPostLD1Combine

Povray and dealII currently assert with "Overran sorted position" in
AssignTopologicalOrder.  The problem is that performPostLD1Combine can
introduce cycles.

Consider:

(insert_vector_elt (INSERT_SUBREG undef,
                                  (load (add %vreg0, Constant<8>), undef),  <= A
                                  TargetConstant<2>),
                   (load %vreg0, undef),                                    <= B
                   Constant<1>)

This is turned into a LD1LANEpost node.  However the address in A is not a
valid user of the post-incremented address of B in LD1LANEpost.

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

10 years agoUnbreak the sanitizer buildbots after r209226 due to SROA issue described in http...
David Blaikie [Tue, 20 May 2014 21:40:13 +0000 (21:40 +0000)]
Unbreak the sanitizer buildbots after r209226 due to SROA issue described in reviews.llvm.org/D3714

Undecided whether this should include a test case - SROA produces bad
dbg.value metadata describing a value for a reference that is actually
the value of the thing the reference refers to. For now, loosening the
assert lets this not assert, but it's still bogus/wrong output...

If someone wants to tell me to add a test, I'm willing/able, just
undecided. Hopefully we'll get SROA fixed soon & we can tighten up this
assertion again.

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

10 years agoMove the function and data section flags into the options struct and
Eric Christopher [Tue, 20 May 2014 21:25:34 +0000 (21:25 +0000)]
Move the function and data section flags into the options struct and
make the functions to set them non-static.
Move and rename the llvm specific backend options to avoid conflicting
with the clang option.

Paired with a backend commit to update.

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

10 years agoRevert r209235 as it broke two tests:
Kevin Enderby [Tue, 20 May 2014 21:10:15 +0000 (21:10 +0000)]
Revert r209235 as it broke two tests:
Failing Tests (2):
    LLVM :: ExecutionEngine/MCJIT/stubs-sm-pic.ll
    LLVM :: ExecutionEngine/MCJIT/stubs.ll

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

10 years agoUpdate MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
Kevin Enderby [Tue, 20 May 2014 20:32:18 +0000 (20:32 +0000)]
Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols.  Allowing llvm-nm to print spaces instead of 0’s for
the value of undefined symbols in Mach-O files.

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

10 years ago[LSR] Canonicalize reg1 + ... + regN into reg1 + ... + 1*regN.
Quentin Colombet [Tue, 20 May 2014 19:25:04 +0000 (19:25 +0000)]
[LSR] Canonicalize reg1 + ... + regN into reg1 + ... + 1*regN.

This commit introduces a canonical representation for the formulae.
Basically, as soon as a formula has more that one base register, the scaled
register field is used for one of them. The register put into the scaled
register is preferably a loop variant.
The commit refactors how the formulae are built in order to produce such
representation.
This yields a more accurate, but still perfectible, cost model.

<rdar://problem/16731508>

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

10 years agoGlobalValue: Automatically reset visibility when setting local linkage
Duncan P. N. Exon Smith [Tue, 20 May 2014 19:00:58 +0000 (19:00 +0000)]
GlobalValue: Automatically reset visibility when setting local linkage

r208264 started asserting in `setLinkage()` and `setVisibility()` that
visibility and linkage are compatible.  There are a few places in clang
where visibility is set first, and then linkage later, so the assert
fires.  In `setLinkage()`, it's clear what the visibility *should* be,
so rather than updating all the call sites just automatically fix the
visibility.

The testcase for this is for *clang*, so it'll follow separately in cfe.

PR19760

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

10 years agoFix test breakage introduced in r209223.
David Blaikie [Tue, 20 May 2014 18:36:35 +0000 (18:36 +0000)]
Fix test breakage introduced in r209223.

Oops, broke the broken enum constants again.

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

10 years agoRewrite calculateDbgValueHistory to make it (hopefully) more transparent.
Alexey Samsonov [Tue, 20 May 2014 18:34:54 +0000 (18:34 +0000)]
Rewrite calculateDbgValueHistory to make it (hopefully) more transparent.

This change preserves the original algorithm of generating history
for user variables, but makes it more clear.

High-level description of algorithm:
Scan all the machine basic blocks and machine instructions in the order
they are emitted to the object file. Do the following:
1) If we see a DBG_VALUE instruction, add it to the history of the
corresponding user variable. Keep track of all user variables, whose
locations are described by a register.
2) If we see a regular instruction, look at all the registers it clobbers,
and terminate the location range for all variables described by these registers.
3) At the end of the basic block, terminate location ranges for all
user variables described by some register.

Although this change shouldn't be user-visible (the contents of .debug_loc section
should be the same), it changes some internal assumptions about the set
of instructions used to track the variable locations. Watching the bots.

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

10 years agoPR19767: DebugInfo emission of pointer constants.
David Blaikie [Tue, 20 May 2014 18:21:51 +0000 (18:21 +0000)]
PR19767: DebugInfo emission of pointer constants.

In refactoring DwarfUnit::isUnsignedDIType I restricted it to only work
on values with signedness (unsigned or signed), asserting on anything
else (which did uncover some bugs). But it turns out that we do need to
emit constants of signless data, such as pointer constants - only null
pointer constants are known to need this so far, but it's conceivable
that there might be non-null pointer constants at some point (hardcoded
address offsets for device drivers?).

This patch just uses 'unsigned' for signless data such as pointer
constants. Arguably we could use signless representations
(DW_FORM_dataN) instead, allowing a trinary result from isUnsignedDIType
(signed, unsigned, signless), but this seems reasonable for now.

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

10 years agoAvoids DCE on write_register
Renato Golin [Tue, 20 May 2014 17:40:03 +0000 (17:40 +0000)]
Avoids DCE on write_register

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

10 years ago[PowerPC] PR19796: Also match ISD::TargetConstant in isIntS16Immediate
Adam Nemet [Tue, 20 May 2014 17:20:34 +0000 (17:20 +0000)]
[PowerPC] PR19796: Also match ISD::TargetConstant in isIntS16Immediate

The SplitIndexingFromLoad changes exposed a latent isel bug in the PowerPC64
backend.  We matched an immediate offset with STWX8 even though it only
supports register offset.

The culprit is the complex-pattern predicate, SelectAddrIdx, which decides
that if the offset is not ISD::Constant it must be a register.

Many thanks to Bill Schmidt for testing this.

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

10 years agoClean up language and grammar.
Eric Christopher [Tue, 20 May 2014 17:11:11 +0000 (17:11 +0000)]
Clean up language and grammar.

Based on a patch by jfcaron3@gmail.com!
PR19806

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

10 years agoTemporarily revert: r209129 - [mips][mips64r6] Sorted *_ENC, *_DESC classes and tests
Daniel Sanders [Tue, 20 May 2014 14:46:24 +0000 (14:46 +0000)]
Temporarily revert: r209129 - [mips][mips64r6] Sorted *_ENC, *_DESC classes and tests

After discussion with Zoran, we have decided to temporarily revert this commit.
It's causing some difficult to resolve conflicts and we are under time pressure
to deliver an initial MIPS64r6 compiler.

We will re-apply an equivalent patch once the time pressure has passed.

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

10 years ago[ARM64] Port basic-a64-diagnostics.s over to ARM64
Bradley Smith [Tue, 20 May 2014 13:33:41 +0000 (13:33 +0000)]
[ARM64] Port basic-a64-diagnostics.s over to ARM64

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

10 years agoTableGen: permit non-leaf ComplexPattern uses
Tim Northover [Tue, 20 May 2014 11:52:46 +0000 (11:52 +0000)]
TableGen: permit non-leaf ComplexPattern uses

This allows the results of a ComplexPattern check to be distributed to separate
named Operands, instead of the current system where all results must apply (and
match perfectly) with a single Operand.

For example, if "some_addrmode" is a ComplexPattern producing two results, you
can write:

   def : Pat<(load (some_addrmode GPR64:$base, imm:$offset)),
             (INST GPR64:$base, imm:$offset)>;

This should allow neater instruction definitions in TableGen that don't put all
possible aspects of addressing into a single operand, but are still usable with
relatively simple C++ CodeGen idioms.

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

10 years agoAdd parentheses to suppress the gcc warning '-Wparentheses'.
Simon Atanasyan [Tue, 20 May 2014 10:23:04 +0000 (10:23 +0000)]
Add parentheses to suppress the gcc warning '-Wparentheses'.

No functional changes.

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

10 years agoLegalizer: Make bswap promotion safe for vectors.
Benjamin Kramer [Tue, 20 May 2014 09:42:31 +0000 (09:42 +0000)]
Legalizer: Make bswap promotion safe for vectors.

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

10 years ago[Mips] Add more relocation types and MIPS specific e_flags constants.
Simon Atanasyan [Tue, 20 May 2014 09:27:49 +0000 (09:27 +0000)]
[Mips] Add more relocation types and MIPS specific e_flags constants.

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

10 years agoARMEB: Additional test files for ARM fixups
Christian Pirker [Tue, 20 May 2014 09:24:37 +0000 (09:24 +0000)]
ARMEB: Additional test files for ARM fixups

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

10 years agoTableGen: convert InstAlias's Emit bit to an int.
Tim Northover [Tue, 20 May 2014 09:17:16 +0000 (09:17 +0000)]
TableGen: convert InstAlias's Emit bit to an int.

When multiple aliases overlap, the correct string to print can often be
determined purely by considering the InstAlias declarations in some particular
order. This allows the user to specify that order manually when desired,
without resorting to hacking around with the default lexicographical order on
Record instantiation, which is error-prone and ugly.

I was also mistaken about "add w2, w3, w4" being the same as "add w2, w3, w4,
uxtw". That's only true if Rn is the stack pointer.

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

10 years ago[X86] Tune LEA usage for Silvermont
Alexey Volkov [Tue, 20 May 2014 08:55:50 +0000 (08:55 +0000)]
[X86] Tune LEA usage for Silvermont

According to Intel Software Optimization Manual on Silvermont in some cases LEA
is better to be replaced with ADD instructions:
"The rule of thumb for ADDs and LEAs is that it is justified to use LEA
with a valid index and/or displacement for non-destructive destination purposes
(especially useful for stack offset cases), or to use a SCALE.
Otherwise, ADD(s) are preferable."

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

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

10 years ago[LV][REFACTOR] One more tiny fix for printing debug locations in loop vectorizer...
Zinovy Nis [Tue, 20 May 2014 08:26:20 +0000 (08:26 +0000)]
[LV][REFACTOR] One more tiny fix for printing debug locations in loop vectorizer. Now consistent with the remarks emitter.

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

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

10 years agollvm-readobj: use range-based for loop
Saleem Abdulrasool [Tue, 20 May 2014 05:18:06 +0000 (05:18 +0000)]
llvm-readobj: use range-based for loop

Convert an additional site to a range based for loop.  NFC.

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

10 years agoTeach isKnownNonNull that a nonnull return is not null. Add a test for this case...
Nick Lewycky [Tue, 20 May 2014 05:13:21 +0000 (05:13 +0000)]
Teach isKnownNonNull that a nonnull return is not null. Add a test for this case as well as the case of a nonnull attribute (already handled but not tested).

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

10 years agoDebugInfo: Emit function definitions within their namespace scope.
David Blaikie [Tue, 20 May 2014 03:23:24 +0000 (03:23 +0000)]
DebugInfo: Emit function definitions within their namespace scope.

This workaround (presumably for ancient GDB) doesn't appear to be
required (GDB 7.5 seems to tolerate function definition DIEs in
namespace scope just fine).

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

10 years agoFollow up to 209187, updating a test to use FileCheck. Needed to ignore an extra...
David Blaikie [Tue, 20 May 2014 02:40:34 +0000 (02:40 +0000)]
Follow up to 209187, updating a test to use FileCheck. Needed to ignore an extra DW_TAG_class_type

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

10 years agoUpdate test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll to use FileCheck.
David Blaikie [Tue, 20 May 2014 02:19:15 +0000 (02:19 +0000)]
Update test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll to use FileCheck.

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

10 years agoAdd 'nonnull', a new parameter and return attribute which indicates that the pointer...
Nick Lewycky [Tue, 20 May 2014 01:23:40 +0000 (01:23 +0000)]
Add 'nonnull', a new parameter and return attribute which indicates that the pointer is not null. Instcombine will elide comparisons between these and null. Patch by Luqman Aden!

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

10 years agoLTO: Add a testcase for linking modules with incompatible Debug Info
Adrian Prantl [Mon, 19 May 2014 23:41:25 +0000 (23:41 +0000)]
LTO: Add a testcase for linking modules with incompatible Debug Info
Versions.
rdar://problem/16926122

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

10 years agoOK, NAKAMURA Takumi beat me to this change. So backing out my addition of
Kevin Enderby [Mon, 19 May 2014 23:26:51 +0000 (23:26 +0000)]
OK, NAKAMURA Takumi beat me to this change.  So backing out my addition of
llvm-size to the list so it only has one.  Sorry for the noise.

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

10 years agoDavid Blaikie pointed out that the test added in r209158 fails in the
Kevin Enderby [Mon, 19 May 2014 23:22:58 +0000 (23:22 +0000)]
David Blaikie pointed out that the test added in r209158 fails in the
check-llvm target under CMake.  And the test/CMakeFiles.txt needs to
have llvm-size added to the list.

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

10 years agoDebugInfo: Assume all subprogram DIEs have been created before any abstract subprogra...
David Blaikie [Mon, 19 May 2014 23:16:19 +0000 (23:16 +0000)]
DebugInfo: Assume all subprogram DIEs have been created before any abstract subprograms are constructed.

Since we visit the whole list of subprograms for each CU at module
start, this is clearly true - don't test for the case, just assert it.

A few old test cases seemed to have incomplete subprogram lists, but any
attempt to reproduce them shows full subprogram lists that even include
entities that have been completely inlined and the out of line
definition removed.

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

10 years ago[CMake] Add llvm-size to check-llvm, to fix build since r209158.
NAKAMURA Takumi [Mon, 19 May 2014 23:12:43 +0000 (23:12 +0000)]
[CMake] Add llvm-size to check-llvm, to fix build since r209158.

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

10 years ago[ARM64] Adds Cortex-A53 scheduling support for vector load/store post.
Chad Rosier [Mon, 19 May 2014 22:59:51 +0000 (22:59 +0000)]
[ARM64] Adds Cortex-A53 scheduling support for vector load/store post.
Patch by Dave Estes<cestes@codeaurora.org>!
PR19761 http://reviews.llvm.org/D3829

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

10 years agoRemove unused method declaration
Matt Arsenault [Mon, 19 May 2014 22:55:35 +0000 (22:55 +0000)]
Remove unused method declaration

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

10 years agoAdd documentation for llvm-dwarfdump tool
Alexey Samsonov [Mon, 19 May 2014 22:53:29 +0000 (22:53 +0000)]
Add documentation for llvm-dwarfdump tool

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

10 years agoDebugInfo: Don't include DW_AT_inline on each abstract definition multiple times.
David Blaikie [Mon, 19 May 2014 22:07:16 +0000 (22:07 +0000)]
DebugInfo: Don't include DW_AT_inline on each abstract definition multiple times.

When I refactored this in r208636 I accidentally caused this to be added
multiple times to each abstract subprogram (not accounting for the
deduplicating effect of the InlinedSubprogramDIEs set).

This got better in r208798 when the abstract definitions got the
attribute added to them at construction time, but still had the
redundant copies introduced in r208636.

This commit removes those excess DW_AT_inlines and relies solely on the
insertion in r208798.

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

10 years agoDebugInfo: Fix missing inlined_subroutines caused by r208748.
David Blaikie [Mon, 19 May 2014 21:54:31 +0000 (21:54 +0000)]
DebugInfo: Fix missing inlined_subroutines caused by r208748.

The check in DwarfDebug::constructScopeDIE was meant to consider inlined
subroutines as any non-top-level scope that was a subprogram. Instead of
checking "not top level scope" it was checking if the /subprogram's/
scope was non-top-level.

Fix this and beef up a test case to demonstrate some of the missing
inlined_subroutines are no longer missing.

In the course of fixing this I also found that r208748 (with this fix)
found one /extra/ inlined_subroutine in concrete_out_of_line.ll due to
two inlined_subroutines having the same inlinedAt location. The previous
implementation was collapsing these into a single inlined subroutine.

I'm not sure what the original code was that created this .ll file so
I'm not sure if this actually happens in practice today. Since we
deliberately include column information to disambiguate two calls on the
same line, that may've addressed this bug in the frontend, but it's good
to know that workaround isn't necessary for this particular case
anymore.

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

10 years agoFix typos.
Eric Christopher [Mon, 19 May 2014 21:18:47 +0000 (21:18 +0000)]
Fix typos.

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

10 years agocmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGS
Reid Kleckner [Mon, 19 May 2014 21:13:41 +0000 (21:13 +0000)]
cmake: Remove -D NDEBUG from CFLAGS as well as CXXFLAGS

This silences ~7 warnings on .c files in the LLVM build.

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

10 years ago[ConstantHoisting][X86] Change the cost model to never hoist constants for types...
Juergen Ributzka [Mon, 19 May 2014 21:00:53 +0000 (21:00 +0000)]
[ConstantHoisting][X86] Change the cost model to never hoist constants for types larger than i128.

Currently the X86 backend doesn't support types larger than i128 very well. For
example an i192 multiply will assert in codegen when the 2nd argument is a constant and the constant got hoisted.

This fix changes the cost model to never hoist constants for types larger than
i128. Once the codegen issues have been resolved, the cost model can be updated
to allow also larger types.

This is related to <rdar://problem/16954938>

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

10 years ago[X86] Add ISel patterns to improve the selection of TZCNT and LZCNT.
Andrea Di Biagio [Mon, 19 May 2014 20:38:59 +0000 (20:38 +0000)]
[X86] Add ISel patterns to improve the selection of TZCNT and LZCNT.

Instructions TZCNT (requires BMI1) and LZCNT (requires LZCNT), always
provide the operand size as output if the input operand is zero.

We can take advantage of this knowledge during instruction selection
stage in order to simplify a few corner case.

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

10 years agoImplement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
Kevin Enderby [Mon, 19 May 2014 20:36:02 +0000 (20:36 +0000)]
Implement MachOObjectFile::isSectionData() and MachOObjectFile::isSectionBSS
so that llvm-size will total up all the sections in the Berkeley format.  This
allows for rough categorizations for Mach-O sections.  And allows the total of
llvm-size’s Berkeley and System V formats to be the same.

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

10 years agoAdded more insertps optimizations
Filipe Cabecinhas [Mon, 19 May 2014 19:45:57 +0000 (19:45 +0000)]
Added more insertps optimizations

Summary:
When inserting an element that's coming from a vector load or a broadcast
of a vector (or scalar) load, combine the load into the insertps
instruction.
Added PerformINSERTPSCombine for the case where we need to fix the load
(load of a vector + insertps with a non-zero CountS).
Added patterns for the broadcasts.

Also added tests for SSE4.1, AVX, and AVX2.

Reviewers: delena, nadav, craig.topper

Subscribers: llvm-commits

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

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

10 years agoFix testers by removing dubious testcase for r209154.
Lang Hames [Mon, 19 May 2014 19:38:48 +0000 (19:38 +0000)]
Fix testers by removing dubious testcase for r209154.

It turns out that not all the world is x86-64. Who knew?

I'll get to work on a more appropriate test case for this patch.

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

10 years ago[RuntimeDyld] Fix x86-64 MachO GOT relocation handling.
Lang Hames [Mon, 19 May 2014 19:21:25 +0000 (19:21 +0000)]
[RuntimeDyld] Fix x86-64 MachO GOT relocation handling.

For GOT relocations the addend should modify the offset to the
GOT entry, not the value of the entry itself. Teach RuntimeDyldMachO
to do The Right Thing here.

Fixes <rdar://problem/16961886>.

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

10 years agoKill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that.
Alexey Samsonov [Mon, 19 May 2014 18:45:32 +0000 (18:45 +0000)]
Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer for that.

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

10 years agoCheck the alwaysinline attribute on the call as well as on the caller.
Peter Collingbourne [Mon, 19 May 2014 18:25:54 +0000 (18:25 +0000)]
Check the alwaysinline attribute on the call as well as on the caller.

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

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

10 years agoUse range for
Matt Arsenault [Mon, 19 May 2014 17:52:48 +0000 (17:52 +0000)]
Use range for

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

10 years agoreverting r209132
Jyotsna Verma [Mon, 19 May 2014 16:22:11 +0000 (16:22 +0000)]
reverting r209132

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

10 years agoMemoryBuffer: Use GetNativeSystemInfo()
Alp Toker [Mon, 19 May 2014 16:13:28 +0000 (16:13 +0000)]
MemoryBuffer: Use GetNativeSystemInfo()

Removes old 4096 byte workaround. This functionality has been available since
Windows XP.

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

10 years agoRevert "Patch for function cloning to inline all blocks whose address is taken"
Eric Christopher [Mon, 19 May 2014 16:04:10 +0000 (16:04 +0000)]
Revert "Patch for function cloning to inline all blocks whose address is taken"
as it was causing build failures in ruby.

This reverts commit r207713.

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

10 years ago[ARM64] Split tbz/tbnz into W/X register variant
Bradley Smith [Mon, 19 May 2014 15:58:15 +0000 (15:58 +0000)]
[ARM64] Split tbz/tbnz into W/X register variant

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

10 years agoHexagon: Add encoding bits to the mpy instructions.
Jyotsna Verma [Mon, 19 May 2014 15:32:07 +0000 (15:32 +0000)]
Hexagon: Add encoding bits to the mpy instructions.

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

10 years ago[mips][mips64r6] Sorted *_ENC, *_DESC classes and tests
Zoran Jovanovic [Mon, 19 May 2014 14:57:46 +0000 (14:57 +0000)]
[mips][mips64r6] Sorted *_ENC, *_DESC classes and tests

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

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

10 years agoResolving MSVC warnings about switch statements with a default label, but no case...
Aaron Ballman [Mon, 19 May 2014 14:29:04 +0000 (14:29 +0000)]
Resolving MSVC warnings about switch statements with a default label, but no case labels. No functional changes intended.

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

10 years agoFlip on vectorization of bswap intrinsics.
Benjamin Kramer [Mon, 19 May 2014 13:48:08 +0000 (13:48 +0000)]
Flip on vectorization of bswap intrinsics.

The cost model conservatively assumes that it will always get scalarized and
that's about as good as we can get with the generic TTI; reasoning whether a
shuffle with an efficient lowering is available is hard. We can override that
conservative estimate for some targets in the future.

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

10 years agoSDAG: Legalize vector BSWAP into a shuffle if the shuffle is legal but the bswap...
Benjamin Kramer [Mon, 19 May 2014 13:12:38 +0000 (13:12 +0000)]
SDAG: Legalize vector BSWAP into a shuffle if the shuffle is legal but the bswap not.

- On ARM/ARM64 we get a vrev because the shuffle matching code is really smart. We still unroll anything that's not v4i32 though.
- On X86 we get a pshufb with SSSE3. Required more cleverness in isShuffleMaskLegal.
- On PPC we get a vperm for v8i16 and v4i32. v2i64 is unrolled.

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