oota-llvm.git
12 years agoARM: Nuke remnant bogus code.
Jim Grosbach [Tue, 24 Apr 2012 18:39:47 +0000 (18:39 +0000)]
ARM: Nuke remnant bogus code.

r154362 was supposed to delete this bit, but obviously didn't.

rdar://11305594

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

12 years agoRelated to PR1255. Let's begin. I'll commit classes that corresponds to our latest...
Stepan Dyatkovskiy [Tue, 24 Apr 2012 18:31:10 +0000 (18:31 +0000)]
Related to PR1255. Let's begin. I'll commit classes that corresponds to our latest PR1255 discussion posts in llvm-commits.

Strategy.
0. Implement new classes. Classes doesn't affect anything. They still work with ConstantInt base values at this stage.
1. Fictitious replacement of current ConstantInt case values with ConstantRangesSet. Case ranges set will still hold single value, and ConstantInt *getCaseValue() will return it. But additionally implement new method in SwitchInst that allows to work with case ranges. Currenly I think it should be some wrapper that returns either single value or ConstantRangesSet object.
2. Step-by-step replacement of old "ConstantInt* getCaseValue()" with new alternative. Modify algorithms for all passes that works with SwitchInst. But don't modify LLParser and BitcodeReader/Writer. Still hold single value in each ConstantRangesSet object. On this stage some parts of LLVM will use old-style methods, and some ones new-style.
3. After all getCaseValue() usages will removed and whole LLVM and its clients will work in new style - modify LLParser, Reader and Writer. Remove getCaseValue().
4. Replace ConstantInt*-based case ranges set items with APInt ones.

