Chris Lattner [Wed, 7 Nov 2001 19:46:27 +0000 (19:46 +0000)]
* 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1177
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 14:50:58 +0000 (14:50 +0000)]
1. -Winline emits spurious warnings that aren't useful right now
2. Fix the "rebuild everything if I change one file" problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1176
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 14:01:59 +0000 (14:01 +0000)]
Killing warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1175
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 13:49:45 +0000 (13:49 +0000)]
Add #includes to enable buiding in Release mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1174
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 13:49:12 +0000 (13:49 +0000)]
Squelch warnings about not returning a value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1173
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Wed, 7 Nov 2001 12:29:40 +0000 (12:29 +0000)]
Roll back all these changes that have broken Makefile.target again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1172
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 05:31:53 +0000 (05:31 +0000)]
Okay, so this is a huge hack. Fixme later
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1171
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 05:31:27 +0000 (05:31 +0000)]
*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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1170
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 04:23:00 +0000 (04:23 +0000)]
* 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1169
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 04:21:57 +0000 (04:21 +0000)]
Implement CachedWriter class to allow module level printing of various components very quickly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1168
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 04:20:50 +0000 (04:20 +0000)]
New class to provide high performance writing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1167
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 7 Nov 2001 02:57:33 +0000 (02:57 +0000)]
Add %p format to printf, which MUST be used when printing pointer values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1166
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 22:53:25 +0000 (22:53 +0000)]
Implement log and drand48 for TSP bm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1165
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 22:53:17 +0000 (22:53 +0000)]
Minor fixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1164
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 22:53:11 +0000 (22:53 +0000)]
Add notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1163
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 21:52:18 +0000 (21:52 +0000)]
Implement sqrt, implement printf better, simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1161
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 21:51:48 +0000 (21:51 +0000)]
Fix minor bug for shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1160
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 21:28:12 +0000 (21:28 +0000)]
Print out the abridged form of the call instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1159
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 20:44:15 +0000 (20:44 +0000)]
Build .bc from .c better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1158
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 20:23:50 +0000 (20:23 +0000)]
Don't forget to make the clean version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1157
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Tue, 6 Nov 2001 17:09:49 +0000 (17:09 +0000)]
Really fix Makefile to compile individual tests and Olden codes.
by using a better naming scheme.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1156
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Tue, 6 Nov 2001 17:06:06 +0000 (17:06 +0000)]
Moved *.c files into subdirectory TestSources to avoid overwriting
corresponding *.ll files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1155
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Tue, 6 Nov 2001 15:25:38 +0000 (15:25 +0000)]
Fixed bug - added code in pushUnconstrainedIGNodes() to check whether a node
is already pushed to stack by a previous call to the same method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1154
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 08:34:56 +0000 (08:34 +0000)]
Reorder paramters to make the command line more easily modifiable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1153
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 08:34:29 +0000 (08:34 +0000)]
Fix bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1152
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 08:34:17 +0000 (08:34 +0000)]
Fix many bugs. Implement PHI transforms & other cycles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1151
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 08:33:46 +0000 (08:33 +0000)]
Give me PHI's space back
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1150
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Tue, 6 Nov 2001 05:11:05 +0000 (05:11 +0000)]
Bug fix: uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1147
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Tue, 6 Nov 2001 05:01:54 +0000 (05:01 +0000)]
Bug fix: Printing AdIBef and AdIAft outside the scope where they
were declared, and in some cases when they were unintialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1146
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 6 Nov 2001 01:48:45 +0000 (01:48 +0000)]
Print PHI nodes with zero operands even if they are illegal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1145
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Nov 2001 21:13:30 +0000 (21:13 +0000)]
Fix bug with ADD nodes and malloc promotion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1144
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Nov 2001 19:43:24 +0000 (19:43 +0000)]
Fix makefile to compile olden and main benchmarks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1142
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Nov 2001 19:43:10 +0000 (19:43 +0000)]
Don't print spurious linking warnings about methods that are never used.
Cleanup ExprTypeConvert a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1141
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Nov 2001 18:30:53 +0000 (18:30 +0000)]
Use the expression map correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1140
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 5 Nov 2001 18:25:37 +0000 (18:25 +0000)]
Make the olden benchmarks compile again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1139
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 04:04:23 +0000 (04:04 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1138
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 03:56:02 +0000 (03:56 +0000)]
Make reg. numbers signed ints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1137
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 00:48:27 +0000 (00:48 +0000)]
Put it back!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1136
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 00:48:05 +0000 (00:48 +0000)]
Removed by mistake; will add it back immediately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1135
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 00:35:56 +0000 (00:35 +0000)]
Make gcc generate assembly files (%.ll) until Chris has a stable
version of his gccas. Plus another dumb bug fix (the bug, not the fix).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1134
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 00:23:25 +0000 (00:23 +0000)]
Delete rule to disassemble %.bc -- need to make it effective only when
%.ll is not a pre-existing file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1133
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 00:22:16 +0000 (00:22 +0000)]
Replaced another HERE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1132
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Mon, 5 Nov 2001 00:18:30 +0000 (00:18 +0000)]
Put common rules for compiling programs into Makefile.target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 23:24:20 +0000 (23:24 +0000)]
New file for expression tree conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1128
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 23:24:06 +0000 (23:24 +0000)]
Refactor code to share stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1127
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 22:11:10 +0000 (22:11 +0000)]
* Relax restriction that prevented malloc promotion in certain cases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1125
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Sun, 4 Nov 2001 21:59:14 +0000 (21:59 +0000)]
Generate code for Rem instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 21:32:41 +0000 (21:32 +0000)]
Fix obscure nasty bug with bytecode writing that could cause the last byte to be dropped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1123
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 21:32:11 +0000 (21:32 +0000)]
* Disable debug output
* fix minor bug with taking datasize of unsized array type
* Insert code to support speculative changes later
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1122
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 20:21:12 +0000 (20:21 +0000)]
Convert backward conversion of expression trees into a new more powerful bidirectional approach. Add transforms for more instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1121
91177308-0d34-0410-b5e6-
96231b3b80d8
Vikram S. Adve [Sun, 4 Nov 2001 19:34:49 +0000 (19:34 +0000)]
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1120
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 08:08:34 +0000 (08:08 +0000)]
Minor method rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1119
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 07:42:17 +0000 (07:42 +0000)]
Add transformations for Load and GetElementPtr. Fix broken transform with shr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1118
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 4 Nov 2001 07:40:51 +0000 (07:40 +0000)]
Fix cast instructions that end up in bad places in GCC output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1117
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Sat, 3 Nov 2001 22:01:09 +0000 (22:01 +0000)]
Added an assertion since it seems like AdjList returns an errornous size in method
IGNode::pushOnStack().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1116
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 21:30:22 +0000 (21:30 +0000)]
Avoid making a broken transformation!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1115
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 21:08:59 +0000 (21:08 +0000)]
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 ]
//
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1114
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 21:08:00 +0000 (21:08 +0000)]
Add a helper function to PHI node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1113
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Sat, 3 Nov 2001 20:41:22 +0000 (20:41 +0000)]
Added support for correct spilling of %ccr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1112
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Sat, 3 Nov 2001 19:59:59 +0000 (19:59 +0000)]
Added code to support correct saving of %ccr across calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1111
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 19:51:56 +0000 (19:51 +0000)]
* 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;
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1110
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 19:49:54 +0000 (19:49 +0000)]
Expose method to merge identically named methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1109
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Sat, 3 Nov 2001 17:14:44 +0000 (17:14 +0000)]
Arranged stack frame - needs furhter organization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1108
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Sat, 3 Nov 2001 17:14:13 +0000 (17:14 +0000)]
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp and made machine independent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1107
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Sat, 3 Nov 2001 17:13:27 +0000 (17:13 +0000)]
Arranged stack frame - needs furhter organization
Moved InsertCallerSaveInstr to the SparcRegInfo.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1106
91177308-0d34-0410-b5e6-
96231b3b80d8
Ruchira Sasanka [Sat, 3 Nov 2001 17:09:59 +0000 (17:09 +0000)]
Commented out code so that copies are inserted for all phi args
CahedCopyMap was disabled to insert phi elimination code for all phi args
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1105
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 10:15:32 +0000 (10:15 +0000)]
Be lenient on types so that programs that are not very typesafe will work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1104
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 10:04:22 +0000 (10:04 +0000)]
Changes to compile the TSP benchmark successfully. Favor warning instead of assertion failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1103
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 09:19:00 +0000 (09:19 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1102
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 05:18:24 +0000 (05:18 +0000)]
Don't forget to link type names together too. Fix for Olden/mst benchmark
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 03:31:39 +0000 (03:31 +0000)]
Remove debugging info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1093
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 03:27:53 +0000 (03:27 +0000)]
Fix major bugs in type resolution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 03:27:29 +0000 (03:27 +0000)]
Add extra code for debugging linker problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1091
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 3 Nov 2001 03:26:47 +0000 (03:26 +0000)]
Fix the linker. This bug was not fun to track down. grr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1090
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Nov 2001 07:51:31 +0000 (07:51 +0000)]
Dramatically simplify recursive type processing. Fixed a few bugs, a few still remain :(
Why does this stuff have to come up NOW?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1089
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 2 Nov 2001 07:46:26 +0000 (07:46 +0000)]
Improve some debugging code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1088
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 22:06:08 +0000 (22:06 +0000)]
Support floating point numbers in expodential form so that small numbers don't get truncated, which broke the health benchmark
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1087
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 22:06:00 +0000 (22:06 +0000)]
Print floating point numbers in expodential form so that small numbers don't get truncated, which broke the health benchmark
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1086
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 17:05:27 +0000 (17:05 +0000)]
* Add comments for peepholes
* Implement new peephole:
// Peephole optimize the following instructions:
// %t1 = cast {<...>} * %StructPtr to <ty> *
//
// Into: %t2 = getelementptr {<...>} * %StructPtr, <0, 0, 0, ...>
// %t1 = cast <eltype> * %t1 to <ty> *
This peephole eliminated 9 evil casts in the health benchmark, and
completely turned the addList method around. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1085
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 07:00:51 +0000 (07:00 +0000)]
Add DCE as integral part of the level raising to avoid processing instructions that are dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1084
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 07:00:27 +0000 (07:00 +0000)]
Expose the low level DCE mechanism to external users
Refactor code to support it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1083
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 07:00:21 +0000 (07:00 +0000)]
Expose the low level DCE mechanism to external users
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1082
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 05:58:42 +0000 (05:58 +0000)]
Implement new simpler constructors for if you don't have a index list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 05:57:59 +0000 (05:57 +0000)]
* Implement expression type conversion for constant values
* Fix a problem setting a name on a constant value that died because no symbol table was passed in
* Add some comments describing the passes
* Implement a new peephole:
// Peephole optimize the following instructions:
// %t = cast <T1>* %P to <T2> * ;; If T1 is losslessly convertable to T2
// store <T2> %V, <T2>* %t
//
// Into:
// %t = cast <T2> %V to <T1>
// store <T1> %t2, <T1>* %P
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1080
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 05:55:29 +0000 (05:55 +0000)]
Simplify DCE code a lot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1079
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 05:55:13 +0000 (05:55 +0000)]
Implement constant propogation of null pointer values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1078
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 05:54:28 +0000 (05:54 +0000)]
Add simpler to use ctors. Add getType() overload to specialize getelementptr's type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1077
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 05:53:56 +0000 (05:53 +0000)]
Add new isNullValue method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1076
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 03:12:34 +0000 (03:12 +0000)]
* Convert getelementptr/store pairs into a single store
* Convert getelementptr/load pairs into a single load
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1075
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 02:42:08 +0000 (02:42 +0000)]
Initial checkin of level raising code, after move and cleanup and expands from the opt directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1074
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 02:41:52 +0000 (02:41 +0000)]
Initial checkin of level raising code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1073
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 02:41:09 +0000 (02:41 +0000)]
Move the Raise xform from opt to transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1072
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 02:40:36 +0000 (02:40 +0000)]
Propogate name to the malloc itself instead of to the cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 02:39:49 +0000 (02:39 +0000)]
Move level change xfor into the transforms directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1070
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 1 Nov 2001 02:39:36 +0000 (02:39 +0000)]
Add some useful accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1069
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 31 Oct 2001 06:36:48 +0000 (06:36 +0000)]
crunch the output of GCC a bit to make it nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1068
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 31 Oct 2001 06:36:34 +0000 (06:36 +0000)]
Start testing the new cleangcc pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1067
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 31 Oct 2001 06:36:23 +0000 (06:36 +0000)]
Use the correct prototype for malloc and free
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 31 Oct 2001 06:35:59 +0000 (06:35 +0000)]
Implement code to convert %malloc and %free FUNCTION CALLS into the instruction equivalent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1065
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 31 Oct 2001 05:07:57 +0000 (05:07 +0000)]
Implemented constant propogation of cast instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1064
91177308-0d34-0410-b5e6-
96231b3b80d8