oota-llvm.git
15 years agoFix test erratum (which is wierd: works locally for me?)
Scott Michel [Tue, 30 Dec 2008 23:52:05 +0000 (23:52 +0000)]
Fix test erratum (which is wierd: works locally for me?)

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

15 years ago- Start moving target-dependent nodes that could be represented by an
Scott Michel [Tue, 30 Dec 2008 23:28:25 +0000 (23:28 +0000)]
- Start moving target-dependent nodes that could be represented by an
  instruction sequence and cannot ordinarily be simplified by DAGcombine
  into the various target description files or SPUDAGToDAGISel.cpp.

  This makes some 64-bit operations legal.

- Eliminate target-dependent ISD enums.

- Update tests.

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

15 years agoLinux wants the FDE initial location and address range to be forced to 32-bit.
Bill Wendling [Mon, 29 Dec 2008 22:12:11 +0000 (22:12 +0000)]
Linux wants the FDE initial location and address range to be forced to 32-bit.
Darwin doesn't. Make this optional for platforms.

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

15 years agoThe FDE initial location and address range data should be free to be 64-bit
Bill Wendling [Mon, 29 Dec 2008 21:51:42 +0000 (21:51 +0000)]
The FDE initial location and address range  data should be free to be 64-bit
(quad) on a 64-bit platform. This fixes a problem with EH frames on Darwin.

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

15 years ago* Updated TOC and fixed named anchors
Misha Brukman [Mon, 29 Dec 2008 21:33:30 +0000 (21:33 +0000)]
* Updated TOC and fixed named anchors
* Simplified section header marking

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

15 years agoMinimize the width of the notes region: it will end where the text ends, if the
Misha Brukman [Mon, 29 Dec 2008 21:25:09 +0000 (21:25 +0000)]
Minimize the width of the notes region: it will end where the text ends, if the
line of text is short enough, instead of stretching all the way to the right
margin.

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

15 years agoSimplified marking code regions with a single <pre> rather than
Misha Brukman [Mon, 29 Dec 2008 21:20:51 +0000 (21:20 +0000)]
Simplified marking code regions with a single <pre> rather than
a (<div>, <pre>) combo.

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

15 years agoMake stripPointerCasts and getUnderlyingObject
Duncan Sands [Mon, 29 Dec 2008 21:06:19 +0000 (21:06 +0000)]
Make stripPointerCasts and getUnderlyingObject
non-recursive.

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

15 years agoExperiments show that looking through phi nodes
Duncan Sands [Mon, 29 Dec 2008 20:51:17 +0000 (20:51 +0000)]
Experiments show that looking through phi nodes
and select instructions doesn't buy anything here
except extra complexity: the only difference in
the entire testsuite was that a readonly function
became readnone in MiBench/consumer-typeset.  Add
a comment about this.

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

15 years agoFixed spelling, removed trailing whitespace.
Misha Brukman [Mon, 29 Dec 2008 20:08:23 +0000 (20:08 +0000)]
Fixed spelling, removed trailing whitespace.

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

15 years agoCenter the legal note to give it even padding on left and right, and make it
Misha Brukman [Mon, 29 Dec 2008 19:55:01 +0000 (19:55 +0000)]
Center the legal note to give it even padding on left and right, and make it
stand out better.

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

15 years agoCleanup: clarify llvm-gcc version and package name.
Misha Brukman [Mon, 29 Dec 2008 19:38:58 +0000 (19:38 +0000)]
Cleanup: clarify llvm-gcc version and package name.

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

15 years agoClarify a bit. Based on feedback by Talin.
Duncan Sands [Mon, 29 Dec 2008 15:27:32 +0000 (15:27 +0000)]
Clarify a bit.  Based on feedback by Talin.

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

15 years agoAllow readnone functions to read (and write!) global
Duncan Sands [Mon, 29 Dec 2008 11:34:09 +0000 (11:34 +0000)]
Allow readnone functions to read (and write!) global
constants, since doing so is irrelevant for aliasing
purposes.  While this doesn't increase the total number
of functions marked readonly or readnone in MultiSource/
Applications (3089), it does result in 12 functions being
marked readnone rather than readonly.
Before:
  readnone: 820
  readonly: 2269