Currently we are on Zero Stage: New classes.
ConstantRangesSet.
I selected ConstantArrays as case ranges set "holder" object (it is a temporary decision, I'll explain why below). The array items are may be ConstantVectors with single item, and ConstantVectors with two items (that means single number and range respectively).
The ConstantInt will used as basic value representation. It will replaced with APInt then. Of course ConstantArray and ConstantVector will go away after ConstantInt => APInt replacement.

New class mandatory features:
- bool isSatisfies(ConstantInt *V) method (need better name?). Returns true if the given value satisfies this case.
- Case's ranges and values enumeration. In some passes we need to analize each case (SwitchLowering for example).

Factory + unified clusterify.
I also propose to implement the factory that allows to build case object with user friendly way. I called it CRSBuilder by now.
Currenly I implemented the factory that allows add,remove pairs of range+successor. It also allows add existing ConstantRangesSet decompiling it to separated ranges. Factory can emit either clusters set (single case range + successor) or the set of "ConstantRangesSet + Successor" pairs.
So you can use it either as builder for new cases set for SwitchInst, or for clusterification of existing cases set.
Just call Factory.optimize() and it emits optimized and sorted clusters collection for you!
I tested clusterification on SelectionDAGBuilder - it works fine. Don't worry it was not included in this patch. Just new classes.
Factory is a template. There are two params: SuccessorClass and IsReadonly. So you can specify what successor you need (BB or MBB). And you can also restrict your factory to use values in read-only mode (SelectionDAGBuilder need IsReadonly=true). Read-only factory couldn't build the cases ranges.

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

12 years agoAVX: Add additional vbroadcast replacement sequences for integers.
Nadav Rotem [Tue, 24 Apr 2012 18:09:59 +0000 (18:09 +0000)]
AVX: Add additional vbroadcast replacement sequences for integers.
Remove the v2f64 patterns because it does not match any vbroadcast
instruction.

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

12 years agocmake: new file
Andrew Trick [Tue, 24 Apr 2012 18:06:49 +0000 (18:06 +0000)]
cmake: new file

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

12 years agomisched: DAG builder must special case earlyclobber
Andrew Trick [Tue, 24 Apr 2012 18:04:41 +0000 (18:04 +0000)]
misched: DAG builder must special case earlyclobber

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

12 years agomisched: try (not too hard) to place debug values where they belong
Andrew Trick [Tue, 24 Apr 2012 18:04:37 +0000 (18:04 +0000)]
misched: try (not too hard) to place debug values where they belong

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

12 years agomisched: ignore debug values during scheduling
Andrew Trick [Tue, 24 Apr 2012 18:04:34 +0000 (18:04 +0000)]
misched: ignore debug values during scheduling

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

12 years agomisched: DAG builder support for tracking register pressure within the current schedu...
Andrew Trick [Tue, 24 Apr 2012 17:56:43 +0000 (17:56 +0000)]
misched: DAG builder support for tracking register pressure within the current scheduling region.

The DAG builder is a convenient place to do it. Hopefully this is more
efficient than a separate traversal over the same region.

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

12 years agoRegisterPressure: A utility for computing register pressure within a
Andrew Trick [Tue, 24 Apr 2012 17:53:35 +0000 (17:53 +0000)]
RegisterPressure: A utility for computing register pressure within a
MachineInstr sequence.

This uses the new target interface for tracking register pressure
using pressure sets to model overlapping register classes and
subregisters.

RegisterPressure results can be tracked incrementally or stored at
region boundaries. Global register pressure can be deduced from local
RegisterPressure results if desired.

This is an early, somewhat untested implementation. I'm working on
testing it within the context of a register pressure reducing
MachineScheduler.

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

12 years agoAdd missing test cases for ARM VLD3 (single 3-element structure to all lanes)
Kevin Enderby [Tue, 24 Apr 2012 17:45:56 +0000 (17:45 +0000)]
Add missing test cases for ARM VLD3 (single 3-element structure to all lanes)
instructions.

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

12 years agoAdd missing test cases for ARM VLD4 (single 4-element structure to all lanes)
Kevin Enderby [Tue, 24 Apr 2012 15:55:00 +0000 (15:55 +0000)]
Add missing test cases for ARM VLD4 (single 4-element structure to all lanes)
instructions.

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

12 years agoAVX2: The BLENDPW instruction selects between vectors of v16i16 using an i8
Nadav Rotem [Tue, 24 Apr 2012 11:27:53 +0000 (11:27 +0000)]
AVX2: The BLENDPW instruction selects between vectors of v16i16 using an i8
immediate. We can't use it here because the shuffle code does not check that
the lower part of the word is identical to the upper part.

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

12 years agoRefactor Thumb ITState handling in ARM Disassembler to more efficiently use its vector
Richard Barton [Tue, 24 Apr 2012 11:13:20 +0000 (11:13 +0000)]
Refactor Thumb ITState handling in ARM Disassembler to more efficiently use its vector

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

12 years agoAVX: We lower VECTOR_SHUFFLE and BUILD_VECTOR nodes into vbroadcast instructions
Nadav Rotem [Tue, 24 Apr 2012 11:07:03 +0000 (11:07 +0000)]
AVX: We lower VECTOR_SHUFFLE and BUILD_VECTOR nodes into vbroadcast instructions
using the pattern (vbroadcast (i32load src)). In some cases, after we generate
this pattern new users are added to the load node, which prevent the selection
of the blend pattern. This commit provides fallback patterns which perform
in-vector broadcast (using in-vector vbroadcast in AVX2 and pshufd on AVX1).

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

12 years agoLook for the 'Is Simulated' module flag. This indicates that the program is compiled...
Bill Wendling [Tue, 24 Apr 2012 11:03:50 +0000 (11:03 +0000)]
Look for the 'Is Simulated' module flag. This indicates that the program is compiled to run on a simulator.

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

12 years agoFileCheck-ize tests.
Bill Wendling [Tue, 24 Apr 2012 10:45:44 +0000 (10:45 +0000)]
FileCheck-ize tests.

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

12 years agoFileCheck-ize these tests.
Bill Wendling [Tue, 24 Apr 2012 10:36:42 +0000 (10:36 +0000)]
FileCheck-ize these tests.

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

12 years agoFileCheck-ize these tests. Harden some of them.
Bill Wendling [Tue, 24 Apr 2012 09:15:38 +0000 (09:15 +0000)]
FileCheck-ize these tests. Harden some of them.

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

12 years agoRemove dangling spaces. Fix some other formatting.
Craig Topper [Tue, 24 Apr 2012 06:36:35 +0000 (06:36 +0000)]
Remove dangling spaces. Fix some other formatting.

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

12 years agoSimplify code a bit and make it compile better. Remove unused parameters.
Craig Topper [Tue, 24 Apr 2012 06:02:29 +0000 (06:02 +0000)]
Simplify code a bit and make it compile better. Remove unused parameters.

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

12 years agoAdd a missing cpu subtype.
Evan Cheng [Mon, 23 Apr 2012 22:41:39 +0000 (22:41 +0000)]
Add a missing cpu subtype.

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

12 years agoTidy up. 80 columns, whitespace, et. al.
Jim Grosbach [Mon, 23 Apr 2012 22:04:10 +0000 (22:04 +0000)]
Tidy up. 80 columns, whitespace, et. al.

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

12 years agoOptimize the vector UINT_TO_FP, SINT_TO_FP and FP_TO_SINT operations where the intege...
Nadav Rotem [Mon, 23 Apr 2012 21:53:37 +0000 (21:53 +0000)]
Optimize the vector UINT_TO_FP, SINT_TO_FP and FP_TO_SINT operations where the integer type is i8 (commonly used in graphics).

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

12 years agoThis patch fixes a problem which arose when using the Post-RA scheduler
Preston Gurd [Mon, 23 Apr 2012 21:39:35 +0000 (21:39 +0000)]
This patch fixes a problem which arose when using the Post-RA scheduler
on X86 Atom. Some of our tests failed because the tail merging part of
the BranchFolding pass was creating new basic blocks which did not
contain live-in information. When the anti-dependency code in the Post-RA
scheduler ran, it would sometimes rename the register containing
the function return value because the fact that the return value was
live-in to the subsequent block had been lost. To fix this, it is necessary
to run the RegisterScavenging code in the BranchFolding pass.

This patch makes sure that the register scavenging code is invoked
in the X86 subtarget only when post-RA scheduling is being done.
Post RA scheduling in the X86 subtarget is only done for Atom.

This patch adds a new function to the TargetRegisterClass to control
whether or not live-ins should be preserved during branch folding.
This is necessary in order for the anti-dependency optimizations done
during the PostRASchedulerList pass to work properly when doing
Post-RA scheduling for the X86 in general and for the Intel Atom in particular.

The patch adds and invokes the new function trackLivenessAfterRegAlloc()
instead of using the existing requiresRegisterScavenging().
It changes BranchFolding.cpp to call trackLivenessAfterRegAlloc() instead of
requiresRegisterScavenging(). It changes the all the targets that
implemented requiresRegisterScavenging() to also implement
trackLivenessAfterRegAlloc().

It adds an assertion in the Post RA scheduler to make sure that post RA
liveness information is available when it is needed.

It changes the X86 break-anti-dependencies test to use –mcpu=atom, in order
to avoid running into the added assertion.

Finally, this patch restores the use of anti-dependency checking
(which was turned off temporarily for the 3.1 release) for
Intel Atom in the Post RA scheduler.

Patch by Andy Zhang!

Thanks to Jakob and Anton for their reviews.

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

12 years agoARM: VSLI two-operand assmebly aliases are tblgen'erated.
Jim Grosbach [Mon, 23 Apr 2012 21:22:04 +0000 (21:22 +0000)]
ARM: VSLI two-operand assmebly aliases are tblgen'erated.

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

12 years agoARM: tblgen'erate VSRA/VRSRA/VSRI assembly two-operand aliases.
Jim Grosbach [Mon, 23 Apr 2012 21:00:49 +0000 (21:00 +0000)]
ARM: tblgen'erate VSRA/VRSRA/VSRI assembly two-operand aliases.

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

12 years agoARM: Add testcases for two-operand variants of VSRA/VRSRA/VSRI.
Jim Grosbach [Mon, 23 Apr 2012 21:00:47 +0000 (21:00 +0000)]
ARM: Add testcases for two-operand variants of VSRA/VRSRA/VSRI.

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

12 years agoAdd ARM mode tests for the NEON vector shift-accumulate tests.
Jim Grosbach [Mon, 23 Apr 2012 21:00:44 +0000 (21:00 +0000)]
Add ARM mode tests for the NEON vector shift-accumulate tests.

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

12 years agoTidy up. Reformat for ease of reading.
Jim Grosbach [Mon, 23 Apr 2012 21:00:42 +0000 (21:00 +0000)]
Tidy up. Reformat for ease of reading.

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

12 years agoARM: vqdmulh two-operand aliases are tblgen'erated now.
Jim Grosbach [Mon, 23 Apr 2012 20:37:20 +0000 (20:37 +0000)]
ARM: vqdmulh two-operand aliases are tblgen'erated now.

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

12 years ago[Support/Unix] Unconditionally include time.h.
Michael J. Spencer [Mon, 23 Apr 2012 19:00:27 +0000 (19:00 +0000)]
[Support/Unix] Unconditionally include time.h.

When building LLVM on Linux with libc++ with CMake TIME_WITH_SYS_TIME is
undefined, and HAVE_SYS_TIME_H is defined. This ends up including
sys/time.h but not time.h. Unix/TimeValue.inc requires time.h for asctime_r
and localtime. libstdc++ seems to include time.h anyway, but libc++ does
not.

Fix this by always including time.h

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

12 years agoAllow forward declarations to take a context. This helps the debugger
Eric Christopher [Mon, 23 Apr 2012 19:00:11 +0000 (19:00 +0000)]
Allow forward declarations to take a context. This helps the debugger
find forward declarations in the context that the actual definition
will occur.

rdar://11291658

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

12 years agoTemporarily revert r155364 until the upstream review can complete, per
Chandler Carruth [Mon, 23 Apr 2012 18:28:57 +0000 (18:28 +0000)]
Temporarily revert r155364 until the upstream review can complete, per
the stated developer policy.

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

12 years agoRevert r155365, r155366, and r155367. All three of these have regression
Chandler Carruth [Mon, 23 Apr 2012 18:25:57 +0000 (18:25 +0000)]
Revert r155365, r155366, and r155367. All three of these have regression
test suite failures. The failures occur at each stage, and only get
worse, so I'm reverting all of them.

Please resubmit these patches, one at a time, after verifying that the
regression test suite passes. Never submit a patch without running the
regression test suite.

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

12 years agoHexagon V5 (floating point) support.
Sirish Pande [Mon, 23 Apr 2012 17:49:40 +0000 (17:49 +0000)]
Hexagon V5 (floating point) support.

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

12 years agoSupport for Hexagon architectural feature, new value jump.
Sirish Pande [Mon, 23 Apr 2012 17:49:28 +0000 (17:49 +0000)]
Support for Hexagon architectural feature, new value jump.

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

12 years agoSupport for Hexagon VLIW Packetizer.
Sirish Pande [Mon, 23 Apr 2012 17:49:20 +0000 (17:49 +0000)]
Support for Hexagon VLIW Packetizer.

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

12 years agoHexagon Packetizer's target independent fix.
Sirish Pande [Mon, 23 Apr 2012 17:49:09 +0000 (17:49 +0000)]
Hexagon Packetizer's target independent fix.

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

12 years agoReapply r155136 after fixing PR12599.
Jakob Stoklund Olesen [Mon, 23 Apr 2012 17:39:52 +0000 (17:39 +0000)]
Reapply r155136 after fixing PR12599.

Original commit message:

Defer some shl transforms to DAGCombine.

The shl instruction is used to represent multiplication by a constant
power of two as well as bitwise left shifts. Some InstCombine
transformations would turn an shl instruction into a bit mask operation,
making it difficult for later analysis passes to recognize the
constsnt multiplication.

Disable those shl transformations, deferring them to DAGCombine time.
An 'shl X, C' instruction is now treated mostly the same was as 'mul X, C'.

These transformations are deferred:

  (X >>? C) << C   --> X & (-1 << C)  (When X >> C has multiple uses)
  (X >>? C1) << C2 --> X << (C2-C1) & (-1 << C2)   (When C2 > C1)
  (X >>? C1) << C2 --> X >>? (C1-C2) & (-1 << C2)  (When C1 > C2)

The corresponding exact transformations are preserved, just like
div-exact + mul:

  (X >>?,exact C) << C   --> X
  (X >>?,exact C1) << C2 --> X << (C2-C1)
  (X >>?,exact C1) << C2 --> X >>?,exact (C1-C2)

The disabled transformations could also prevent the instruction selector
from recognizing rotate patterns in hash functions and cryptographic
primitives. I have a test case for that, but it is too fragile.

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

12 years agoConflict with st_dev/st_ino identifiers under Debian GNU/Hurd
Sylvestre Ledru [Mon, 23 Apr 2012 16:37:23 +0000 (16:37 +0000)]
Conflict with st_dev/st_ino identifiers under Debian GNU/Hurd

The problem is that the struct file_status on UNIX systems has two
members called st_dev and st_ino; those are also members of the
struct stat, and they are reserved identifiers which can also be
provided as #define (and this is the case for st_dev on Hurd).
The solution (attached) is to rename them, for example adding a
"fs_" prefix (= file status) to them.

Patch by Pino Toscano

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

12 years agoFix issue 67 by checking that the interface functions weren't redefined in the compil...
Alexander Potapenko [Mon, 23 Apr 2012 10:47:31 +0000 (10:47 +0000)]
Fix issue 67 by checking that the interface functions weren't redefined in the compiled source file.

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

12 years ago[tsan] use llvm/ADT/Statistic.h for tsan stats
Kostya Serebryany [Mon, 23 Apr 2012 08:44:59 +0000 (08:44 +0000)]
[tsan] use llvm/ADT/Statistic.h for tsan stats

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

12 years agoUse MVT instead of EVT through all of LowerVECTOR_SHUFFLEtoBlend and not just the...
Craig Topper [Mon, 23 Apr 2012 07:36:33 +0000 (07:36 +0000)]
Use MVT instead of EVT through all of LowerVECTOR_SHUFFLEtoBlend and not just the switch. Saves a little bit of binary size.

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

12 years agoMake getZeroVector and getOnesVector more alike as far as how they detect 128-bit...
Craig Topper [Mon, 23 Apr 2012 07:24:41 +0000 (07:24 +0000)]
Make getZeroVector and getOnesVector more alike as far as how they detect 128-bit versus 256-bit vectors. Be explicit about both sizes and use llvm_unreachable. Similar changes to getLegalSplat.

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

12 years agoTidy up by removing some 'else' after 'return'
Craig Topper [Mon, 23 Apr 2012 06:57:04 +0000 (06:57 +0000)]
Tidy up by removing some 'else' after 'return'

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

12 years agoTidy up spacing in LowerVECTOR_SHUFFLEtoBlend. Remove code that checks if shuffle...
Craig Topper [Mon, 23 Apr 2012 06:38:28 +0000 (06:38 +0000)]
Tidy up spacing in LowerVECTOR_SHUFFLEtoBlend. Remove code that checks if shuffle operand has a different type than the the shuffle result since it can never happen.

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

12 years agoAdd a couple llvm_unreachables.
Craig Topper [Mon, 23 Apr 2012 03:42:40 +0000 (03:42 +0000)]
Add a couple llvm_unreachables.

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

12 years agoRemove some tab characers.
Craig Topper [Mon, 23 Apr 2012 03:28:34 +0000 (03:28 +0000)]
Remove some tab characers.

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

12 years agoRemove some 'else' after 'return'. No functional change.
Craig Topper [Mon, 23 Apr 2012 03:26:18 +0000 (03:26 +0000)]
Remove some 'else' after 'return'. No functional change.

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

12 years agoDon't die with an assertion if the Result bitwidth is already correct. This
Chris Lattner [Mon, 23 Apr 2012 00:27:54 +0000 (00:27 +0000)]
Don't die with an assertion if the Result bitwidth is already correct.  This
fixes an assert reading "1239123123123123" when the result is already 64-bit.

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

12 years agoCleanup whitespace.
Bill Wendling [Mon, 23 Apr 2012 00:23:33 +0000 (00:23 +0000)]
Cleanup whitespace.

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

12 years agoLimit the number of times we recurse through this algorithm. All of the
Bill Wendling [Mon, 23 Apr 2012 00:22:55 +0000 (00:22 +0000)]
Limit the number of times we recurse through this algorithm. All of the
intructions are processed. So there's no need to look at them if they're used as
operands of other instructions.

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

12 years agoMake Extract128BitVector and Insert128BitVector take an unsigned instead of an Consta...
Craig Topper [Sun, 22 Apr 2012 20:55:18 +0000 (20:55 +0000)]
Make Extract128BitVector and Insert128BitVector take an unsigned instead of an ConstantNode SDValue. getConstant was almost always called just before only to have the functions take it apart and build a new ConstantSDNode.

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

12 years agoConvert getNode(UNDEF) to getUNDEF.
Craig Topper [Sun, 22 Apr 2012 19:29:34 +0000 (19:29 +0000)]
Convert getNode(UNDEF) to getUNDEF.

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

12 years agoMake calls to getVectorShuffle more consistent. Use shuffle VT for calls to getUNDEF...
Craig Topper [Sun, 22 Apr 2012 19:17:57 +0000 (19:17 +0000)]
Make calls to getVectorShuffle more consistent. Use shuffle VT for calls to getUNDEF instead of requerying. Use &Mask[0] instead of Mask.data().

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

12 years agoTidy up. 80 columns and argument alignment.
Craig Topper [Sun, 22 Apr 2012 18:51:37 +0000 (18:51 +0000)]
Tidy up. 80 columns and argument alignment.

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

12 years agoSimplify code by converting multiple places that were manually concatenating 128...
Craig Topper [Sun, 22 Apr 2012 18:15:59 +0000 (18:15 +0000)]
Simplify code by converting multiple places that were manually concatenating 128-bit vectors to use either CONCAT_VECTORS or a helper function. CONCAT_VECTORS will itself be lowered to the same pattern as before. The helper function is needed for concats of BUILD_VECTORs since getNode(CONCAT_VECTORS) will just return a large BUILD_VECTOR and we may be trying to lower large BUILD_VECTORS when this occurs.

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

12 years agocleaned line endings in the newly added test file
Elena Demikhovsky [Sun, 22 Apr 2012 13:22:48 +0000 (13:22 +0000)]
cleaned line endings in the newly added test file

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

12 years agoARM: Initialize the HasRAS bit.
Benjamin Kramer [Sun, 22 Apr 2012 11:52:41 +0000 (11:52 +0000)]
ARM: Initialize the HasRAS bit.

Found by valgrind.

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

12 years agoTidy up this test more:
Chandler Carruth [Sun, 22 Apr 2012 10:11:26 +0000 (10:11 +0000)]
Tidy up this test more:
1) Make the checked assertions a bit more precise. We really want the
   canonical forms coming out of reassociate to be exactly what is
   expected.
