OSDN Git Service
Evan Cheng [Fri, 5 Dec 2008 19:26:37 +0000 (19:26 +0000)]
This test also requires -mattr=+sse41.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60601
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 18:46:19 +0000 (18:46 +0000)]
Make it illegal to call getDependency* on non-memory instructions
like binary operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60600
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 17:41:31 +0000 (17:41 +0000)]
Reason #3 from 60595 doesn't hold true. If we can fold a PIC load from constpool into a use, the rewrite happens at time of spill (not in VirtRegMap). Later on, if the GlobalBaseReg is spilled, the spiller can see the use uses GlobalBaseReg and do the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60596
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 17:23:48 +0000 (17:23 +0000)]
Effectively undo 60461 in PIC mode which simply transform V_SET0 / V_SETALLONES into a load from constpool in order to fold into restores. This is not safe to do when PIC base is being used for a number of reasons:
1. GlobalBaseReg may have been spilled.
2. It may not be live at the use.
3. Spiller doesn't know this is happening so it won't prevent GlobalBaseReg from being spilled later (That by itself is a nasty hack. It's needed because we don't insert the reload until later).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60595
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 17:04:12 +0000 (17:04 +0000)]
Fix test/Transforms/GVN/pre-load.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60594
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 17:00:16 +0000 (17:00 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60592
91177308-0d34-0410-b5e6-
96231b3b80d8
Cedric Venet [Fri, 5 Dec 2008 13:37:30 +0000 (13:37 +0000)]
The use of the construct:
for(Type1 B = ...;;) { Type2 B ; ... }
is bad: code is hard to read and VS VS don't like it (it ignore the second declaration of B).
This patch fix the problem in tablegen. Please don't write code like this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60590
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 07:49:08 +0000 (07:49 +0000)]
Make IsValueFullyAvailableInBlock safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60588
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 5 Dec 2008 07:11:05 +0000 (07:11 +0000)]
add a new pop_back_val method which returns the value popped. This is
heretical from a STL standpoint, but is oh-so-useful for things that
can't throw exceptions when copied, like, well, everything in LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60587
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 05:45:42 +0000 (05:45 +0000)]
Drop the reg argument to isRegReDefinedByTwoAddr, which was redundant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60586
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 05:35:21 +0000 (05:35 +0000)]
Update comments. There is no getArgumentAccesses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60585
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 05:31:14 +0000 (05:31 +0000)]
Teach StackSlotColoring to update MachineMemOperands when
changing the stack slots on an instruction, to keep them
consistent with the actual memory addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60584
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 5 Dec 2008 05:30:02 +0000 (05:30 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60583
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 5 Dec 2008 01:06:39 +0000 (01:06 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60571
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Fri, 5 Dec 2008 00:01:00 +0000 (00:01 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60566
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 4 Dec 2008 22:51:11 +0000 (22:51 +0000)]
Have raw_fd_ostream keep track of the position in the file to make tell() go faster by not requiring a flush().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60560
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 4 Dec 2008 21:40:31 +0000 (21:40 +0000)]
Enable LoopIndexSplit pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60555
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 4 Dec 2008 21:38:42 +0000 (21:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60554
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 4 Dec 2008 21:20:30 +0000 (21:20 +0000)]
Factor out some common code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60553
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Thu, 4 Dec 2008 21:01:44 +0000 (21:01 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60552
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 4 Dec 2008 18:08:40 +0000 (18:08 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60543
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Thu, 4 Dec 2008 17:16:59 +0000 (17:16 +0000)]
Missing closing brace and reverse conditional condition on NDEBUG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60541
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 4 Dec 2008 06:31:07 +0000 (06:31 +0000)]
Start simplifying a switch that has a successor that is a switch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60534
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 4 Dec 2008 06:14:27 +0000 (06:14 +0000)]
This code is apparently quite confused. In the meantime,
get it building when NDEBUG is set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60532
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 4 Dec 2008 04:07:00 +0000 (04:07 +0000)]
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....
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60527
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Thu, 4 Dec 2008 03:02:42 +0000 (03:02 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60526
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Dec 2008 02:15:26 +0000 (02:15 +0000)]
Use register names instead of numbers in debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60525
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Dec 2008 02:14:57 +0000 (02:14 +0000)]
Make debug output more informative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60524
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 4 Dec 2008 01:56:50 +0000 (01:56 +0000)]
Visibility hidden GVs do not require extra load of symbol address from the GOT or non-lazy-ptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60519
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 4 Dec 2008 01:35:46 +0000 (01:35 +0000)]
Add minimal support for disambiguating memory references. Currently
the main thing this covers is spills to distinct spill slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60517
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 4 Dec 2008 00:07:59 +0000 (00:07 +0000)]
add a debugging option to help track down j-t problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60514
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 23:07:27 +0000 (23:07 +0000)]
Rewrite the liveness bookkeeping code to fix a bunch of
issues with subreg operands and tied operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60510
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 3 Dec 2008 22:45:31 +0000 (22:45 +0000)]
Make the debugging dump be a full line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60509
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 3 Dec 2008 22:43:56 +0000 (22:43 +0000)]
Remove an unused field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60508
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 21:37:21 +0000 (21:37 +0000)]
Have PseudoSourceValue override Value::dump, so that it works
on PseudoSourceValue values. This also fixes a FIXME in
lib/VMCode/AsmWriter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60507
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 3 Dec 2008 20:56:12 +0000 (20:56 +0000)]
Fix a misspelled function name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60506
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 19:44:02 +0000 (19:44 +0000)]
Factor some code into a new FoldSingleEntryPHINodes method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60501
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 19:38:38 +0000 (19:38 +0000)]
Fix an inconsistency in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60500
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Dec 2008 19:38:05 +0000 (19:38 +0000)]
Use mmx (punpckldq VR64, (mmx_v_set0)) to clear high 32-bits of a VR64 register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60499
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 19:37:34 +0000 (19:37 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60498
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 3 Dec 2008 19:33:10 +0000 (19:33 +0000)]
A step towards geting linux ppc to work (see PR 3099)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60497
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 19:32:26 +0000 (19:32 +0000)]
When looking for anti-dependences on the critical path, don't bother
examining non-anti-dependence edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60496
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 19:30:13 +0000 (19:30 +0000)]
Add a comment about callee-saved registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60495
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 3 Dec 2008 19:25:46 +0000 (19:25 +0000)]
Fix a really wrong comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 19:18:54 +0000 (19:18 +0000)]
fix a really incorrect comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60492
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 18:43:12 +0000 (18:43 +0000)]
Split foldMemoryOperand into public non-virtual and protected virtual
parts, and add target-independent code to add/preserve
MachineMemOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60488
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 18:15:48 +0000 (18:15 +0000)]
Rename isSimpleLoad to canFoldAsLoad, to better reflect its meaning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60487
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 18:11:40 +0000 (18:11 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60486
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Dec 2008 17:14:56 +0000 (17:14 +0000)]
Fix some tests. The grep for "il" was matching "file".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60485
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 17:10:41 +0000 (17:10 +0000)]
Update a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60484
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 3 Dec 2008 12:36:16 +0000 (12:36 +0000)]
Only check that the result of the mapping was not
a new node if the node was actually remapped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60482
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 3 Dec 2008 11:01:37 +0000 (11:01 +0000)]
Fix bug 3140.
Print a single parameter .file directive if we have an ELF target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60480
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 3 Dec 2008 10:59:16 +0000 (10:59 +0000)]
Add support for ISD::TRAP to the XCore backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60479
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Dec 2008 08:38:43 +0000 (08:38 +0000)]
Refactor code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60478
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 3 Dec 2008 08:32:02 +0000 (08:32 +0000)]
CC should only be a ConstantSDNode at this point. Just use 'cast' instead of 'dyn_cast'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60477
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 3 Dec 2008 08:20:45 +0000 (08:20 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60476
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 07:48:27 +0000 (07:48 +0000)]
testcase for br undef folding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60471
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 07:48:08 +0000 (07:48 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60470
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 07:45:15 +0000 (07:45 +0000)]
third time is the charm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60469
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 07:43:05 +0000 (07:43 +0000)]
fix assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60468
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 06:41:50 +0000 (06:41 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60465
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 06:40:52 +0000 (06:40 +0000)]
Rename DeleteBlockIfDead to DeleteDeadBlock and make it
unconditionally delete the block. All likely clients will
do the checking anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60464
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 3 Dec 2008 06:37:44 +0000 (06:37 +0000)]
Factor some code out of SimplifyCFG, forming a new
DeleteBlockIfDead method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60463
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 05:21:24 +0000 (05:21 +0000)]
Mark x86's V_SET0 and V_SETALLONES with isSimpleLoad, and teach X86's
foldMemoryOperand how to "fold" them, by converting them into constant-pool
loads. When they aren't folded, they use xorps/cmpeqd, but for example when
register pressure is high, they may now be folded as memory operands, which
reduces register pressure.
Also, mark V_SET0 isAsCheapAsAMove so that two-address-elimination will
remat it instead of copying zeros around (V_SETALLONES was already marked).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60461
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 3 Dec 2008 02:43:12 +0000 (02:43 +0000)]
Change label to 'carry' for unsigned adds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60460
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 02:30:17 +0000 (02:30 +0000)]
Add a sanity-check to tablegen to catch the case where isSimpleLoad
is set but mayLoad is not set. Fix all the problems this turned up.
Change code to not use isSimpleLoad instead of mayLoad unless it
really wants isSimpleLoad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60459
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 02:10:00 +0000 (02:10 +0000)]
Fix a missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60458
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 01:55:47 +0000 (01:55 +0000)]
Add an explicit keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60457
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 01:53:18 +0000 (01:53 +0000)]
Replace a #include with a forward-declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60456
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 01:39:44 +0000 (01:39 +0000)]
Fix this comment to reflect that it applies to types other
than just i32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60455
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 01:28:04 +0000 (01:28 +0000)]
Fix byval arguments in the fastcc calling convention. The fastcc convention
delegates to the regular x86-32 convention which handles byval, but only
after it handles a few cases, and it's necessary to handle byval before
handling those cases. This fixes PR3122 (and rdar://
6400815), llvm-gcc
miscompiling LLVM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60453
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 3 Dec 2008 01:10:18 +0000 (01:10 +0000)]
Add nounwind attributes to this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60451
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Wed, 3 Dec 2008 00:52:41 +0000 (00:52 +0000)]
testcases for recent dag combiner changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60449
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Dec 2008 23:33:29 +0000 (23:33 +0000)]
Fix isIntN to work with APInts > 64 bits. This method is only
used by clang apparently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60446
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Dec 2008 21:57:09 +0000 (21:57 +0000)]
Remove a (what appears to be) overly strict assertion. Here is what happened:
1. ppcf128 select is expanded to f64 select's.
2. f64 select operand 0 is an i1 truncate, it's promoted to i32 zero_extend.
3. f64 select is updated. It's changed back to a "NewNode" and being re-analyzed.
4. f64 select operands are being processed. Operand 0 is a "NewNode". It's being expunged out of ReplacedValues map.
5. ExpungeNode tries to remap f64 select and notice it's a "NewNode" and assert.
Duncan, please take a look. Thanks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60443
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 2 Dec 2008 21:17:11 +0000 (21:17 +0000)]
Minor rewrite per review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60442
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Tue, 2 Dec 2008 19:55:08 +0000 (19:55 +0000)]
Non-functional change: make custom lowering for truncate stylistically
consistent with the way it's generally done in other places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60439
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Tue, 2 Dec 2008 19:53:53 +0000 (19:53 +0000)]
CellSPU:
- Incorporate Tilmann Scheller's ISD::TRUNCATE custom lowering patch
- Update SPU calling convention info, even if it's not used yet (but can be
at some point or another)
- Ensure that any-extended f32 loads are custom lowered, especially when
they're promoted for use in printf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60438
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 2 Dec 2008 19:27:20 +0000 (19:27 +0000)]
Fix a typo in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60434
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 2 Dec 2008 18:53:47 +0000 (18:53 +0000)]
Add support for folding spills into preceding defs when doing pre-alloc splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60433
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 2 Dec 2008 18:40:40 +0000 (18:40 +0000)]
One more transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60432
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 2 Dec 2008 18:40:09 +0000 (18:40 +0000)]
Make the code do what the comment says it does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60431
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Dec 2008 18:33:11 +0000 (18:33 +0000)]
Comment typeo fix, thanks Duncan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60429
91177308-0d34-0410-b5e6-
96231b3b80d8
Tilmann Scheller [Tue, 2 Dec 2008 12:12:25 +0000 (12:12 +0000)]
make it possible to custom lower TRUNCATE (needed for the CellSPU target)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Dec 2008 08:16:11 +0000 (08:16 +0000)]
Implement PRE of loads in the GVN pass with a pretty cheap and
straight-forward implementation. This does not require any extra
alias analysis queries beyond what we already do for non-local loads.
Some programs really really like load PRE. For example, SPASS triggers
this ~1000 times, ~300 times in 255.vortex, and ~1500 times on 403.gcc.
The biggest limitation to the implementation is that it does not split
critical edges. This is a huge killer on many programs and should be
addressed after the initial patch is enabled by default.
The implementation of this should incidentally speed up rejection of
non-local loads because it avoids creating the repl densemap in cases
when it won't be used for fully redundant loads.
This is currently disabled by default.
Before I turn this on, I need to fix a couple of miscompilations in
the testsuite, look at compile time performance numbers, and look at
perf impact. This is pretty close to ready though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60408
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 2 Dec 2008 08:05:48 +0000 (08:05 +0000)]
Add a new SCEV representing signed division.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60407
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Tue, 2 Dec 2008 07:35:08 +0000 (07:35 +0000)]
Removed some unnecessary code in widening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Dec 2008 07:16:45 +0000 (07:16 +0000)]
add a little helper function that does PHI translation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60405
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Dec 2008 06:32:34 +0000 (06:32 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60404
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 2 Dec 2008 06:24:20 +0000 (06:24 +0000)]
Remove some errors that crept in. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60403
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 2 Dec 2008 06:22:04 +0000 (06:22 +0000)]
Merge two if-statements into one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60402
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 2 Dec 2008 06:18:11 +0000 (06:18 +0000)]
More styalistic changes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60401
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Dec 2008 06:08:04 +0000 (06:08 +0000)]
add densemap range insertion method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60400
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 2 Dec 2008 05:12:47 +0000 (05:12 +0000)]
- Remove the buggy -X/C -> X/-C transform. This isn't valid when X isn't a
constant. If X is a constant, then this is folded elsewhere.
- Added a note to Target/README.txt to indicate that we'd like to implement
this when we're able.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60399
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 2 Dec 2008 05:09:00 +0000 (05:09 +0000)]
Improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60398
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 2 Dec 2008 05:06:43 +0000 (05:06 +0000)]
- Reduce nesting.
- No need to do a swap on a canonicalized pattern.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60397
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 2 Dec 2008 04:52:26 +0000 (04:52 +0000)]
some random comment improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60395
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 2 Dec 2008 04:25:42 +0000 (04:25 +0000)]
Add a test for my previous PRE fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60394
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 2 Dec 2008 04:09:22 +0000 (04:09 +0000)]
Fix an issue that Chris noticed, where local PRE was not properly instantiating
a new value numbering set after splitting a critical edge. This increases
the number of instances of PRE on 403.gcc from ~60 to ~570.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60393
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 2 Dec 2008 02:15:36 +0000 (02:15 +0000)]
Fix PR3124: overly strict assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60392
91177308-0d34-0410-b5e6-
96231b3b80d8