After:
  readnone: 832
  readonly: 2257

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

15 years agoAdd braces, as suggested by a gcc warning.
Duncan Sands [Mon, 29 Dec 2008 08:05:02 +0000 (08:05 +0000)]
Add braces, as suggested by a gcc warning.

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

15 years ago- Various '#if 0' cleanups.
Scott Michel [Mon, 29 Dec 2008 03:23:36 +0000 (03:23 +0000)]
- Various '#if 0' cleanups.
- Move v4i32, i32 mul into SPUInstrInfo.td, with a few more instruction
  cleanups there as well.
- Make SMUL_LOHI, UMUL_LOHI competely illegal for Cell SPU, to better
  assist Chris to see the problem in bug 3101.

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

15 years agoTeach LeaglizeDAG that i64 mul can be a libcall.
Scott Michel [Mon, 29 Dec 2008 03:21:37 +0000 (03:21 +0000)]
Teach LeaglizeDAG that i64 mul can be a libcall.

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

15 years agoselect constant exprs should have the same constraints as select instructions,
Chris Lattner [Mon, 29 Dec 2008 00:16:12 +0000 (00:16 +0000)]
select constant exprs should have the  same constraints as select instructions,
notably, they should support vectors and aggregates.

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

15 years agomove select validation logic into a shared place where the select ctor,
Chris Lattner [Mon, 29 Dec 2008 00:12:50 +0000 (00:12 +0000)]
move select validation logic into a shared place where the select ctor,
verifier, asm parser, etc can share it.

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

15 years agoFix up kill/dead marking in the new live interval reconstruction code.
Owen Anderson [Sun, 28 Dec 2008 23:35:13 +0000 (23:35 +0000)]
Fix up kill/dead marking in the new live interval reconstruction code.

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

15 years agoForgot to commit this file.
Owen Anderson [Sun, 28 Dec 2008 21:57:02 +0000 (21:57 +0000)]
Forgot to commit this file.

Add a clear() method to remove all ranges and value numbers for a live interval.

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

15 years agoAdd prototype code for recomputing a live interval's ranges and valnos through recurs...
Owen Anderson [Sun, 28 Dec 2008 21:48:48 +0000 (21:48 +0000)]
Add prototype code for recomputing a live interval's ranges and valnos through recursive phi construction.

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

15 years agoCheck that the function prototypes are correct before assuming that the
Nick Lewycky [Sat, 27 Dec 2008 16:20:53 +0000 (16:20 +0000)]
Check that the function prototypes are correct before assuming that the
parameters are pointers.

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

15 years agoadd testcase for type parsing.
Chris Lattner [Sat, 27 Dec 2008 08:10:46 +0000 (08:10 +0000)]
add testcase for type parsing.

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

15 years agoimplement simplify_type for PATypeHolder so that isa<FooType>(PATypeHolder)
Chris Lattner [Sat, 27 Dec 2008 07:47:40 +0000 (07:47 +0000)]
implement simplify_type for PATypeHolder so that isa<FooType>(PATypeHolder)
works.

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

15 years ago- Remove Tilmann's custom truncate lowering: it completely hosed over
Scott Michel [Sat, 27 Dec 2008 04:51:36 +0000 (04:51 +0000)]
- Remove Tilmann's custom truncate lowering: it completely hosed over
  DAGcombine's ability to find reasons to remove truncates when they were not
  needed. Consequently, the CellSPU backend would produce correct, but _really
  slow and horrible_, code.

  Replaced with instruction sequences that do the equivalent truncation in
  SPUInstrInfo.td.

- Re-examine how unaligned loads and stores work. Generated unaligned
  load code has been tested on the CellSPU hardware; see the i32operations.c
  and i64operations.c in CodeGen/CellSPU/useful-harnesses.  (While they may be
  toy test code, it does prove that some real world code does compile
  correctly.)

- Fix truncating stores in bug 3193 (note: unpack_df.ll will still make llc
  fault because i64 ult is not yet implemented.)

- Added i64 eq and neq for setcc and select/setcc; started new instruction
  information file for them in SPU64InstrInfo.td. Additional i64 operations
  should be added to this file and not to SPUInstrInfo.td.

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

