Chris Lattner
4bded629ca
Correct problem that allows indirect function calls
...
llvm-svn: 1179
2001-11-07 20:12:30 +00:00
Chris Lattner
caf89d678c
* Switch to operation on pointers with PointerTy more consistently
...
* Fix misspeling
* Catch SIGFPE for traps
* info XXX now prints the raw contents of the GenericValue
* Switch to calloc instead of malloc (temporarily I hope) to bandaid Olden benchmarks
* Implement binary And & Or
* Convert expressions like this:
PointerTy SrcPtr = getOperandValue(I->getPtrOperand(), SF).PointerVal;
to:
GenericValue SRC = getOperandValue(I->getPtrOperand(), SF);
PointerTy SrcPtr = SRC.PointerVal;
because the prior way confuses purify.
* Taint the initial values of the value planes
* Handling 'print bb4' in the interpreter without crashing
* Print nicer stack frames with concise return type
* printf doesn't suck nearly as badly as it used to
llvm-svn: 1177
2001-11-07 19:46:27 +00:00
Chris Lattner
15f524c88e
Killing warnings
...
llvm-svn: 1175
2001-11-07 14:01:59 +00:00
Chris Lattner
e33afc1d46
Add #includes to enable buiding in Release mode
...
llvm-svn: 1174
2001-11-07 13:49:45 +00:00
Chris Lattner
bf8d5bd2f7
Squelch warnings about not returning a value
...
llvm-svn: 1173
2001-11-07 13:49:12 +00:00
Chris Lattner
7627d5b279
*Print Stack traces better.
...
* Use the cache writer for all it's problems.
* print arguments to methods in stack traces.
*Print the current stack from for up/down commands.
llvm-svn: 1170
2001-11-07 05:31:27 +00:00
Chris Lattner
b9ca754b0d
* Use cached writer to speed up printing and get symbolic types more consistently
...
* When a segfault or bus error occurs, stop the program, print a stack trace, and dump the user in the debugger mode
llvm-svn: 1169
2001-11-07 04:23:00 +00:00
Chris Lattner
3aeffe685c
Implement CachedWriter class to allow module level printing of various components very quickly
...
llvm-svn: 1168
2001-11-07 04:21:57 +00:00
Chris Lattner
7f56e171e5
Add %p format to printf, which MUST be used when printing pointer values.
...
llvm-svn: 1166
2001-11-07 02:57:33 +00:00
Chris Lattner
06d10f646d
Implement log and drand48 for TSP bm
...
llvm-svn: 1165
2001-11-06 22:53:25 +00:00
Chris Lattner
d1cd54e437
Add notes
...
llvm-svn: 1163
2001-11-06 22:53:11 +00:00
Chris Lattner
d907c7c9eb
Implement sqrt, implement printf better, simpler.
...
llvm-svn: 1161
2001-11-06 21:52:18 +00:00
Chris Lattner
a688655cba
Fix minor bug for shifts
...
llvm-svn: 1160
2001-11-06 21:51:48 +00:00
Chris Lattner
69d20ed13e
Print out the abridged form of the call instruction.
...
llvm-svn: 1159
2001-11-06 21:28:12 +00:00
Ruchira Sasanka
0b842b90ef
Fixed bug - added code in pushUnconstrainedIGNodes() to check whether a node
...
is already pushed to stack by a previous call to the same method.
llvm-svn: 1154
2001-11-06 15:25:38 +00:00
Chris Lattner
fcf608c1a7
Fix bugs
...
llvm-svn: 1152
2001-11-06 08:34:29 +00:00
Chris Lattner
da8737d88a
Fix many bugs. Implement PHI transforms & other cycles
...
llvm-svn: 1151
2001-11-06 08:34:17 +00:00
Chris Lattner
a797d17ed7
Give me PHI's space back
...
llvm-svn: 1150
2001-11-06 08:33:46 +00:00
Vikram S. Adve
f83b90af5c
Bug fix: uninitialized variable.
...
llvm-svn: 1147
2001-11-06 05:11:05 +00:00
Vikram S. Adve
d3f33a7d2f
Bug fix: Printing AdIBef and AdIAft outside the scope where they
...
were declared, and in some cases when they were unintialized.
llvm-svn: 1146
2001-11-06 05:01:54 +00:00
Chris Lattner
c75cb61a5d
Print PHI nodes with zero operands even if they are illegal
...
llvm-svn: 1145
2001-11-06 01:48:45 +00:00
Chris Lattner
688f944802
Fix bug with ADD nodes and malloc promotion
...
llvm-svn: 1144
2001-11-05 21:13:30 +00:00
Chris Lattner
d376cb5113
Don't print spurious linking warnings about methods that are never used.
...
Cleanup ExprTypeConvert a bit.
llvm-svn: 1141
2001-11-05 19:43:10 +00:00
Chris Lattner
a346367992
Use the expression map correctly.
...
llvm-svn: 1140
2001-11-05 18:30:53 +00:00
Vikram S. Adve
c3993d28ca
Modified graph construction to use one pass to find all defs.
...
Avoids having to handle some special cases that cause complex interactions
with instr. selection.
llvm-svn: 1138
2001-11-05 04:04:23 +00:00
Vikram S. Adve
24fbd417a0
Make reg. numbers signed ints.
...
llvm-svn: 1137
2001-11-05 03:56:02 +00:00
Chris Lattner
68180b2837
New file for expression tree conversion
...
llvm-svn: 1128
2001-11-04 23:24:20 +00:00
Chris Lattner
5d261d7928
Refactor code to share stuff
...
llvm-svn: 1127
2001-11-04 23:24:06 +00:00
Chris Lattner
f358050083
* Relax restriction that prevented malloc promotion in certain cases
...
llvm-svn: 1125
2001-11-04 22:11:10 +00:00
Vikram S. Adve
843f32ad9b
Generate code for Rem instruction.
...
llvm-svn: 1124
2001-11-04 21:59:14 +00:00
Chris Lattner
9010727e28
Fix obscure nasty bug with bytecode writing that could cause the last byte to be dropped.
...
llvm-svn: 1123
2001-11-04 21:32:41 +00:00
Chris Lattner
84715d0d46
* Disable debug output
...
* fix minor bug with taking datasize of unsized array type
* Insert code to support speculative changes later
llvm-svn: 1122
2001-11-04 21:32:11 +00:00
Chris Lattner
50508dde95
Convert backward conversion of expression trees into a new more powerful bidirectional approach. Add transforms for more instructions.
...
llvm-svn: 1121
2001-11-04 20:21:12 +00:00
Vikram S. Adve
cb87df31db
Fixed instruction information for RDCCR and WRCCR.
...
Fixed selection to create a TmpInstruction for each integer CC register
(since it is an implicit side-effect, unlike FP CC registers which are
explicit operands).
llvm-svn: 1120
2001-11-04 19:34:49 +00:00
Chris Lattner
ea63d43a07
Minor method rename
...
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Chris Lattner
1b0ded767a
Add transformations for Load and GetElementPtr. Fix broken transform with shr.
...
llvm-svn: 1118
2001-11-04 07:42:17 +00:00
Chris Lattner
42cf9aaa3a
Fix cast instructions that end up in bad places in GCC output
...
llvm-svn: 1117
2001-11-04 07:40:51 +00:00
Ruchira Sasanka
b5a9b22fa7
Added an assertion since it seems like AdjList returns an errornous size in method
...
IGNode::pushOnStack().
llvm-svn: 1116
2001-11-03 22:01:09 +00:00
Chris Lattner
82c7401f23
Avoid making a broken transformation!
...
llvm-svn: 1115
2001-11-03 21:30:22 +00:00
Chris Lattner
2b011e7b50
Add new cleanup pass:
...
// 1. PHI nodes with multiple entries for the same predecessor. GCC sometimes
// generates code that looks like this:
//
// bb7: br bool %cond1004, label %bb8, label %bb8
// bb8: %reg119 = phi uint [ 0, %bb7 ], [ 1, %bb7 ]
//
// which is completely illegal LLVM code. To compensate for this, we insert
// an extra basic block, and convert the code to look like this:
//
// bb7: br bool %cond1004, label %bbX, label %bb8
// bbX: br label bb8
// bb8: %reg119 = phi uint [ 0, %bbX ], [ 1, %bb7 ]
//
llvm-svn: 1114
2001-11-03 21:08:59 +00:00
Ruchira Sasanka
77cc18917c
Added support for correct spilling of %ccr
...
llvm-svn: 1112
2001-11-03 20:41:22 +00:00
Ruchira Sasanka
20c3c4be28
Added code to support correct saving of %ccr across calls
...
llvm-svn: 1111
2001-11-03 19:59:59 +00:00
Chris Lattner
bcdf581aec
* Export method to merge identically named methods
...
* Add code to fix PHI nodes that are missing arguments. These PHI nodes can
be generated by GCC if there is an uninitialized variable flowing into a merge
point. For example:
int foo(int y) {
int X;
if (y) X = 1;
return X;
}
llvm-svn: 1110
2001-11-03 19:51:56 +00:00
Ruchira Sasanka
116fbe7fc7
Arranged stack frame - needs furhter organization
...
llvm-svn: 1108
2001-11-03 17:14:44 +00:00
Ruchira Sasanka
7673c5f6e0
Arranged stack frame - needs furhter organization
...
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp
llvm-svn: 1106
2001-11-03 17:13:27 +00:00
Ruchira Sasanka
ee84dc6f89
Commented out code so that copies are inserted for all phi args
...
CahedCopyMap was disabled to insert phi elimination code for all phi args
llvm-svn: 1105
2001-11-03 17:09:59 +00:00
Chris Lattner
38732a00f5
Be lenient on types so that programs that are not very typesafe will work
...
llvm-svn: 1104
2001-11-03 10:15:32 +00:00
Chris Lattner
30050d95ae
Changes to compile the TSP benchmark successfully. Favor warning instead of assertion failures.
...
llvm-svn: 1103
2001-11-03 10:04:22 +00:00
Chris Lattner
fb0626b9ed
Add code to link method together with the same name if one is vararg and the other isn't.
...
This resolves definitions like this:
%list * "foo"(...)
%list * "foo"(int)
together which can often occur because C programmers don't put prototypes in like they should. GRR
llvm-svn: 1102
2001-11-03 09:19:00 +00:00
Chris Lattner
b778b5bd90
Don't forget to link type names together too. Fix for Olden/mst benchmark
...
llvm-svn: 1094
2001-11-03 05:18:24 +00:00