2) Remove other passes, and switch the test to actually directly check
   that reassociate makes the important transforms and
   canonicalizations.
3) Fold in a related test case now that we're using FileCheck. Make the
   same tidying changes to it.

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

12 years agoFileCheck-ize a test, and tidy it up a touch.
Chandler Carruth [Sun, 22 Apr 2012 10:11:23 +0000 (10:11 +0000)]
FileCheck-ize a test, and tidy it up a touch.

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

12 years agoZERO_EXTEND/SIGN_EXTEND/TRUNCATE optimization for AVX2
Elena Demikhovsky [Sun, 22 Apr 2012 09:39:03 +0000 (09:39 +0000)]
ZERO_EXTEND/SIGN_EXTEND/TRUNCATE optimization for AVX2

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

12 years agoRemove some potential warnings about variables used uninitialized.
Bill Wendling [Sun, 22 Apr 2012 07:23:04 +0000 (07:23 +0000)]
Remove some potential warnings about variables used uninitialized.

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

12 years agoAdd a flag to the struct type finder to collect only those types which have
Bill Wendling [Sat, 21 Apr 2012 23:59:16 +0000 (23:59 +0000)]
Add a flag to the struct type finder to collect only those types which have
names. This saves collecting types we normally don't care about.

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

12 years agoNo need for "else if" after a return. Autosense "0o123" as octal in
Chris Lattner [Sat, 21 Apr 2012 22:03:05 +0000 (22:03 +0000)]
No need for "else if" after a return.  Autosense "0o123" as octal in
StringRef::getAsInteger

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

