Jeff Cohen
6d82d5b23e
Fixed the following LSR bugs:
...
* Loop invariant code does not dominate the loop header, but rather
the end of the loop preheader.
* The base for a reduced GEP isn't a constant unless all of its
operands (preceding the induction variable) are constant.
* Allow induction variable elimination for the simple case after all.
Also made changes recommended by Chris for properly deleting
instructions.
llvm-svn: 20383
2005-03-01 03:46:11 +00:00
Alkis Evlogimenos
422af394b6
Lower llvm.isunordered(a, b) into a != a | b != b.
...
llvm-svn: 20382
2005-03-01 02:07:58 +00:00
Chris Lattner
9d57998cda
Remove tabs from file.
...
llvm-svn: 20380
2005-02-28 19:36:15 +00:00
Chris Lattner
b2720f5b57
Add support to the C backend for llvm.prefetch. Patch contributed by
...
Justin Wick!
llvm-svn: 20378
2005-02-28 19:29:46 +00:00
Chris Lattner
82480f68d7
recognize llvm.prefetch. Patch contributed by Justin Wick!
...
llvm-svn: 20377
2005-02-28 19:28:00 +00:00
Chris Lattner
c4205a6b93
Verify llvm.prefetch.
...
llvm-svn: 20376
2005-02-28 19:27:42 +00:00
Chris Lattner
9ccfcab3db
Lower prefetch to a noop, patch contributed by Justin Wick!
...
llvm-svn: 20375
2005-02-28 19:27:23 +00:00
Andrew Lenharth
7dc9ea9509
fix integer division and stuff
...
llvm-svn: 20372
2005-02-28 17:22:18 +00:00
Jeff Cohen
d5b1827c3f
Fix crash in LSR due to attempt to remove original induction variable. However,
...
for reasons explained in the comments, I also deactivated this code as it needs
more thought.
llvm-svn: 20367
2005-02-28 00:08:56 +00:00
Jeff Cohen
fd9504c7d9
PHI nodes were incorrectly placed when more than one GEP is reduced in a loop.
...
llvm-svn: 20360
2005-02-27 21:08:04 +00:00
Jeff Cohen
6258d4a431
First pass at improved Loop Strength Reduction. Still not yet ready for prime time.
...
llvm-svn: 20358
2005-02-27 19:37:07 +00:00
Chris Lattner
b632a13aa7
Use const iterators where possible. Patch by Evan Jones!
...
llvm-svn: 20354
2005-02-27 19:06:10 +00:00
Chris Lattner
73d4556bb6
Teach globalopt how memset/cpy/move affect memory, to allow better optimization.
...
llvm-svn: 20352
2005-02-27 18:58:52 +00:00
Chris Lattner
a024984017
Fix spelling, patch contributed by Gabor Greif!
...
llvm-svn: 20343
2005-02-27 06:18:25 +00:00
Chris Lattner
cf3862ce8d
Fix spelling, patch contributed by Gabor Greif
...
llvm-svn: 20342
2005-02-27 06:15:51 +00:00
Chris Lattner
a17076b771
Remove some stuff I checked in accidentally
...
llvm-svn: 20340
2005-02-27 04:32:35 +00:00
Chris Lattner
2311dcd08d
DCE a dead function
...
llvm-svn: 20339
2005-02-26 23:36:45 +00:00
Reid Spencer
24b41ba78d
Implement an isBytecodeArchive method to determine if an archive contains
...
bytecode file members or not.
Patch Contributed By Adam Treat
llvm-svn: 20338
2005-02-26 22:00:32 +00:00
Chris Lattner
cf3cda8125
1 + 100 + 51 == 152, not 52.
...
If we fold three constants together (c1+c2+c3), make sure to keep
LHSC updated, instead of reusing (in this case), the 1 instead of the
partial sum.
llvm-svn: 20337
2005-02-26 18:50:19 +00:00
Chris Lattner
14f720d625
remove extraneous cast
...
llvm-svn: 20334
2005-02-26 18:33:28 +00:00
Andrew Lenharth
b5331ffe0f
make BB labels be exported for debuging, add fp negation optimization, further pecimise the FP instructions
...
llvm-svn: 20332
2005-02-25 22:55:15 +00:00
Chris Lattner
9340ba4bf9
Handle null a bit more carefully.
...
Actually teach dsa about select instructions. This doesn't affect the
graph in any way other than not setting a spurious U marker on pointer
nodes that are selected.
llvm-svn: 20324
2005-02-25 01:27:48 +00:00
Chris Lattner
16f321bbe7
This instruction:
...
X = gep null, ...
Used to not create a scalar map entry for X, which caused clients to barf.
This is bad.
llvm-svn: 20316
2005-02-24 19:55:31 +00:00
Chris Lattner
085b39c9e0
Fix a bug introduced by revision 1.187 of this file.
...
llvm-svn: 20308
2005-02-24 18:48:07 +00:00
Andrew Lenharth
ef5f87784b
fix Allocas. Really. I mean it this time.
...
llvm-svn: 20306
2005-02-24 18:36:32 +00:00
Chris Lattner
af54bd6050
Fix some problems where the verifier would crash on invalid input instead of
...
reporting the problem and exiting.
llvm-svn: 20302
2005-02-24 16:58:29 +00:00
Chris Lattner
7a434679c3
Implement Transforms/SimplifyCFG/switch_thread.ll
...
This does a simple form of "jump threading", which eliminates CFG edges that
are provably dead. This triggers 90 times in the external tests, and
eliminating CFG edges is always always a good thing! :)
llvm-svn: 20300
2005-02-24 06:17:52 +00:00
Chris Lattner
902d9dc660
switch instructions only allow constantints for their values, be more specific.
...
llvm-svn: 20298
2005-02-24 05:32:09 +00:00
Chris Lattner
608a8c9f55
use more specific cast.
...
llvm-svn: 20297
2005-02-24 05:26:04 +00:00
Chris Lattner
ce949bdbfc
add more checking
...
llvm-svn: 20296
2005-02-24 05:25:17 +00:00
Chris Lattner
f0863ee08c
Do not read free'd memory when printing an error message.
...
llvm-svn: 20295
2005-02-24 04:59:49 +00:00
Chris Lattner
8044aa8d33
add a new method.
...
llvm-svn: 20293
2005-02-24 02:37:26 +00:00
Tanya Lattner
b640bb0d88
Only print out machine instructions before modulo scheduling if we are actually doing modulo scheduling! :)
...
llvm-svn: 20292
2005-02-24 02:14:44 +00:00
Andrew Lenharth
69a8320c0d
Ah the problems you have to fix when you stray from the One True Way (TM)
...
llvm-svn: 20290
2005-02-23 17:33:42 +00:00
Chris Lattner
bfb6a94126
make this more efficient. Scan up to 16 nodes, not the whole list.
...
llvm-svn: 20289
2005-02-23 16:53:04 +00:00
Chris Lattner
a91c25c69b
new method
...
llvm-svn: 20288
2005-02-23 16:51:11 +00:00
Chris Lattner
0ce5361846
Reduce the amount of searching this assertion does. On a testcase of mine,
...
this reduces the time for -simplifycfg in a debug build from 106s to 14.82s
llvm-svn: 20286
2005-02-23 07:09:08 +00:00
Chris Lattner
9838ab1271
Silence some uninit variable warnings.
...
llvm-svn: 20284
2005-02-23 05:57:21 +00:00
Tanya Lattner
a981a711aa
Fixed bug in findAllcircuits. Fixed branch addition to schedule. Added debug information.
...
llvm-svn: 20280
2005-02-23 02:01:42 +00:00
Andrew Lenharth
889efe4fb3
oops
...
llvm-svn: 20278
2005-02-22 23:29:25 +00:00
Chris Lattner
1969249f13
Remove use of bind_obj, deleter, and finegrainify namespacification.
...
llvm-svn: 20277
2005-02-22 23:27:21 +00:00
Chris Lattner
b5256c157d
Remove use of bind_obj
...
llvm-svn: 20276
2005-02-22 23:22:58 +00:00
Chris Lattner
d888514f0c
C++ is not a functional programming language.
...
llvm-svn: 20274
2005-02-22 23:13:58 +00:00
Andrew Lenharth
d870103306
dynamic stack allocas
...
llvm-svn: 20273
2005-02-22 21:59:48 +00:00
Chris Lattner
4ba91f5168
Fix a bug in the 'store fpimm, ptr' -> 'store intimm, ptr' handling code.
...
Changing 'op' here caused us to not enter the store into a map, causing
reemission of the code!! In practice, a simple loop like this:
no_exit: ; preds = %no_exit, %entry
%indvar = phi uint [ %indvar.next, %no_exit ], [ 0, %entry ] ; <uint> [#uses=3]
%tmp.4 = getelementptr "complex long double"* %P, uint %indvar, uint 0 ; <double*> [#uses=1]
store double 0.000000e+00, double* %tmp.4
%indvar.next = add uint %indvar, 1 ; <uint> [#uses=2]
%exitcond = seteq uint %indvar.next, %N ; <bool> [#uses=1]
br bool %exitcond, label %return, label %no_exit
was being code gen'd to:
.LBBtest_1: # no_exit
movl %edx, %esi
shll $4, %esi
movl $0, 4(%eax,%esi)
movl $0, (%eax,%esi)
incl %edx
movl $0, (%eax,%esi)
movl $0, 4(%eax,%esi)
cmpl %ecx, %edx
jne .LBBtest_1 # no_exit
Note that we are doing 4 32-bit stores instead of 2. Now we generate:
.LBBtest_1: # no_exit
movl %edx, %esi
incl %esi
shll $4, %edx
movl $0, (%eax,%edx)
movl $0, 4(%eax,%edx)
cmpl %ecx, %esi
movl %esi, %edx
jne .LBBtest_1 # no_exit
This is much happier, though it would be even better if the increment of ESI
was scheduled after the compare :-/
llvm-svn: 20265
2005-02-22 07:23:39 +00:00
Andrew Lenharth
8ead0f13d3
no longer build as a shared library
...
llvm-svn: 20264
2005-02-22 04:58:26 +00:00
Chris Lattner
68c342b28f
Fix problems running the HowToUseJIT on powerpc, and probably problems with
...
ANY program that does not have all functions internalized.
llvm-svn: 20258
2005-02-20 18:43:35 +00:00
Jeff Cohen
91e04e17a7
Fix silly mistake.
...
llvm-svn: 20256
2005-02-20 02:48:51 +00:00
Jeff Cohen
96558e2f93
Implement standard I/O redirection in ExecuteAndWait().
...
llvm-svn: 20255
2005-02-20 02:43:04 +00:00
Chris Lattner
15759af51d
Add support for ".so" files compiled with LLVM which contain LLVM bytecode.
...
llvm-svn: 20253
2005-02-19 18:30:29 +00:00