Commit Graph

1281 Commits

Author SHA1 Message Date
Chris Lattner
54b7741dff Build .bc from .c better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1158 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 20:44:15 +00:00
Chris Lattner
054385a11a 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
2001-11-06 20:23:50 +00:00
Vikram S. Adve
a46fb6bb90 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
2001-11-06 17:09:49 +00:00
Vikram S. Adve
7b10c3694a 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
2001-11-06 17:06:06 +00:00
Ruchira Sasanka
d1565abd68 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
2001-11-06 15:25:38 +00:00
Chris Lattner
54bc6b3166 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
2001-11-06 08:34:56 +00:00
Chris Lattner
e34443db3c Fix bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1152 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 08:34:29 +00:00
Chris Lattner
71344bd650 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
2001-11-06 08:34:17 +00:00
Chris Lattner
eed1fc7973 Give me PHI's space back
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1150 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 08:33:46 +00:00
Vikram S. Adve
04cc49be65 Bug fix: uninitialized variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1147 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 05:11:05 +00:00
Vikram S. Adve
9576b15fcd 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
2001-11-06 05:01:54 +00:00
Chris Lattner
8f410cac04 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
2001-11-06 01:48:45 +00:00
Chris Lattner
c109d30239 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
2001-11-05 21:13:30 +00:00
Chris Lattner
93ee0a165a 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
2001-11-05 19:43:24 +00:00
Chris Lattner
277b4e4a9b 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
2001-11-05 19:43:10 +00:00
Chris Lattner
e4f4d8c3ec Use the expression map correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1140 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 18:30:53 +00:00
Chris Lattner
8448fb5b24 Make the olden benchmarks compile again
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1139 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 18:25:37 +00:00
Vikram S. Adve
c352d2c530 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
2001-11-05 04:04:23 +00:00
Vikram S. Adve
df1c3b8398 Make reg. numbers signed ints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1137 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 03:56:02 +00:00
Vikram S. Adve
0b12f2bb30 Put it back!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1136 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 00:48:27 +00:00
Vikram S. Adve
11f45baa9b 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
2001-11-05 00:48:05 +00:00
Vikram S. Adve
772d091e00 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
2001-11-05 00:35:56 +00:00
Vikram S. Adve
2fc372e0ca 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
2001-11-05 00:23:25 +00:00
Vikram S. Adve
38b8620f4a Replaced another HERE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1132 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-05 00:22:16 +00:00
Vikram S. Adve
4cceffe0a9 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
2001-11-05 00:18:30 +00:00
Chris Lattner
901216d527 New file for expression tree conversion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1128 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 23:24:20 +00:00
Chris Lattner
59cd9f1e9f Refactor code to share stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1127 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 23:24:06 +00:00
Chris Lattner
bacec7bc24 * 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
2001-11-04 22:11:10 +00:00
Vikram S. Adve
510eec7c89 Generate code for Rem instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1124 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 21:59:14 +00:00
Chris Lattner
5cb17410f2 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
2001-11-04 21:32:41 +00:00
Chris Lattner
b980e18066 * 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
2001-11-04 21:32:11 +00:00
Chris Lattner
f3b976e65f 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
2001-11-04 20:21:12 +00:00
Vikram S. Adve
b7f06f46a1 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
2001-11-04 19:34:49 +00:00
Chris Lattner
8e7f409169 Minor method rename
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1119 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-04 08:08:34 +00:00
Chris Lattner
b96939519b 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
2001-11-04 07:42:17 +00:00
Chris Lattner
ab9f21f4c4 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
2001-11-04 07:40:51 +00:00
Ruchira Sasanka
a9e45c8d66 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
2001-11-03 22:01:09 +00:00
Chris Lattner
081431a639 Avoid making a broken transformation!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1115 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 21:30:22 +00:00
Chris Lattner
5b497ee7c2 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
2001-11-03 21:08:59 +00:00
Chris Lattner
3bf04d5b99 Add a helper function to PHI node
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1113 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 21:08:00 +00:00
Ruchira Sasanka
80b1a1a26a Added support for correct spilling of %ccr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1112 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 20:41:22 +00:00
Ruchira Sasanka
3839e6e309 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
2001-11-03 19:59:59 +00:00
Chris Lattner
b20807f23e * 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
2001-11-03 19:51:56 +00:00
Chris Lattner
407c25bd82 Expose method to merge identically named methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1109 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 19:49:54 +00:00
Ruchira Sasanka
51bc0e7994 Arranged stack frame - needs furhter organization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1108 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 17:14:44 +00:00
Ruchira Sasanka
0d3ea0268f 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
2001-11-03 17:14:13 +00:00
Ruchira Sasanka
ef1b0cb9a5 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
2001-11-03 17:13:27 +00:00
Ruchira Sasanka
fca59d7dc9 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
2001-11-03 17:09:59 +00:00
Chris Lattner
0f279b245d 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
2001-11-03 10:15:32 +00:00
Chris Lattner
055c963f58 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
2001-11-03 10:04:22 +00:00