Commit Graph

648 Commits

Author SHA1 Message Date
Chris Lattner
6dad506d81 Squelch warnings about not returning a value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1173 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-07 13:49:12 +00:00
Chris Lattner
461f02fc19 *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
2001-11-07 05:31:27 +00:00
Chris Lattner
5af0c4803b * 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
2001-11-07 04:23:00 +00:00
Chris Lattner
da1fbcc5c3 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
2001-11-07 04:21:57 +00:00
Chris Lattner
6a6791b326 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
2001-11-07 02:57:33 +00:00
Chris Lattner
8679005193 Implement log and drand48 for TSP bm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1165 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 22:53:25 +00:00
Chris Lattner
b6d8fd46a2 Add notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1163 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 22:53:11 +00:00
Chris Lattner
c063d385fa Implement sqrt, implement printf better, simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1161 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 21:52:18 +00:00
Chris Lattner
75747cd9e8 Fix minor bug for shifts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1160 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-06 21:51:48 +00:00
Chris Lattner
268de0464e 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
2001-11-06 21:28:12 +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
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
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
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
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
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
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
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
Chris Lattner
b6b26921e3 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
2001-11-03 09:19:00 +00:00
Chris Lattner
2c236f3e20 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
2001-11-03 05:18:24 +00:00
Chris Lattner
ebef5e5ba2 Remove debugging info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1093 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 03:31:39 +00:00
Chris Lattner
e244a25014 Fix major bugs in type resolution
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1092 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 03:27:53 +00:00
Chris Lattner
2d3e8bba62 Add extra code for debugging linker problems
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1091 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-03 03:27:29 +00:00
Chris Lattner
3b1e3f45c0 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
2001-11-02 07:51:31 +00:00