1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

43035 Commits

Author SHA1 Message Date
Dan Gohman
be3e0caacb Ignore IMPLICIT_DEF instructions when computing physreg liveness.
While they appear to provide a normal clobbering def, they don't
in the case of the awkward IMPLICIT_DEF+INSERT_SUBREG idiom. It
would be good to change INSERT_SUBREG; until then, this change
allows post-regalloc scheduling to cope in a mildly conservative
way.

llvm-svn: 60583
2008-12-05 05:30:02 +00:00
Evan Cheng
1b795803dd Re-did 60519. It turns out Darwin's handling of hidden visibility symbols are a bit more complicate than I expected. Both declarations and weak definitions still need a stub indirection. However, the stubs are in data section and they contain the addresses of the actual symbols.
llvm-svn: 60571
2008-12-05 01:06:39 +00:00
Scott Michel
550ec4540c CellSPU: Add new directory under tests/CodeGen/CellSPU to retain tests that
aren't part of the test suite but are generally useful nonetheless, and can
be expanded later to test the backend against the actual Cell SPU system.

There's basically no other good place to put this code, so put it here for
the time being.

- vecoperations.c: Vector shuffles for all supported vector types, tests
  for v16i8 add and multiply.

llvm-svn: 60566
2008-12-05 00:01:00 +00:00
Ted Kremenek
a851e459e1 Have raw_fd_ostream keep track of the position in the file to make tell() go faster by not requiring a flush().
llvm-svn: 60560
2008-12-04 22:51:11 +00:00
Devang Patel
508dc0b548 Enable LoopIndexSplit pass.
llvm-svn: 60555
2008-12-04 21:40:31 +00:00
Devang Patel
4fcea36b8b Rewrite code that 1) filters loops and 2) calculates new loop bounds.
This fixes many bugs. I will add more test cases in a separate check-in.

Some day, the code that manipulates CFG and updates dom. info could use refactoring help.

llvm-svn: 60554
2008-12-04 21:38:42 +00:00
Owen Anderson
9e2293bda3 Factor out some common code.
llvm-svn: 60553
2008-12-04 21:20:30 +00:00
Scott Michel
6e9747d2d6 CellSPU: Fix bug 3055
- Add v4f32, v2f64 to LowerVECTOR_SHUFFLE
- Look for vector rotate in shuffle elements, generate a vector rotate
  instead of a full-blown shuffle when opportunity presents itself.
- Generate larger test harness and fix a few interesting but obscure bugs.

llvm-svn: 60552
2008-12-04 21:01:44 +00:00
Duncan Sands
658b461a3c When allocating a stack temporary, use the correct
number of bytes for types such as i1 which are not
a multiple of 8 bits in length.

llvm-svn: 60543
2008-12-04 18:08:40 +00:00
Scott Michel
26d15f31ac Missing closing brace and reverse conditional condition on NDEBUG
llvm-svn: 60541
2008-12-04 17:16:59 +00:00
Chris Lattner
7b3576824a Start simplifying a switch that has a successor that is a switch.
llvm-svn: 60534
2008-12-04 06:31:07 +00:00
Chris Lattner
3acb266d60 This code is apparently quite confused. In the meantime,
get it building when NDEBUG is set.

llvm-svn: 60532
2008-12-04 06:14:27 +00:00
Bill Wendling
a0466523bd Temporarily revert r60519. It was causing a bootstrap failure:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT barrier.lo -MD -MP -MF .deps/barrier.Tpo -c ../../../llvm-gcc.src/libgomp/barrier.c  -fno-common -DPIC -o .libs/barrier.o
checking for sys/file.h... /var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb"
/var/folders/zG/zGE-ZJOGFiGjv0B5cs5oYE+++TM/-Tmp-//cc34Jg5P.s:13:symbol: "_gomp_tls_key" can't be undefined in a subtraction expression
make[4]: *** [barrier.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -DHAVE_CONFIG_H -I. -I../../../llvm-gcc.src/libgomp -I. -I../../../llvm-gcc.src/libgomp/config/posix -I../../../llvm-gcc.src/libgomp -Wall -pthread -Werror -O2 -g -O2 -MT alloc.lo -MD -MP -MF .deps/alloc.Tpo -c ../../../llvm-gcc.src/libgomp/alloc.c -o alloc.o >/dev/null 2>&1
yes
checking for sys/param.h... make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libgomp] Error 2
make[1]: *** Waiting for unfinished jobs....