12 years agostop hiding SmallVector's append that takes a count + element.
Chris Lattner [Sat, 21 Apr 2012 21:02:03 +0000 (21:02 +0000)]
stop hiding SmallVector's append that takes a count + element.

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

12 years agoTeach getVectorTypeBreakdown about promotion of vectors in addition to widening of...
Nadav Rotem [Sat, 21 Apr 2012 20:08:32 +0000 (20:08 +0000)]
Teach getVectorTypeBreakdown about promotion of vectors in addition to widening of vectors.

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

12 years agoMake some fixed arrays const. Use array_lengthof in a couple places instead of a...
Craig Topper [Sat, 21 Apr 2012 18:58:38 +0000 (18:58 +0000)]
Make some fixed arrays const. Use array_lengthof in a couple places instead of a hardcoded number.

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

12 years agoTidy up. 80 columns and some other spacing issues.
Craig Topper [Sat, 21 Apr 2012 18:13:35 +0000 (18:13 +0000)]
Tidy up. 80 columns and some other spacing issues.

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

12 years agoRemove unused PointerLikeTypeTraits for IndexListEntry.
Benjamin Kramer [Sat, 21 Apr 2012 16:05:27 +0000 (16:05 +0000)]
Remove unused PointerLikeTypeTraits for IndexListEntry.