15 years agoadd PR #
Chris Lattner [Thu, 25 Dec 2008 05:40:38 +0000 (05:40 +0000)]
add PR #

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

15 years agoAdd a simple pattern for matching 'bt'.
Chris Lattner [Thu, 25 Dec 2008 05:34:37 +0000 (05:34 +0000)]
Add a simple pattern for matching 'bt'.

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

15 years agoFix some JIT encodings.
Chris Lattner [Thu, 25 Dec 2008 01:32:49 +0000 (01:32 +0000)]
Fix some JIT encodings.

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

15 years agoBT memory operands load from their address operand.
Chris Lattner [Thu, 25 Dec 2008 01:27:10 +0000 (01:27 +0000)]
BT memory operands load from their address operand.

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

15 years agotranslateX86CC can never fail. Simplify it based on this.
Chris Lattner [Wed, 24 Dec 2008 23:53:05 +0000 (23:53 +0000)]
translateX86CC can never fail.  Simplify it based on this.

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

15 years agoDarwin likes for the EH frame to be non-local.
Bill Wendling [Wed, 24 Dec 2008 08:05:17 +0000 (08:05 +0000)]
Darwin likes for the EH frame to be non-local.

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

15 years agoGCC doesn't emit DW_EH_PE_sdata4 for the FDE encoding on Darwin. I'm not sure
Bill Wendling [Wed, 24 Dec 2008 05:25:49 +0000 (05:25 +0000)]
GCC doesn't emit DW_EH_PE_sdata4 for the FDE encoding on Darwin. I'm not sure
about other platforms.

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

15 years agoRevert the changes in this testcase until Anton can fix them.
Bill Wendling [Wed, 24 Dec 2008 05:23:34 +0000 (05:23 +0000)]
Revert the changes in this testcase until Anton can fix them.

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

15 years agoFix a compiler-abort on a testcase where the stack-pointer is added to
Dan Gohman [Wed, 24 Dec 2008 00:27:51 +0000 (00:27 +0000)]
Fix a compiler-abort on a testcase where the stack-pointer is added to
a symbolic constant. This is unlikely to be intentional, but it
shouldn't crash the compiler.

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

15 years agoindentation
Chris Lattner [Wed, 24 Dec 2008 00:11:37 +0000 (00:11 +0000)]
indentation

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

15 years agoChange comments so everybody can understand them, hopefully.
Dale Johannesen [Tue, 23 Dec 2008 23:47:22 +0000 (23:47 +0000)]
Change comments so everybody can understand them, hopefully.

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

15 years agosimplify some control flow and reduce indentation, no functionality change.
Chris Lattner [Tue, 23 Dec 2008 23:42:27 +0000 (23:42 +0000)]
simplify some control flow and reduce indentation, no functionality change.

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

15 years agoRevert 61362 and 61402 until SPEC breakage is fixed.
Dale Johannesen [Tue, 23 Dec 2008 23:21:35 +0000 (23:21 +0000)]
Revert 61362 and 61402 until SPEC breakage is fixed.

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

15 years agoThis fixes the bug in 175.vpr. It doesn't fix the
Dale Johannesen [Tue, 23 Dec 2008 23:05:26 +0000 (23:05 +0000)]
This fixes the bug in 175.vpr.  It doesn't fix the
other SPEC breakage.  I'll be reverting all recent
changes shortly, this checking is mostly so this
change doesn't get lost.

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

15 years agoAdd another permutation where we should get rid of a-a.
Dale Johannesen [Tue, 23 Dec 2008 23:01:27 +0000 (23:01 +0000)]
Add another permutation where we should get rid of a-a.

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

15 years agoAdd instruction patterns and encodings for the x86 bt instructions.
Dan Gohman [Tue, 23 Dec 2008 22:45:23 +0000 (22:45 +0000)]
Add instruction patterns and encodings for the x86 bt instructions.

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

15 years agoUpdate test
Anton Korobeynikov [Tue, 23 Dec 2008 22:26:37 +0000 (22:26 +0000)]
Update test

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

15 years agoRestore debug printing
Anton Korobeynikov [Tue, 23 Dec 2008 22:26:18 +0000 (22:26 +0000)]
Restore debug printing

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