llvm-svn: 60527
2008-12-04 04:07:00 +00:00
Scott Michel
1f907dd784 CellSPU:
- First patch from Nehal Desai, a new contributor at Aerospace. Nehal's patch
  fixes sign/zero/any-extending loads for integers and floating point. Example
  code, compiled w/o debugging or optimization where he first noticed the bug:

  int main(void) {
    float a = 99.0;
    printf("%d\n", a);
    return 0;
  }

  Verified that this code actually works on a Cell SPU.

Changes by Scott Michel:
- Fix bug in the value type list constructed by SPUISD::LDRESULT to include
  both the load result's result and chain, not just the chain alone.
- Simplify LowerLOAD and remove extraneous and unnecessary chains.
- Remove unused SPUISD pseudo instructions.

llvm-svn: 60526
2008-12-04 03:02:42 +00:00
Dan Gohman
6ff2c1234b Use register names instead of numbers in debug output.
llvm-svn: 60525
2008-12-04 02:15:26 +00:00
Dan Gohman
93e73ed7f2 Make debug output more informative.
llvm-svn: 60524
2008-12-04 02:14:57 +00:00
Evan Cheng
d4b7459179 Visibility hidden GVs do not require extra load of symbol address from the GOT or non-lazy-ptr.
llvm-svn: 60519
2008-12-04 01:56:50 +00:00
Dan Gohman
f8e215d4b1 Add minimal support for disambiguating memory references. Currently
the main thing this covers is spills to distinct spill slots.

llvm-svn: 60517
2008-12-04 01:35:46 +00:00
Chris Lattner
2677286c25 add a debugging option to help track down j-t problems.
llvm-svn: 60514
2008-12-04 00:07:59 +00:00
Dan Gohman
3836431ec6 Rewrite the liveness bookkeeping code to fix a bunch of
issues with subreg operands and tied operands.

llvm-svn: 60510
2008-12-03 23:07:27 +00:00
Dale Johannesen
0a0e2b1033 Make the debugging dump be a full line.
llvm-svn: 60509
2008-12-03 22:45:31 +00:00
Dale Johannesen
119036d435 Remove an unused field.
llvm-svn: 60508
2008-12-03 22:43:56 +00:00
Dan Gohman
0edbed16c7 Have PseudoSourceValue override Value::dump, so that it works
on PseudoSourceValue values. This also fixes a FIXME in
lib/VMCode/AsmWriter.cpp.

llvm-svn: 60507
2008-12-03 21:37:21 +00:00
Dale Johannesen
a0b1516bdc Fix a misspelled function name.
llvm-svn: 60506
2008-12-03 20:56:12 +00:00
Chris Lattner
420385f8c3 Factor some code into a new FoldSingleEntryPHINodes method.
llvm-svn: 60501
2008-12-03 19:44:02 +00:00
Dan Gohman
19b43e462f Fix an inconsistency in a comment.
llvm-svn: 60500
2008-12-03 19:38:38 +00:00
Evan Cheng
05ded29738 Use mmx (punpckldq VR64, (mmx_v_set0)) to clear high 32-bits of a VR64 register.
llvm-svn: 60499
2008-12-03 19:38:05 +00:00
Dan Gohman
af9b4a8a21 Don't charge the full latency for anti and output dependencies. This is
an area where eventually it would be good to use target-dependent
information.

llvm-svn: 60498
2008-12-03 19:37:34 +00:00
Dale Johannesen
6322cd40c6 A step towards geting linux ppc to work (see PR 3099)
llvm-svn: 60497
2008-12-03 19:33:10 +00:00
Dan Gohman
4f8709518d When looking for anti-dependences on the critical path, don't bother
examining non-anti-dependence edges.