It set NumLowBitAvailable = 3 which may not be true on all platforms.  We only
ever use 2 bits (the default) so this assumption can be safely removed

Should fix PR12612.

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

12 years agollvm/lib/Target: [PR12611] Add "llvm/Support/raw_ostream.h" for Debug build on MSVC.
NAKAMURA Takumi [Sat, 21 Apr 2012 15:31:45 +0000 (15:31 +0000)]
llvm/lib/Target: [PR12611] Add "llvm/Support/raw_ostream.h" for Debug build on MSVC.

Thanks to Andy Gibbs, to report the issue.

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

12 years agoHexagonISelLowering.cpp: Reorder #includes.
NAKAMURA Takumi [Sat, 21 Apr 2012 15:31:36 +0000 (15:31 +0000)]
HexagonISelLowering.cpp: Reorder #includes.

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

12 years agoCMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older environments...
NAKAMURA Takumi [Sat, 21 Apr 2012 14:51:02 +0000 (14:51 +0000)]
CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older environments than VS9.

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

12 years agoCMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. HandleLLVMOptions...
NAKAMURA Takumi [Sat, 21 Apr 2012 14:50:56 +0000 (14:50 +0000)]
CMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. HandleLLVMOptions.cmake has it.

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

12 years agomove Signals to .rodata
Nuno Lopes [Sat, 21 Apr 2012 14:45:37 +0000 (14:45 +0000)]
move Signals to .rodata

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

