Brian Gaeke
e7599245cb
Add support for --debug-only=interpreter, to print out instrs before
...
interpreting them.
Move support for getting the value of a ConstantExpr into
getConstantExprValue(), and add support for the rest of the different
kinds of ConstantExprs. (I don't think I like ConstantExprs!)
This requires separate procedures executeShlInst() and executeShrInst().
Reduce the number of references to TheEE.
Get rid of an old comment mentioning annotations.
Fix exitCalled(), which was crashing the Interpreter. This was a
leftover from the return-value code refactoring.
llvm-svn: 10389
2003-12-11 00:22:59 +00:00
John Criswell
ea48d9cd13
This appears to fix Bug 172 and does not break any other feature tests or
...
regression tests.
llvm-svn: 10388
2003-12-10 22:51:41 +00:00
Chris Lattner
6eae2a120e
Fix bug: LICM/sink_multiple_exits.ll
...
Thanks for pointing this out John :)
llvm-svn: 10387
2003-12-10 22:35:56 +00:00
Chris Lattner
9b1a0ca03b
Don't allow dead instructions to stop sinking early.
...
llvm-svn: 10386
2003-12-10 20:43:29 +00:00
Chris Lattner
677f1ebb07
Fix bug: IndVarsSimplify/2003-12-10-RemoveInstrCrash.llx
...
llvm-svn: 10385
2003-12-10 20:43:04 +00:00
Chris Lattner
53951d117a
A new testcase, reduced by bugpoint
...
llvm-svn: 10384
2003-12-10 20:39:53 +00:00
Chris Lattner
0b72993a49
Finegrainify namespacification
...
Fix bug: LowerInvoke/2003-12-10-Crash.llx
llvm-svn: 10382
2003-12-10 20:22:42 +00:00
Chris Lattner
2c5e4a4bc6
new testcase
...
llvm-svn: 10381
2003-12-10 20:18:09 +00:00
John Criswell
5213bd9b3e
Fixed a comma error.
...
Added the --disable-threads option to GCC configure (to avoid pthread errors
when building code with LLVM).
llvm-svn: 10380
2003-12-10 20:04:13 +00:00
Brian Gaeke
818be86378
Support 'make install' for LLVM include files.
...
llvm-svn: 10378
2003-12-10 18:41:20 +00:00
John Criswell
8ddd42c6c1
Upon Chris's suggestion, moved the #ifdef's to the generated C code.
...
This makes LLVM and the generated C code more portable.
llvm-svn: 10377
2003-12-10 18:17:57 +00:00
Chris Lattner
2c641008e6
Finegrainify namespacification
...
Reorder #includes
Implement: IndVarsSimplify/2003-12-10-IndVarDeadCode.ll
llvm-svn: 10376
2003-12-10 18:06:47 +00:00
John Criswell
c299416f67
Fixed the CBE on Solaris/Sparc. We need to define the return value of
...
the write() system call because it returns 64 bits on Solaris 64 bit,
and an implicit return value of int says it returns 32 bits.
Admittedly, this is a bit of a hack.
llvm-svn: 10375
2003-12-10 18:06:34 +00:00
Chris Lattner
93900100d7
New testcase
...
llvm-svn: 10374
2003-12-10 17:57:38 +00:00
Chris Lattner
8c7f69563e
Finegrainify namespacification
...
Fix bug: LoopSimplify/2003-12-10-ExitBlocksProblem.ll
llvm-svn: 10373
2003-12-10 17:20:35 +00:00
Chris Lattner
763f9b1751
New testcase which caused a bunch of tests to break last night with more
...
aggressive LICM
llvm-svn: 10372
2003-12-10 17:09:35 +00:00
Chris Lattner
d6d41b5e23
Simplify code
...
llvm-svn: 10371
2003-12-10 16:58:24 +00:00
Chris Lattner
7eff699231
Avoid performing two identical lookups when one will suffice
...
llvm-svn: 10370
2003-12-10 16:57:24 +00:00
Chris Lattner
94944ee4aa
Make LICM itself a bit more efficient, and make the generated code more efficient too: don't insert a store in every exit block, because a particular block may be exited to more than once by a loop
...
llvm-svn: 10369
2003-12-10 15:56:24 +00:00
John Criswell
895dd78652
Removed the pthread_once() function because it doesn't actually do
...
what it's supposed to do.
Just leave this library as a dummy library for now until we have time to
port a real pthread library (or get glibc working).
llvm-svn: 10368
2003-12-10 15:43:07 +00:00
Chris Lattner
035bd2ae32
Finegrainify namespacification
...
llvm-svn: 10367
2003-12-10 15:34:03 +00:00
Chris Lattner
090dd39b2c
Finegrainify namespacification
...
Provide a context module to WriteAsOperand
llvm-svn: 10366
2003-12-10 15:33:59 +00:00
John Criswell
6ed27ec559
Added the --host= option to the Sparc configuration directions.
...
llvm-svn: 10364
2003-12-10 15:27:29 +00:00
John Criswell
d073529d65
Dummy implementation of the pthread library.
...
This is needed since libstdc++ uses pthread_once().
llvm-svn: 10360
2003-12-10 14:46:36 +00:00
Chris Lattner
effecb429c
Make 'opt -o -' work correctly instead of creating a file named './-'
...
llvm-svn: 10359
2003-12-10 14:41:33 +00:00
Chris Lattner
fe8fd04cce
Implement instruction sinking out of loops. This still can do a little bit
...
better job, but this is the majority of the work. This implements
LICM/sink*.ll
llvm-svn: 10358
2003-12-10 06:41:05 +00:00
Chris Lattner
eea80e29a8
new testcase, checking to ensure we handle yet-another spiffy case correctly
...
llvm-svn: 10357
2003-12-10 05:42:23 +00:00
Brian Gaeke
3921e10089
Don't assume that system headers define 'uint' or 'ulong' as types.
...
llvm-svn: 10356
2003-12-10 05:06:38 +00:00
Brian Gaeke
741b604175
Fix apparent copy-and-paste-o.
...
Get rid of %debug - Mac OS X bison doesn't have it. sigh.
llvm-svn: 10352
2003-12-10 04:33:07 +00:00
Brian Gaeke
3304361220
Add support for installing tool executables.
...
llvm-svn: 10351
2003-12-10 00:26:28 +00:00
Brian Gaeke
3c20ce69e7
Add installation directories and commands, standardly provided by configure.
...
llvm-svn: 10350
2003-12-10 00:25:32 +00:00
Chris Lattner
25bfd01516
Yet another hard testcase
...
llvm-svn: 10349
2003-12-09 23:29:25 +00:00
Chris Lattner
c49a27b2b6
Do not insert one entry PHI nodes in split exit blocks!
...
llvm-svn: 10348
2003-12-09 23:12:55 +00:00
Brian Gaeke
cac0a5fac5
Check in the llvm-native-gcc script, which I use in the process of
...
debugging front-end miscompilations.
llvm-svn: 10347
2003-12-09 22:23:24 +00:00
Chris Lattner
1914a6d0c9
Add a new testcase which breaks the sinker because the loop canonnicalization
...
pass does not do a canonnicalization that the sinker wants.
llvm-svn: 10346
2003-12-09 22:05:08 +00:00
Chris Lattner
3477261b34
Fix buggy test
...
llvm-svn: 10345
2003-12-09 21:45:23 +00:00
Chris Lattner
e7b4ba4051
New testcase for sinking operations from loops with multiple exits
...
llvm-svn: 10344
2003-12-09 21:40:36 +00:00
Chris Lattner
e9a90cba95
Make the test a bit harder so that we test to ensure that _both_ instructions
...
are sunk
llvm-svn: 10343
2003-12-09 20:50:20 +00:00
Chris Lattner
f5f65c4000
Refactor code a little bit, eliminating the gratuitous InstVisitor, which
...
should make subsequent changes simpler. This also allows us to hoist vaarg
and vanext instructions
llvm-svn: 10342
2003-12-09 19:32:44 +00:00
Chris Lattner
2ffca818b6
Fine grainify namespacification
...
Code cleanups
Make LICM::SafeToHoist marginally more efficient
llvm-svn: 10341
2003-12-09 17:18:00 +00:00
Chris Lattner
87b429a338
New testcases for LICM improvement: code sinking.
...
llvm-svn: 10339
2003-12-09 16:56:51 +00:00
Chris Lattner
070d2c2bf7
Improve portability with Mac OS/X
...
llvm-svn: 10338
2003-12-09 16:49:12 +00:00
Chris Lattner
13fa561c2b
Improve testcase portability on OS/X
...
llvm-svn: 10337
2003-12-09 16:48:24 +00:00
Chris Lattner
24436124c2
New testcase that is not actually handled yet, but should be in the future.
...
This is here to remind me to get back to this after a while.
llvm-svn: 10336
2003-12-09 16:26:42 +00:00
John Criswell
90e72c9cba
Added the -h option for compatibility with other linkers.
...
llvm-svn: 10335
2003-12-09 15:39:11 +00:00
Chris Lattner
8a5e4696ba
Whoops, forgot to check this in. :)
...
llvm-svn: 10334
2003-12-08 23:41:09 +00:00
Chris Lattner
a62c29757d
Implement: TailCallElim/accum_recursion_constant_arg.ll
...
Also make sure to clean up any PHI nodes that are inserted which are pointless.
llvm-svn: 10333
2003-12-08 23:37:35 +00:00
Chris Lattner
647b7d8869
Implement: test/Regression/Transforms/TailCallElim/accum_recursion.ll
...
We now insert accumulator variables as necessary to eliminate tail recursion
more aggressively. This is still fairly limited, but allows us to transform
fib/factorial, and other functions into nice happy loops. :)
llvm-svn: 10332
2003-12-08 23:19:26 +00:00
Chris Lattner
08251ca537
New testcase for automatic insertion of accumulator variables to eliminate
...
tail recursion
llvm-svn: 10331
2003-12-08 23:16:25 +00:00
Chris Lattner
06338c93f3
Add a missing semi colon, which breaks bison 1.5
...
llvm-svn: 10325
2003-12-08 20:15:33 +00:00