llvm-svn: 60496
2008-12-03 19:32:26 +00:00
Dan Gohman
1020320a05 Add a comment about callee-saved registers.
llvm-svn: 60495
2008-12-03 19:30:13 +00:00
Dale Johannesen
a851280d26 Fix a really wrong comment.
llvm-svn: 60494
2008-12-03 19:25:46 +00:00
Chris Lattner
c77e2f13a3 fix a really incorrect comment.
llvm-svn: 60492
2008-12-03 19:18:54 +00:00
Dan Gohman
74529a2226 Split foldMemoryOperand into public non-virtual and protected virtual
parts, and add target-independent code to add/preserve
MachineMemOperands.

llvm-svn: 60488
2008-12-03 18:43:12 +00:00
Dan Gohman
5dad0993a9 Rename isSimpleLoad to canFoldAsLoad, to better reflect its meaning.
llvm-svn: 60487
2008-12-03 18:15:48 +00:00
Dan Gohman
fc05cdda64 Extend X86's addFrameReference to add a MachineMemOperand for
the frame reference. This will help post-RA scheduling determine
that spills to distinct stack slots are independent.

llvm-svn: 60486
2008-12-03 18:11:40 +00:00
Rafael Espindola
0b01e188e5 Fix some tests. The grep for "il" was matching "file".
llvm-svn: 60485
2008-12-03 17:14:56 +00:00
Dan Gohman
6be47e9542 Update a comment.
llvm-svn: 60484
2008-12-03 17:10:41 +00:00
Duncan Sands
fbc8da66d6 Only check that the result of the mapping was not
a new node if the node was actually remapped.

llvm-svn: 60482
2008-12-03 12:36:16 +00:00
Rafael Espindola
0c800cf35e Fix bug 3140.
Print a single parameter .file directive if we have an ELF target.

llvm-svn: 60480
2008-12-03 11:01:37 +00:00
Richard Osborne
e74ae9dbb7 Add support for ISD::TRAP to the XCore backend
llvm-svn: 60479
2008-12-03 10:59:16 +00:00
Evan Cheng
440e75e1d5 Refactor code. No functionality change.
llvm-svn: 60478
2008-12-03 08:38:43 +00:00
Bill Wendling
d2208d570b CC should only be a ConstantSDNode at this point. Just use 'cast' instead of 'dyn_cast'.
llvm-svn: 60477
2008-12-03 08:32:02 +00:00
Evan Cheng
803ac3b438 Fix test.
llvm-svn: 60476
2008-12-03 08:20:45 +00:00
Chris Lattner
3f3717a4e2 testcase for br undef folding.
llvm-svn: 60471
2008-12-03 07:48:27 +00:00
Chris Lattner
f00b2f3fb4 Teach jump threading some more simple tricks:
1) have it fold "br undef", which does occur with
   surprising frequency as jump threading iterates.
2) teach j-t to delete dead blocks.  This removes the successor
   edges, reducing the in-edges of other blocks, allowing 
   recursive simplification.
3) Fold things like:
     br COND, BBX, BBY
  BBX:
     br COND, BBZ, BBW

   which also happens because jump threading iterates.

llvm-svn: 60470
2008-12-03 07:48:08 +00:00
Chris Lattner
29326a6d1f third time is the charm.
llvm-svn: 60469
2008-12-03 07:45:15 +00:00
Chris Lattner
d03c1b5440 fix assertion.
llvm-svn: 60468
2008-12-03 07:43:05 +00:00
Chris Lattner
683df044b0 don't spew tons of stuff to the output. This testcase is *not* for
loop deletion (it is for a ton of passes), which is very bad.

llvm-svn: 60465
2008-12-03 06:41:50 +00:00
Chris Lattner
7a00825f57 Rename DeleteBlockIfDead to DeleteDeadBlock and make it
unconditionally delete the block.  All likely clients will
do the checking anyway.

llvm-svn: 60464
2008-12-03 06:40:52 +00:00