12 years agoHexagonInstPrinter.cpp: Suppress -Wunused-variable warnings with -Asserts.
NAKAMURA Takumi [Sat, 21 Apr 2012 11:24:55 +0000 (11:24 +0000)]
HexagonInstPrinter.cpp: Suppress -Wunused-variable warnings with -Asserts.

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

12 years agoYAMLParser: silence warning about tautological comparison on unsigned-char platforms.
Benjamin Kramer [Sat, 21 Apr 2012 10:51:42 +0000 (10:51 +0000)]
YAMLParser: silence warning about tautological comparison on unsigned-char platforms.

No functionality change.

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

12 years agoRemove 'XXXRegisterClass' from tablegen output. Targets should use '&XXXRegClass...
Craig Topper [Sat, 21 Apr 2012 01:49:25 +0000 (01:49 +0000)]
Remove 'XXXRegisterClass' from tablegen output. Targets should use '&XXXRegClass' instead.

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

12 years agoARM: tblgen'erate more NEON two-operand aliases.
Jim Grosbach [Fri, 20 Apr 2012 23:46:33 +0000 (23:46 +0000)]
ARM: tblgen'erate more NEON two-operand aliases.

VMUL and VEXT.

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

12 years agoFix PR12599.
Jakob Stoklund Olesen [Fri, 20 Apr 2012 23:36:09 +0000 (23:36 +0000)]
Fix PR12599.