15 years agoSometimes APInt syntax is really ugly... :(
Anton Korobeynikov [Tue, 23 Dec 2008 22:26:01 +0000 (22:26 +0000)]
Sometimes APInt syntax is really ugly... :(

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

15 years agoIndent stuff properly
Anton Korobeynikov [Tue, 23 Dec 2008 22:25:45 +0000 (22:25 +0000)]
Indent stuff properly

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

15 years agoInitial checkin of APInt'ififcation of switch lowering
Anton Korobeynikov [Tue, 23 Dec 2008 22:25:27 +0000 (22:25 +0000)]
Initial checkin of APInt'ififcation of switch lowering

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

15 years agoSilence unused variable warnings.
Devang Patel [Tue, 23 Dec 2008 21:56:28 +0000 (21:56 +0000)]
Silence unused variable warnings.

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

15 years agoFix typo.
Devang Patel [Tue, 23 Dec 2008 21:55:38 +0000 (21:55 +0000)]
Fix typo.
Silence unused variable warning.

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

15 years agoSilience unused warnings.
Devang Patel [Tue, 23 Dec 2008 21:55:04 +0000 (21:55 +0000)]
Silience unused warnings.

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

15 years agoClean up the atomic opcodes in SelectionDAG.
Dan Gohman [Tue, 23 Dec 2008 21:37:04 +0000 (21:37 +0000)]
Clean up the atomic opcodes in SelectionDAG.

This removes all the _8, _16, _32, and _64 opcodes and replaces each
group with an unsuffixed opcode. The MemoryVT field of the AtomicSDNode
is now used to carry the size information. In tablegen, the size-specific
opcodes are replaced by size-independent opcodes that utilize the
ability to compose them with predicates.

This shrinks the per-opcode tables and makes the code that handles
atomics much more concise.

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

15 years agoadd some notes for simplifylibcalls optimizations
Chris Lattner [Tue, 23 Dec 2008 20:52:52 +0000 (20:52 +0000)]
add some notes for simplifylibcalls optimizations

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

15 years agoTestcase to show we can tie together integers and pointers of
Chris Lattner [Tue, 23 Dec 2008 18:52:26 +0000 (18:52 +0000)]
Testcase to show we can tie together integers and pointers of
the same size.

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

15 years agoTweak --version to include the date and time.
Steve Naroff [Tue, 23 Dec 2008 18:41:47 +0000 (18:41 +0000)]
Tweak --version to include the date and time.

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

15 years agoRename BuildSchedUnits to BuildSchedGraph, and refactor the
Dan Gohman [Tue, 23 Dec 2008 18:36:58 +0000 (18:36 +0000)]
Rename BuildSchedUnits to BuildSchedGraph, and refactor the
code in ScheduleDAGSDNodes' BuildSchedGraph into separate functions.

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

15 years agoComment MO_FPImmediate and doxygenate surrounding comments.
Dan Gohman [Tue, 23 Dec 2008 18:20:16 +0000 (18:20 +0000)]
Comment MO_FPImmediate and doxygenate surrounding comments.

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

15 years agoUse isTerminator() instead of isBranch()||isReturn() in
Dan Gohman [Tue, 23 Dec 2008 17:28:50 +0000 (17:28 +0000)]
Use isTerminator() instead of isBranch()||isReturn() in
several places. isTerminator() returns true for a superset
of cases, and includes things like FP_REG_KILL, which are
nither return or branch but aren't safe to move/remat/etc.

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

15 years agoAvoid an unnecessary call to allnodes_size(), which is linear.
Dan Gohman [Tue, 23 Dec 2008 17:24:50 +0000 (17:24 +0000)]
Avoid an unnecessary call to allnodes_size(), which is linear.

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

15 years agoMinor code simplifications.
Dan Gohman [Tue, 23 Dec 2008 17:22:32 +0000 (17:22 +0000)]
Minor code simplifications.

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

15 years agorevert r61368.
Zhongxing Xu [Tue, 23 Dec 2008 05:43:56 +0000 (05:43 +0000)]
revert r61368.

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

15 years agoRemove dead code.
Zhongxing Xu [Tue, 23 Dec 2008 05:30:44 +0000 (05:30 +0000)]
Remove dead code.

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

15 years agoAdded shuffle and splat test cases for r61365.
Mon P Wang [Tue, 23 Dec 2008 04:05:08 +0000 (04:05 +0000)]
Added shuffle and splat test cases for r61365.

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

15 years agoFixed code generation for v8i16 and v16i8 splats on X86.
Mon P Wang [Tue, 23 Dec 2008 04:03:27 +0000 (04:03 +0000)]
Fixed code generation for v8i16 and v16i8 splats on X86.
Fixed lowering of v8i16 shuffles for v8i16 when we fall back to extract/insert.

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

15 years agoFix the time regression I introduced in 464.h264ref with
Dale Johannesen [Tue, 23 Dec 2008 02:12:52 +0000 (02:12 +0000)]
Fix the time regression I introduced in 464.h264ref with
my last patch to this file.

The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop.  This was extra bad
because register pressure later forced both base and IV into
memory.  Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this.  However,
there were side effects....

It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before.  And when inserting
new code that feeds into a PHI, it's right to put such
code at the original location rather than in the PHI's
immediate predecessor(s) when the original location is outside
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.

Also, the mechanism for keeping SCEV's corresponding to GEP's
no longer works, as the GEP might change after its SCEV
is remembered, invalidating the SCEV, and we might get a bad
SCEV value when looking up the GEP again for a later loop.
This also couldn't happen before, as we weren't recursing
into GEP's outside the loop.

I owe some testcases for this, want to get it in for nightly runs.

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

15 years agoOne more permutation of subtracting off a base value.
Dale Johannesen [Tue, 23 Dec 2008 01:59:54 +0000 (01:59 +0000)]
One more permutation of subtracting off a base value.

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

15 years agoDon't forget to remove phi nodes from the value numbering table after we collapse...
Owen Anderson [Tue, 23 Dec 2008 00:49:51 +0000 (00:49 +0000)]
Don't forget to remove phi nodes from the value numbering table after we collapse them.

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

15 years agoMake the fuse-failed debug output human-readable.
Dan Gohman [Tue, 23 Dec 2008 00:19:20 +0000 (00:19 +0000)]
Make the fuse-failed debug output human-readable.

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

15 years agoComment clean-ups. No functionality change.
Bill Wendling [Mon, 22 Dec 2008 22:32:22 +0000 (22:32 +0000)]
Comment clean-ups. No functionality change.

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

15 years agoCheck that the instruction isn't in the value numbering scope.
Bill Wendling [Mon, 22 Dec 2008 22:28:56 +0000 (22:28 +0000)]
Check that the instruction isn't in the value numbering scope.

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

15 years agoSimplification: Negate the operator== method instead of implementing a full operator...
Bill Wendling [Mon, 22 Dec 2008 22:16:31 +0000 (22:16 +0000)]
Simplification: Negate the operator== method instead of implementing a full operator!= method.

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

15 years agoAdd verification that deleted instruction isn't hiding in the PHI map.
Bill Wendling [Mon, 22 Dec 2008 22:14:07 +0000 (22:14 +0000)]
Add verification that deleted instruction isn't hiding in the PHI map.

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

15 years agoVerify removed in a few more places.
Bill Wendling [Mon, 22 Dec 2008 21:57:30 +0000 (21:57 +0000)]
Verify removed in a few more places.

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

15 years agoAdd verification functions to GVN which check to see that an instruction was
Bill Wendling [Mon, 22 Dec 2008 21:36:08 +0000 (21:36 +0000)]
Add verification functions to GVN which check to see that an instruction was
truely deleted. These will be expanded with further checks of all of the data
structures.

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

15 years agoRefactor a bunch of code out of AsmPrinter::EmitGlobalConstant into separate
Dan Gohman [Mon, 22 Dec 2008 21:14:27 +0000 (21:14 +0000)]
Refactor a bunch of code out of AsmPrinter::EmitGlobalConstant into separate
functions.

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

15 years agoOptimize setDepthDirty and setHeightDirty a little, as they showed
Dan Gohman [Mon, 22 Dec 2008 21:11:33 +0000 (21:11 +0000)]
Optimize setDepthDirty and setHeightDirty a little, as they showed
up on a profile.

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

15 years agoAdd an assertion to the ScheduleDAGInstrs class to catch SUnits
Dan Gohman [Mon, 22 Dec 2008 21:08:08 +0000 (21:08 +0000)]
Add an assertion to the ScheduleDAGInstrs class to catch SUnits
reallocations. We don't do cloning on MachineInstr schedule DAGs,
but this is a worthwhile sanity check regardless.

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

15 years agoAdd an accesor for the isNormalMemory field in the SDep class.
Dan Gohman [Mon, 22 Dec 2008 21:06:56 +0000 (21:06 +0000)]
Add an accesor for the isNormalMemory field in the SDep class.

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

15 years agoAdd an assertion to catch SUnits reallocations. And add a doxygen
Dan Gohman [Mon, 22 Dec 2008 21:06:20 +0000 (21:06 +0000)]
Add an assertion to catch SUnits reallocations. And add a doxygen
comment for the ScheduleDAGSDNodes class.

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

15 years agoClarify a comment.
Dan Gohman [Mon, 22 Dec 2008 19:44:39 +0000 (19:44 +0000)]
Clarify a comment.

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

15 years agoUse ignore & grep instead of XFAIL.
Mikhail Glushenkov [Sun, 21 Dec 2008 07:47:49 +0000 (07:47 +0000)]
Use ignore & grep instead of XFAIL.

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

15 years agoTurn strcmp into memcmp, such as strcmp(P, "x") --> memcmp(P, "x", 2).
Nick Lewycky [Sun, 21 Dec 2008 00:19:21 +0000 (00:19 +0000)]
Turn strcmp into memcmp, such as strcmp(P, "x") --> memcmp(P, "x", 2).

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

15 years agoFix fast-isel to not emit invalid assembly when presented with a
Dan Gohman [Sat, 20 Dec 2008 17:19:40 +0000 (17:19 +0000)]
Fix fast-isel to not emit invalid assembly when presented with a
constant shift count that doesn't fit in the shift instruction's
immediate field. This fixes PR3242.

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

15 years agoReword the comment for ConstantInt's getLimitedValue.
Dan Gohman [Sat, 20 Dec 2008 17:06:39 +0000 (17:06 +0000)]
Reword the comment for ConstantInt's getLimitedValue.

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

15 years agoRemove redundant test for vector-nature. Scan the vector first to see whether
Nick Lewycky [Sat, 20 Dec 2008 16:48:00 +0000 (16:48 +0000)]
Remove redundant test for vector-nature. Scan the vector first to see whether
our optz'n will apply to it, then build the replacement vector only if needed.

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

15 years agoLiveInterval::removeKills and isKill don't need 'this' and
Dan Gohman [Sat, 20 Dec 2008 16:44:40 +0000 (16:44 +0000)]
LiveInterval::removeKills and isKill don't need 'this' and
can be static member functions.

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

15 years agoUse SmallVector's pop_back_val.
Dan Gohman [Sat, 20 Dec 2008 16:42:33 +0000 (16:42 +0000)]
Use SmallVector's pop_back_val.

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

15 years agoUse the correct Preds and Succs lists in setHeightDirty()
Dan Gohman [Sat, 20 Dec 2008 16:34:57 +0000 (16:34 +0000)]
Use the correct Preds and Succs lists in setHeightDirty()
and setDepthDirty(), respectively. This fixes PR3241.

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

15 years agoMore precise XFAIL.
Bill Wendling [Fri, 19 Dec 2008 22:28:23 +0000 (22:28 +0000)]
More precise XFAIL.

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

15 years agoUn-XFAIL this test because it's passing and John doesn't seem interested in un-XFAILi...
Bill Wendling [Fri, 19 Dec 2008 22:25:01 +0000 (22:25 +0000)]
Un-XFAIL this test because it's passing and John doesn't seem interested in un-XFAILing it.

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

15 years agoUse ~0u instead of -1u as the special value, to hopefully avoid
Dan Gohman [Fri, 19 Dec 2008 22:23:43 +0000 (22:23 +0000)]
Use ~0u instead of -1u as the special value, to hopefully avoid
warnings on compilers that warn about such things.

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

15 years agoFix PR3149. If an early clobber def is a physical register and it is tied to an input...
Evan Cheng [Fri, 19 Dec 2008 20:58:01 +0000 (20:58 +0000)]
Fix PR3149. If an early clobber def is a physical register and it is tied to an input operand, it effectively extends the live range of the physical register. Currently we do not have a good way to represent this.

172     %ECX<def> = MOV32rr %reg1039<kill>
180     INLINEASM <es:subl $5,$1
        sbbl $3,$0>, 10, %EAX<def>, 14, %ECX<earlyclobber,def>, 9, %EAX<kill>,
36, <fi#0>, 1, %reg0, 0, 9, %ECX<kill>, 36, <fi#1>, 1, %reg0, 0
188     %EAX<def> = MOV32rr %EAX<kill>
196     %ECX<def> = MOV32rr %ECX<kill>
204     %ECX<def> = MOV32rr %ECX<kill>
212     %EAX<def> = MOV32rr %EAX<kill>
220     %EAX<def> = MOV32rr %EAX
228     %reg1039<def> = MOV32rr %ECX<kill>

The early clobber operand ties ECX input to the ECX def.

The live interval of ECX is represented as this:
%reg20,inf = [46,47:1)[174,230:0)  0@174-(230) 1@46-(47)

The right way to represent this is something like
%reg20,inf = [46,47:2)[174,182:1)[181:230:0)  0@174-(182) 1@181-230 @2@46-(47)

Of course that won't work since that means overlapping live ranges defined by two val#.

The workaround for now is to add a bit to val# which says the val# is redefined by a early clobber def somewhere. This prevents the move at 228 from being optimized away by SimpleRegisterCoalescing::AdjustCopiesBackFrom.

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

15 years agoThe fields for the stoppoint debug intrinsic have not changed, so update the
John Criswell [Fri, 19 Dec 2008 19:56:36 +0000 (19:56 +0000)]
The fields for the stoppoint debug intrinsic have not changed, so update the
version number assertions.

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

15 years agoThis test works again for Darwin because a patch was reverted.
Bill Wendling [Fri, 19 Dec 2008 19:08:13 +0000 (19:08 +0000)]
This test works again for Darwin because a patch was reverted.

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

15 years agoAdd dyn_cast_or_null bindings for some additional classes missed in r61252.
Gordon Henriksen [Fri, 19 Dec 2008 18:51:17 +0000 (18:51 +0000)]
Add dyn_cast_or_null bindings for some additional classes missed in r61252.

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

15 years agoC bindings for dyn_cast_or_null.
Gordon Henriksen [Fri, 19 Dec 2008 18:39:45 +0000 (18:39 +0000)]
C bindings for dyn_cast_or_null.
This operation can be used to build dyn_cast, isa, and cast.

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

15 years agoAdd support for writing LLVM IR to a specified BitstreamWriter.
Chris Lattner [Fri, 19 Dec 2008 18:37:59 +0000 (18:37 +0000)]
Add support for writing LLVM IR to a specified BitstreamWriter.
Patch by Lukasz Janyst!

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

15 years agoMove the patterns which have i8 immediates before the patterns
Dan Gohman [Fri, 19 Dec 2008 18:25:21 +0000 (18:25 +0000)]
Move the patterns which have i8 immediates before the patterns
that have i32 immediates so that they get selected first. This
currently only matters in the JIT, as assemblers will
automatically use the smallest encoding.

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

15 years agoUse dyn_cast intead of isa + cast in the generated DAGISel code. This
Dan Gohman [Fri, 19 Dec 2008 18:13:39 +0000 (18:13 +0000)]
Use dyn_cast intead of isa + cast in the generated DAGISel code. This
reduces the amount of code slightly when assertions are enabled.

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

15 years ago- CodeGenPrepare does not split loop back edges but it only knows about back edges...
Evan Cheng [Fri, 19 Dec 2008 18:03:11 +0000 (18:03 +0000)]
- CodeGenPrepare does not split loop back edges but it only knows about back edges of single block loops. It now does a DFS walk to find loop back edges.
- Use SplitBlockPredecessors to factor out common predecessors of the critical edge destination. This is disabled for now due to some regressions.

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

15 years agoFix some release-assert warnings
Chris Lattner [Fri, 19 Dec 2008 17:03:38 +0000 (17:03 +0000)]
Fix some release-assert warnings

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