Devang Patel
578a1ae12a
Do not eliminate loop when it is invalid to do so. For example,
...
for(int i = 0; i < N; i++) {
if ( i == XYZ) {
A;
else
B;
}
C;
D;
}
llvm-svn: 42058
2007-09-17 21:01:05 +00:00
Devang Patel
14b9a01c02
Skeleton for transformations to truncate loop's iteration space.
...
llvm-svn: 42054
2007-09-17 20:39:48 +00:00
Gordon Henriksen
fa3a5915b1
Fix for PR1633: Verifier doesn't fully verify GC intrinsics
...
LLVM now enforces the following prototypes for the write barriers:
<ty>* @llvm.gcread(<ty2>*, <ty>**)
void @llvm.gcwrite(<ty>*, <ty2>*, <ty>**)
And for @llvm.gcroot, the first stack slot is verified to be an alloca or a
bitcast of an alloca.
Fixes test/CodeGen/Generic/GC/lower_gcroot.ll, which violated these.
llvm-svn: 42051
2007-09-17 20:30:04 +00:00
Dale Johannesen
46adce144c
Remove RSTRegClass case from loadRegFromStackSlot
...
and storeRegToStackSlot. Evan and I concluded this
should never be needed and it appears to be true.
(It if is needed, adjustment would be needed for
long double to work.)
llvm-svn: 42049
2007-09-17 20:15:38 +00:00
Devang Patel
f4411aa165
Fix comment.
...
llvm-svn: 42048
2007-09-17 20:07:40 +00:00
Devang Patel
c7cfb7ebfc
This is not ideal but unbreaks build failure.
...
APInt::dump() is inside #ifndef NDEBUG, however SelectionDAG dump() routines are not.
llvm-svn: 42047
2007-09-17 20:03:03 +00:00
Dale Johannesen
9ce8a9d633
Implement x86 long double in jit (not really
...
complete, but common cases work)
llvm-svn: 42043
2007-09-17 18:44:13 +00:00
Chris Lattner
cc315726f7
Merge DenseMapKeyInfo & DenseMapValueInfo into DenseMapInfo
...
Add a new DenseMapInfo::isEqual method to allow clients to redefine
the equality predicate used when probing the hash table.
llvm-svn: 42042
2007-09-17 18:34:04 +00:00
Evan Cheng
d7742e7939
X86ISD::TEST is dead.
...
llvm-svn: 42037
2007-09-17 17:42:53 +00:00
Dan Gohman
2de5779a99
Instcombine x-((x/y)*y) into a remainder operator.
...
llvm-svn: 42035
2007-09-17 17:31:57 +00:00
Dan Gohman
b096221b3e
Add 64-bit jmp instructions to the list of instructions that
...
can terminate a block with no fall-through.
llvm-svn: 42029
2007-09-17 15:19:08 +00:00
Dan Gohman
41a6dea029
Use xorl instead of xorq to enter a zero into a 64-bit register.
...
llvm-svn: 42027
2007-09-17 14:55:08 +00:00
Dan Gohman
1aeaeec570
Emit integer x<1 as x<=0, as comparisons with zero (now includeing
...
64-bit) can use test instead of cmp with an immediate.
llvm-svn: 42026
2007-09-17 14:49:27 +00:00
Dan Gohman
b9449c9118
Use "test reg,reg" in place of "cmp reg,0" for 64-bit operands. This was
...
previously only done for 32-bit and smaller operands.
llvm-svn: 42024
2007-09-17 14:35:24 +00:00
Duncan Sands
901cb2662d
Factor the trampoline transformation into a subroutine.
...
llvm-svn: 42021
2007-09-17 10:26:40 +00:00
Dale Johannesen
0ea2cc2e51
Implement x86 long double (uses host long double,
...
so only works on x86 target).
llvm-svn: 42019
2007-09-17 00:38:27 +00:00
Daniel Berlin
d44b2016ca
Fix bug in andersen's related to test_and_set.
...
Add operator == and != to SparseBitVector.
Simplify code for test_and_set
llvm-svn: 42018
2007-09-16 23:59:53 +00:00
Daniel Berlin
3625ac77e4
Rewrite of andersen's to be about 100x faster, cleaner, and begin to support field sensitivity
...
llvm-svn: 42016
2007-09-16 21:45:02 +00:00
Bill Wendling
f1335f46d4
Follow-up to patch r41999. Make the conditional that emits the personality stub
...
match the conditional that turns on exception handling emittion in the asm
printer.
llvm-svn: 42008
2007-09-16 19:21:08 +00:00
Dale Johannesen
78628a9108
Adjust per revew comments.
...
llvm-svn: 42002
2007-09-16 16:51:49 +00:00
Bill Wendling
7932341cef
Only emit the personality function as a global value if the backend actually
...
supports it. This solves this error on the Darwin x86-64 platform:
$ cat testcase.ii
struct A {
A();
};
A *bork() {
return new A;
}
$ llvm-g++ -arch x86_64 -c testcase.ii
/var/tmp//cc3U8fd8.s:52:unknown section type: non_lazy_symbol_pointers
/var/tmp//cc3U8fd8.s:52:Rest of line ignored. 1st junk character valued 76 (L).
/var/tmp//cc3U8fd8.s:53:Unknown pseudo-op: .indirect_symbol
/var/tmp//cc3U8fd8.s:53:Rest of line ignored. 1st junk character valued 95 (_).
llvm-svn: 41999
2007-09-16 10:36:17 +00:00
Owen Anderson
fd6ec5cf82
Be more careful when constant-folding PHI nodes.
...
llvm-svn: 41998
2007-09-16 08:04:16 +00:00
Chris Lattner
1b622ad721
Fix PR1666, SPASS with the CBE and 254.gap with the CBE.
...
GCC optimizes away things like ptr < NULL to false. To "fix" this,
have the CBE emit casts of pointers to intptr_t when doing relational
pointer comparisons.
llvm-svn: 41983
2007-09-15 06:51:03 +00:00
Dan Gohman
df419c2b4f
Add patterns for SHLD64* and SHRD64*.
...
llvm-svn: 41975
2007-09-14 23:17:45 +00:00
Chris Lattner
bb109aed3d
fix a gcc warning: comparison between signed and unsigned integer expressions
...
llvm-svn: 41972
2007-09-14 22:57:00 +00:00
Owen Anderson
fe5adad9c4
Remove RLE. It is subsumed by GVN.
...
llvm-svn: 41968
2007-09-14 22:33:52 +00:00
Dale Johannesen
575bd6070a
Remove the assumption that FP's are either float or
...
double from some of the many places in the optimizers
it appears, and do something reasonable with x86
long double.
Make APInt::dump() public, remove newline, use it to
dump ConstantSDNode's.
Allow APFloats in FoldingSet.
Expand X86 backend handling of long doubles (conversions
to/from int, mostly).
llvm-svn: 41967
2007-09-14 22:26:36 +00:00
Evan Cheng
13797e4a74
Add implicit def of EFLAGS on those instructions that may modify flags.
...
llvm-svn: 41962
2007-09-14 21:48:26 +00:00
Dan Gohman
1c9bf0bfb9
And an FoldingSetImpl::NodeID::AddInteger overload for int64_t, to avoid
...
ambiguity.
llvm-svn: 41960
2007-09-14 20:48:42 +00:00
Dan Gohman
fb60c0dfed
Remove isReg, isImm, and isMBB, and change all their users to use
...
isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.
llvm-svn: 41958
2007-09-14 20:33:02 +00:00
Dan Gohman
5f29ab68e1
Change "tmp." to "tmp" for temporaries created by ScalarEvolutionExpander
...
for consistency with many other transforms.
llvm-svn: 41957
2007-09-14 20:11:40 +00:00
Dan Gohman
53119779c2
Remove spurious consts. This fixes warnings with compilers that
...
are strict about such things.
llvm-svn: 41956
2007-09-14 20:08:19 +00:00
Rafael Espindola
5d8b225881
Add support for functions with byval arguments on x86
...
llvm-svn: 41953
2007-09-14 15:48:13 +00:00
Chris Lattner
601d09bf08
Fix a logic error in ValueIsOnlyUsedLocallyOrStoredToOneGlobal that caused
...
miscompilation of 188.ammp. Reject select and bitcast in
ValueIsOnlyUsedLocallyOrStoredToOneGlobal because RewriteHeapSROALoadUser can't handle it.
llvm-svn: 41950
2007-09-14 03:41:21 +00:00
Chris Lattner
9c3cd36dd0
silence a bogus gcc warning.
...
llvm-svn: 41949
2007-09-14 03:07:24 +00:00
Evan Cheng
3aafca793b
Fix comments.
...
llvm-svn: 41947
2007-09-14 01:57:02 +00:00
Bill Wendling
843ac5aebe
Temporary reverting r41817
...
(http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070910/053370.html ). It's
causing SPASS to fail.
llvm-svn: 41938
2007-09-14 01:13:55 +00:00
Chris Lattner
f3448236f8
Teach GlobalLoadUsesSimpleEnoughForHeapSRA and the SROA rewriter how to handle
...
a limited form of PHI nodes. This finally fixes PR1639, speeding 179.art up
from 7.84s to 3.13s on PPC.
llvm-svn: 41933
2007-09-13 21:31:36 +00:00
Chris Lattner
c5d83b7270
be tolerant of PHI nodes when rewriting heap SROA code. This is a step
...
along the way of PR1639
llvm-svn: 41930
2007-09-13 18:00:31 +00:00
Chris Lattner
c9f2f2dd92
refactor some code, no functionality change. On the path to PR1639
...
llvm-svn: 41929
2007-09-13 17:29:05 +00:00
Chris Lattner
31d34baa89
Make ValueIsOnlyUsedLocallyOrStoredToOneGlobal smart enough to see through
...
bitcasts and phis. This is a step to fixing PR1639.
llvm-svn: 41928
2007-09-13 16:37:20 +00:00
Chris Lattner
b83dee72ee
Make AllUsesOfLoadedValueWillTrapIfNull strong enough to see through PHI
...
nodes. This is the first step of the fix for PR1639.
llvm-svn: 41927
2007-09-13 16:30:19 +00:00
Chris Lattner
f672250ee0
Fix build problems on Cygwin (PR1652), patch by Patrick Walton.
...
llvm-svn: 41923
2007-09-13 06:09:48 +00:00
Evan Cheng
7adc0f3eff
Bug fixes.
...
llvm-svn: 41900
2007-09-13 00:06:00 +00:00
Evan Cheng
d9d3176de3
Remove dead code.
...
llvm-svn: 41899
2007-09-12 23:45:46 +00:00
Evan Cheng
e88f30877d
Yet another getTargetNode variant.
...
llvm-svn: 41898
2007-09-12 23:39:49 +00:00
Evan Cheng
bd4b11cfa9
Initial support for multi-result patterns:
...
1.
[(set GR32:$dst, (add GR32:$src1, GR32:$src2)),
(modify EFLAGS)]
This indicates the source pattern expects the instruction would produce 2 values. The first is the result of the addition. The second is an implicit definition in register EFLAGS.
2.
def : Pat<(parallel (addc GR32:$src1, GR32:$src2), (modify EFLAGS)), ()>
Similar to #1 except this is used for def : Pat patterns.
llvm-svn: 41897
2007-09-12 23:30:14 +00:00
Evan Cheng
0d738fff6d
Fixed a typo that's causing a missing kill marker.
...
llvm-svn: 41893
2007-09-12 23:02:04 +00:00
Chris Lattner
d58e0026ec
Change llvm.gcroot to not init the root to null at runtime, this prevents
...
using it for live-in values etc.
llvm-svn: 41879
2007-09-12 17:53:10 +00:00
Dale Johannesen
967ee09f04
Generated files for previous patch.
...
llvm-svn: 41876
2007-09-12 03:31:28 +00:00