The X86 target is editing the selection DAG while isel is selecting
nodes following a topological ordering. When the DAG hacking triggers
CSE, nodes can be deleted and bad things happen.

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

12 years agoARM: tblgen'erate more NEON two-operand aliases.
Jim Grosbach [Fri, 20 Apr 2012 23:30:14 +0000 (23:30 +0000)]
ARM: tblgen'erate more NEON two-operand aliases.

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

12 years agoRevert r155241, which is causing some breakage.
Bill Wendling [Fri, 20 Apr 2012 23:11:38 +0000 (23:11 +0000)]
Revert r155241, which is causing some breakage.

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

12 years agoMake ISelPosition a local variable.
Jakob Stoklund Olesen [Fri, 20 Apr 2012 22:08:50 +0000 (22:08 +0000)]
Make ISelPosition a local variable.

Now that multiple DAGUpdateListeners can be active at the same time,
ISelPosition can become a local variable in DoInstructionSelection.

We simply register an ISelUpdater with CurDAG while ISelPosition exists.

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

12 years agoRegister DAGUpdateListeners with SelectionDAG.
Jakob Stoklund Olesen [Fri, 20 Apr 2012 22:08:46 +0000 (22:08 +0000)]
Register DAGUpdateListeners with SelectionDAG.

Instead of passing listener pointers to RAUW, let SelectionDAG itself
keep a linked list of interested listeners.

This makes it possible to have multiple listeners active at once, like
RAUWUpdateListener was already doing. It also makes it possible to
register listeners up the call stack without controlling all RAUW calls
below.

DAGUpdateListener uses an RAII pattern to add itself to the SelectionDAG
list of active listeners.

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

12 years agoExtraneous semicolon.
Eric Christopher [Fri, 20 Apr 2012 22:07:50 +0000 (22:07 +0000)]
Extraneous semicolon.

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

12 years agoIf we discover all of the named structs in a module, then don't bother to
Bill Wendling [Fri, 20 Apr 2012 21:56:24 +0000 (21:56 +0000)]
If we discover all of the named structs in a module, then don't bother to
process any more Values.

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

12 years agoPrint <def,read-undef> to avoid confusion.
Jakob Stoklund Olesen [Fri, 20 Apr 2012 21:45:33 +0000 (21:45 +0000)]
Print <def,read-undef> to avoid confusion.

The <undef> flag on a def operand only applies to partial register
redefinitions. Only print the flag when relevant, and print it as
<def,read-undef> to make it clearer what it means.

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

12 years agoAdded TargetRegisterInfo::getRegPressureSetName.
Andrew Trick [Fri, 20 Apr 2012 20:45:00 +0000 (20:45 +0000)]
Added TargetRegisterInfo::getRegPressureSetName.

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

12 years agoTableGen'd RegPressure: Added getPressureSetName.
Andrew Trick [Fri, 20 Apr 2012 20:44:58 +0000 (20:44 +0000)]
TableGen'd RegPressure: Added getPressureSetName.

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

12 years agoModify the sh-bang to run out-of-the-box for FreeBSDes.
Bill Wendling [Fri, 20 Apr 2012 20:31:44 +0000 (20:31 +0000)]
Modify the sh-bang to run out-of-the-box for FreeBSDes.

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

12 years agoNew and improved comment.
Andrew Trick [Fri, 20 Apr 2012 20:24:33 +0000 (20:24 +0000)]
New and improved comment.

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

12 years agoSparseSet: Add support for key-derived indexes and arbitrary key types.
Andrew Trick [Fri, 20 Apr 2012 20:05:28 +0000 (20:05 +0000)]
SparseSet: Add support for key-derived indexes and arbitrary key types.

This nicely handles the most common case of virtual register sets, but
also handles anticipated cases where we will map pointers to IDs.

The goal is not to develop a completely generic SparseSet
template. Instead we want to handle the expected uses within llvm
without any template antics in the client code. I'm adding a bit of
template nastiness here, and some assumption about expected usage in
order to make the client code very clean.

The expected common uses cases I'm designing for:
- integer keys that need to be reindexed, and may map to additional
  data
- densely numbered objects where we want pointer keys because no
  number->object map exists.

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

12 years agomisched: initialize BB
Andrew Trick [Fri, 20 Apr 2012 20:05:21 +0000 (20:05 +0000)]
misched: initialize BB

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

12 years agoAllow converting MachineBasicBlock::iterator to const_iterator.
Andrew Trick [Fri, 20 Apr 2012 20:05:19 +0000 (20:05 +0000)]
Allow converting MachineBasicBlock::iterator to const_iterator.

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

12 years ago[docs] Update version number. I suggest that at some point we make the
Michael J. Spencer [Fri, 20 Apr 2012 19:28:40 +0000 (19:28 +0000)]
[docs] Update version number. I suggest that at some point we make the
build system generate this file with the proper version.

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

12 years agoFix broken internal link.
Joel Jones [Fri, 20 Apr 2012 18:20:24 +0000 (18:20 +0000)]
Fix broken internal link.

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

12 years agoKick off 3.2 cycle for LLVM trunk.
Benjamin Kramer [Fri, 20 Apr 2012 18:15:07 +0000 (18:15 +0000)]
Kick off 3.2 cycle for LLVM trunk.

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

12 years agoARM: Update NEON assembly two-operand aliases.
Jim Grosbach [Fri, 20 Apr 2012 18:12:54 +0000 (18:12 +0000)]
ARM: Update NEON assembly two-operand aliases.

Use the new TwoOperandAliasConstraint to handle lots of the two-operand aliases
for NEON instructions. There's still more to go, but this is a good chunk of
them.

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

12 years agoAdd debugging hints for when bugpoint does not suffice, specifically for instcombine...
Joel Jones [Fri, 20 Apr 2012 18:11:07 +0000 (18:11 +0000)]
Add debugging hints for when bugpoint does not suffice, specifically for instcombine and TargetLowering

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

12 years ago[docs] Update Makefile for images removal.
Daniel Dunbar [Fri, 20 Apr 2012 17:27:12 +0000 (17:27 +0000)]
[docs] Update Makefile for images removal.
 - Also, drop the lines.gif background from doxygen, this URL was wrong on the
   llvm.org server anyway.

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