Commit Graph

1466 Commits

Author SHA1 Message Date
Ruchira Sasanka bbbc6a3b17 Made isPhi const
llvm-svn: 1251
2001-11-10 20:58:58 +00:00
Vikram S. Adve b4489fb853 Use cc instead of gcc to compile *.native
llvm-svn: 1250
2001-11-10 14:23:54 +00:00
Chris Lattner 49ec72411e Initail checking of structure swapper
llvm-svn: 1248
2001-11-10 07:28:25 +00:00
Chris Lattner b98ec7f369 Testcase for structure field reordering
llvm-svn: 1247
2001-11-10 07:26:59 +00:00
Chris Lattner 5dada09565 Initial checkin of structure mutator
llvm-svn: 1246
2001-11-10 07:26:31 +00:00
Chris Lattner b0de5f1cf2 Initial checkin of Structure mutator
llvm-svn: 1245
2001-11-10 07:26:22 +00:00
Chris Lattner fc92c5fa1a Add hooks to call the new swap structcontents pass
llvm-svn: 1243
2001-11-10 07:16:10 +00:00
Chris Lattner dcad3cc848 add Yet Another Instance of a Static Library
llvm-svn: 1242
2001-11-10 07:15:53 +00:00
Chris Lattner 636539d48e Provide const version of function with the name the other will be eventually renamed to
llvm-svn: 1241
2001-11-10 06:48:14 +00:00
Chris Lattner 9b474fdf2b Refactor some functionality to expose more useful stuff
llvm-svn: 1240
2001-11-10 06:47:45 +00:00
Vikram S. Adve 295600c417 Several bug fixes in printing constants, particularly with unsized
arrays and multi-dimensional arrays.

llvm-svn: 1239
2001-11-10 02:03:06 +00:00
Vikram S. Adve 209d8e1c3b Must generate an instruction for GetElementPtr if single user is not
a memory instruction!

llvm-svn: 1238
2001-11-10 01:05:26 +00:00
Ruchira Sasanka 1812fc499d Disabled some debuggin messages
llvm-svn: 1237
2001-11-10 00:26:55 +00:00
Ruchira Sasanka 31305c0d57 Coalesing bug fix - now checks for the same regType instead of the same
regClass since FP class has two reg Types.

llvm-svn: 1236
2001-11-10 00:20:24 +00:00
Ruchira Sasanka d499a26116 No major change
llvm-svn: 1235
2001-11-09 23:49:42 +00:00
Ruchira Sasanka d0d294afde Added code for correct reordering of call arguments
llvm-svn: 1234
2001-11-09 23:49:14 +00:00
Chris Lattner 8657606b6e Add hooks for the FindUsedTypes pass
llvm-svn: 1233
2001-11-09 05:27:34 +00:00
Chris Lattner 7082e110f7 New pass to find types in use by a program
llvm-svn: 1232
2001-11-09 05:27:21 +00:00
Chris Lattner c0239b78ec New pass to figure out what types are in use by a program
llvm-svn: 1231
2001-11-09 05:27:10 +00:00
Vikram S. Adve 21cbb36e3d Added function LL__main.
llvm-svn: 1230
2001-11-09 02:21:38 +00:00
Vikram S. Adve 1c96dfd7af Added class MachineCacheInfo.
llvm-svn: 1229
2001-11-09 02:20:18 +00:00
Vikram S. Adve 2ccb900add Add support to print constant arrays and structures.
Align data larger than an L1 cache line on L1 cache line boundary.

llvm-svn: 1228
2001-11-09 02:19:29 +00:00
Vikram S. Adve bc23cf5521 Do the same for float->int that we did for int->float earlier.
Also check IsPointerType() in addition to IsIntegral() in several places.

llvm-svn: 1227
2001-11-09 02:18:16 +00:00
Vikram S. Adve e6642f93d4 Added function UltraSparcInstrInfo::CreateCodeToCopyFloatToInt.
llvm-svn: 1226
2001-11-09 02:16:40 +00:00
Vikram S. Adve f34fa6956d Added class UltraSparcCacheInfo.
llvm-svn: 1225
2001-11-09 02:16:04 +00:00
Vikram S. Adve 367f34f7cc Bug fix: Need to include the stack offset "bias" in assembly code itself.
Added class UltraSparcCacheInfo.
Added function to convert float to int by copying via memory.

llvm-svn: 1224
2001-11-09 02:15:52 +00:00
Vikram S. Adve 313a36f2d3 Use node->getOpCode() instead of node->getMachineInstr()->getOpCode().
Much nicer.

llvm-svn: 1223
2001-11-09 02:14:20 +00:00
Vikram S. Adve e76d3bcb31 Cache parameters for target machine.
llvm-svn: 1222
2001-11-09 02:11:25 +00:00
Vikram S. Adve 7977a283e6 Added class MachineCacheInfo.
Also added function to convert float to int by copying via memory.

llvm-svn: 1221
2001-11-09 02:11:03 +00:00
Chris Lattner 0043cc1109 Remove false optimization that basically broke everything
llvm-svn: 1219
2001-11-09 01:08:10 +00:00
Chris Lattner 54e9f453c9 * Add better caching of data to avoid silly recusions
* Only check to see if uses of instructions can be converted for expressions... so we don't look at all of the uses of a constant.  This was making the code unnecessarily conservative

llvm-svn: 1218
2001-11-08 22:06:31 +00:00
Chris Lattner 2b48b9694c Add method decl
llvm-svn: 1217
2001-11-08 20:55:05 +00:00
Chris Lattner 2a4e3cfab7 Remove unneeded forward decl
llvm-svn: 1216
2001-11-08 20:54:51 +00:00
Chris Lattner 583e95e0b2 Improve raising significantly
llvm-svn: 1214
2001-11-08 20:19:56 +00:00
Chris Lattner cf66422978 Print the method that makes an instruction invalid
llvm-svn: 1213
2001-11-08 19:29:51 +00:00
Ruchira Sasanka dc709780aa corrected insertCode4Spilled ... bug.
llvm-svn: 1212
2001-11-08 19:11:30 +00:00
Vikram S. Adve b92658976a Eliminate cleaning step for individual %.bc files created by our gcc.
llvm-svn: 1211
2001-11-08 18:42:08 +00:00
Vikram S. Adve 7048762a3e Took out .clean.bc target.
llvm-svn: 1210
2001-11-08 18:25:05 +00:00
Vikram S. Adve 17bfd13a39 Run cleaning pass only when linking multiple files.
llvm-svn: 1209
2001-11-08 18:14:20 +00:00
Vikram S. Adve 04a251d785 Add cleaning pass after linking.
llvm-svn: 1208
2001-11-08 18:13:17 +00:00
Ruchira Sasanka 19a5165c29 Uncommented LR spill code insertion
llvm-svn: 1207
2001-11-08 16:43:25 +00:00
Vikram S. Adve 7543782956 Keep *.s files while we're debugging the native code.
Also, fix rule for $(LLCLIBS).

llvm-svn: 1206
2001-11-08 14:31:05 +00:00
Vikram S. Adve 56e61ec517 Bug fix: need to use .reserve for uninitialized data.
llvm-svn: 1205
2001-11-08 14:29:57 +00:00
Vikram S. Adve 7a3c4070d6 Add rule for %.clean.bc.
llvm-svn: 1204
2001-11-08 05:28:08 +00:00
Vikram S. Adve 3b193679f0 Bug fix: cannot modify Phi operands while iterating over them!
llvm-svn: 1203
2001-11-08 05:25:33 +00:00
Vikram S. Adve e4e91e3835 Add handle to object MachineFrameInfo.
llvm-svn: 1202
2001-11-08 05:23:45 +00:00
Vikram S. Adve e6ecf513a1 Include handle to TargetMachine in each Machine...Info class.
llvm-svn: 1201
2001-11-08 05:22:43 +00:00
Vikram S. Adve 06d8c600ea Add method CreateCodeToCopyIntToFloat.
Include handle to TargetMachine in each Machine...Info object.

llvm-svn: 1200
2001-11-08 05:22:15 +00:00
Vikram S. Adve 621b90440b Major change to how defs are found when adding dependences (they
are now found as part of the initial walk of the machine code).
Also memory load/store instructions can be generated for non-memory
LLVM instructions, which wasn't handled before.  It is now.

llvm-svn: 1199
2001-11-08 05:20:23 +00:00
Vikram S. Adve 80310bba37 MachineCodeForMethod is now an annotation on class Method.
llvm-svn: 1198
2001-11-08 05:18:18 +00:00
Vikram S. Adve c2f8911114 Add handle to TargetMachine object in all Machine...Info classes.
llvm-svn: 1197
2001-11-08 05:15:08 +00:00
Vikram S. Adve 81908213ae Added support for bitwise logical operators. Use different labels for
for these than for boolean logicals to avoid making Burg diverge.
See Burg manual for more information.

llvm-svn: 1196
2001-11-08 05:14:02 +00:00
Vikram S. Adve 03f12f521f Fixed function getEscapedString to follow the Sparc assembly rules
for symbol names!  (And renamed it to getValidSymbolName).
Fixed format for float and other constants.

llvm-svn: 1195
2001-11-08 05:12:37 +00:00
Vikram S. Adve f889a11590 Fix bugs in FITOS/D instruction generation.
The space for optional args in the stack frame is now being computed,
so finish the code generation for the variable `alloca'.
Finally, made a major overhaul of how stack frame is managed.

llvm-svn: 1194
2001-11-08 05:04:09 +00:00
Vikram S. Adve 503d3098fa Added new function UltraSparcInstrInfo::CreateCodeToCopyIntToFloat.
Also major overhaul of how stack frame is managed.

llvm-svn: 1193
2001-11-08 04:57:53 +00:00
Vikram S. Adve 7a1524f971 Removed class RegStackOffsets and used class MachineCodeForMethod
directly to manage stack frame.

llvm-svn: 1192
2001-11-08 04:56:41 +00:00
Vikram S. Adve 6fcb28924b Use MachineFrameInfo as base class of UltraSparcFrameInfo, and made
a major overhaul of this class and how stack frames are managed.

llvm-svn: 1191
2001-11-08 04:55:13 +00:00
Vikram S. Adve 1ef453c2ff Machine-independent interface to target's stack frame layout parameters.
llvm-svn: 1190
2001-11-08 04:52:27 +00:00
Vikram S. Adve e316915197 Use different op labels for bitwise logical operations and boolean logical
operations in BURG input trees.

llvm-svn: 1189
2001-11-08 04:51:39 +00:00
Vikram S. Adve 70dd1d4ee4 Added a second constructor for and improved class TmpInstruction.
llvm-svn: 1188
2001-11-08 04:50:33 +00:00
Vikram S. Adve bdbb802c2f Added two minor methods.
llvm-svn: 1187
2001-11-08 04:49:52 +00:00
Vikram S. Adve d9f8598104 Removed class RegStackOffsets and used class MachineCodeForMethod
directly to manage stack frame.

llvm-svn: 1186
2001-11-08 04:48:50 +00:00
Vikram S. Adve c53037205b Major overhaul of stack frame management.
llvm-svn: 1185
2001-11-08 04:47:06 +00:00
Vikram S. Adve 07900bde2d Old file which was moved to include/llvm/Target some time back.
llvm-svn: 1184
2001-11-08 04:46:08 +00:00
Vikram S. Adve b375b89e00 Removed MachineCodeForMethod object and made it an annotation.
llvm-svn: 1183
2001-11-08 04:38:58 +00:00
Chris Lattner c1c54a2a92 Add analysis pass.
llvm-svn: 1182
2001-11-07 21:16:29 +00:00
Chris Lattner 83f1528061 Initial checkin of pointer safety checker
llvm-svn: 1181
2001-11-07 21:16:12 +00:00
Chris Lattner b1f672812b Correct problem that allows indirect function calls
llvm-svn: 1179
2001-11-07 20:12:30 +00:00
Chris Lattner 31e9e4d219 * 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 75586e2ace 1. -Winline emits spurious warnings that aren't useful right now
2. Fix the "rebuild everything if I change one file" problem

llvm-svn: 1176
2001-11-07 14:50:58 +00:00
Chris Lattner e147d062fa Killing warnings
llvm-svn: 1175
2001-11-07 14:01:59 +00:00
Chris Lattner 3b7199e36c Add #includes to enable buiding in Release mode
llvm-svn: 1174
2001-11-07 13:49:45 +00:00
Chris Lattner 5e030830a3 Squelch warnings about not returning a value
llvm-svn: 1173
2001-11-07 13:49:12 +00:00
Vikram S. Adve b8157d5a29 Roll back all these changes that have broken Makefile.target again.
llvm-svn: 1172
2001-11-07 12:29:40 +00:00
Chris Lattner 28e969d689 Okay, so this is a huge hack. Fixme later
llvm-svn: 1171
2001-11-07 05:31:53 +00:00
Chris Lattner eaec4ede57 *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 1f01726487 * 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 7db7958bd4 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 0758abd126 New class to provide high performance writing.
llvm-svn: 1167
2001-11-07 04:20:50 +00:00
Chris Lattner 51862ef777 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 c23094efb4 Implement log and drand48 for TSP bm
llvm-svn: 1165
2001-11-06 22:53:25 +00:00
Chris Lattner 74a4698aaa Minor fixes
llvm-svn: 1164
2001-11-06 22:53:17 +00:00
Chris Lattner 68289f0b89 Add notes
llvm-svn: 1163
2001-11-06 22:53:11 +00:00
Chris Lattner 5cc318819c Implement sqrt, implement printf better, simpler.
llvm-svn: 1161
2001-11-06 21:52:18 +00:00
Chris Lattner 6c4681ca28 Fix minor bug for shifts
llvm-svn: 1160
2001-11-06 21:51:48 +00:00
Chris Lattner 2f2d947f73 Print out the abridged form of the call instruction.
llvm-svn: 1159
2001-11-06 21:28:12 +00:00
Chris Lattner 82b7872326 Build .bc from .c better.
llvm-svn: 1158
2001-11-06 20:44:15 +00:00
Chris Lattner 21af446166 Don't forget to make the clean version.
llvm-svn: 1157
2001-11-06 20:23:50 +00:00
Vikram S. Adve 096a76aa92 Really fix Makefile to compile individual tests and Olden codes.
by using a better naming scheme.

llvm-svn: 1156
2001-11-06 17:09:49 +00:00
Vikram S. Adve 2f4b825ca1 Moved *.c files into subdirectory TestSources to avoid overwriting
corresponding *.ll files.

llvm-svn: 1155
2001-11-06 17:06:06 +00:00
Ruchira Sasanka 074d52d60d 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 0c993260fe Reorder paramters to make the command line more easily modifiable
llvm-svn: 1153
2001-11-06 08:34:56 +00:00
Chris Lattner 0136101e37 Fix bugs
llvm-svn: 1152
2001-11-06 08:34:29 +00:00
Chris Lattner 4031cdde57 Fix many bugs. Implement PHI transforms & other cycles
llvm-svn: 1151
2001-11-06 08:34:17 +00:00
Chris Lattner 9d3292d327 Give me PHI's space back
llvm-svn: 1150
2001-11-06 08:33:46 +00:00
Vikram S. Adve 928833ecea Bug fix: uninitialized variable.
llvm-svn: 1147
2001-11-06 05:11:05 +00:00
Vikram S. Adve f5b4f47cff 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 29644b3849 Print PHI nodes with zero operands even if they are illegal
llvm-svn: 1145
2001-11-06 01:48:45 +00:00
Chris Lattner 710c3861b5 Fix bug with ADD nodes and malloc promotion
llvm-svn: 1144
2001-11-05 21:13:30 +00:00
Chris Lattner 7bb67c8ab8 Fix makefile to compile olden and main benchmarks
llvm-svn: 1142
2001-11-05 19:43:24 +00:00
Chris Lattner 7e89a616e6 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 0ecba60d26 Use the expression map correctly.
llvm-svn: 1140
2001-11-05 18:30:53 +00:00
Chris Lattner ad480c5a34 Make the olden benchmarks compile again
llvm-svn: 1139
2001-11-05 18:25:37 +00:00
Vikram S. Adve 596721384b 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 59a13288a6 Make reg. numbers signed ints.
llvm-svn: 1137
2001-11-05 03:56:02 +00:00
Vikram S. Adve 6cb546970f Put it back!
llvm-svn: 1136
2001-11-05 00:48:27 +00:00
Vikram S. Adve daa6058a13 Removed by mistake; will add it back immediately.
llvm-svn: 1135
2001-11-05 00:48:05 +00:00
Vikram S. Adve d3be60db35 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).

llvm-svn: 1134
2001-11-05 00:35:56 +00:00
Vikram S. Adve 4d04e00072 Delete rule to disassemble %.bc -- need to make it effective only when
%.ll is not a pre-existing file.

llvm-svn: 1133
2001-11-05 00:23:25 +00:00
Vikram S. Adve 491d8dde35 Replaced another HERE.
llvm-svn: 1132
2001-11-05 00:22:16 +00:00
Vikram S. Adve e943db9be9 Put common rules for compiling programs into Makefile.target.
llvm-svn: 1130
2001-11-05 00:18:30 +00:00
Chris Lattner db750679a3 New file for expression tree conversion
llvm-svn: 1128
2001-11-04 23:24:20 +00:00
Chris Lattner 3084cb65ff Refactor code to share stuff
llvm-svn: 1127
2001-11-04 23:24:06 +00:00
Chris Lattner cb3da314d9 * Relax restriction that prevented malloc promotion in certain cases
llvm-svn: 1125
2001-11-04 22:11:10 +00:00
Vikram S. Adve 80cf60687d Generate code for Rem instruction.
llvm-svn: 1124
2001-11-04 21:59:14 +00:00
Chris Lattner dc194d54f9 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 36c5a79153 * 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 40a2d9076b 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 ea5d1f5db8 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 33d9cb9903 Minor method rename
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Chris Lattner f00563d39d Add transformations for Load and GetElementPtr. Fix broken transform with shr.
llvm-svn: 1118
2001-11-04 07:42:17 +00:00
Chris Lattner eb7b620d58 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 471babe2d2 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 033324fc0c Avoid making a broken transformation!
llvm-svn: 1115
2001-11-03 21:30:22 +00:00
Chris Lattner ec83fc091e 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
Chris Lattner 34f8595c0b Add a helper function to PHI node
llvm-svn: 1113
2001-11-03 21:08:00 +00:00
Ruchira Sasanka 51fc1c2d72 Added support for correct spilling of %ccr
llvm-svn: 1112
2001-11-03 20:41:22 +00:00
Ruchira Sasanka 9d8950d240 Added code to support correct saving of %ccr across calls
llvm-svn: 1111
2001-11-03 19:59:59 +00:00
Chris Lattner 784c623efb * 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
Chris Lattner cf5befef63 Expose method to merge identically named methods
llvm-svn: 1109
2001-11-03 19:49:54 +00:00
Ruchira Sasanka ca632ed71a Arranged stack frame - needs furhter organization
llvm-svn: 1108
2001-11-03 17:14:44 +00:00
Ruchira Sasanka 97b93aea81 Moved InsertCallerSaveInstr to the SparcRegInfo.cpp and made machine independent
llvm-svn: 1107
2001-11-03 17:14:13 +00:00
Ruchira Sasanka b7a397253f 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 629a15247a 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 d7c742f46a 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 629d7a7849 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 1f3947c1d1 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 3855f2c806 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
Chris Lattner 34ec31bb74 Remove debugging info
llvm-svn: 1093
2001-11-03 03:31:39 +00:00
Chris Lattner 4f1ca018aa Fix major bugs in type resolution
llvm-svn: 1092
2001-11-03 03:27:53 +00:00
Chris Lattner 1e60d6b762 Add extra code for debugging linker problems
llvm-svn: 1091
2001-11-03 03:27:29 +00:00
Chris Lattner c7724169bf Fix the linker. This bug was not fun to track down. grr
llvm-svn: 1090
2001-11-03 03:26:47 +00:00
Chris Lattner 866cbddec8 Dramatically simplify recursive type processing. Fixed a few bugs, a few still remain :(
Why does this stuff have to come up NOW?

llvm-svn: 1089
2001-11-02 07:51:31 +00:00
Chris Lattner f29b231c77 Improve some debugging code
llvm-svn: 1088
2001-11-02 07:46:26 +00:00
Chris Lattner 50f68acb37 Support floating point numbers in expodential form so that small numbers don't get truncated, which broke the health benchmark
llvm-svn: 1087
2001-11-01 22:06:08 +00:00
Chris Lattner e80af939da Print floating point numbers in expodential form so that small numbers don't get truncated, which broke the health benchmark
llvm-svn: 1086
2001-11-01 22:06:00 +00:00
Chris Lattner 9bc6b190cc * 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.  :)

llvm-svn: 1085
2001-11-01 17:05:27 +00:00
Chris Lattner 71c842cddf Add DCE as integral part of the level raising to avoid processing instructions that are dead
llvm-svn: 1084
2001-11-01 07:00:51 +00:00
Chris Lattner 7567f6c15f Expose the low level DCE mechanism to external users
Refactor code to support it

llvm-svn: 1083
2001-11-01 07:00:27 +00:00
Chris Lattner 63ac2b335a Expose the low level DCE mechanism to external users
llvm-svn: 1082
2001-11-01 07:00:21 +00:00
Chris Lattner f652674162 Implement new simpler constructors for if you don't have a index list
llvm-svn: 1081
2001-11-01 05:58:42 +00:00
Chris Lattner 9a13ececd8 * 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

llvm-svn: 1080
2001-11-01 05:57:59 +00:00
Chris Lattner 04648a4cc6 Simplify DCE code a lot
llvm-svn: 1079
2001-11-01 05:55:29 +00:00
Chris Lattner 977f0044fc Implement constant propogation of null pointer values.
llvm-svn: 1078
2001-11-01 05:55:13 +00:00
Chris Lattner 3003edc9f1 Add simpler to use ctors. Add getType() overload to specialize getelementptr's type
llvm-svn: 1077
2001-11-01 05:54:28 +00:00
Chris Lattner 3e8ef98515 Add new isNullValue method
llvm-svn: 1076
2001-11-01 05:53:56 +00:00
Chris Lattner 1267be2319 * Convert getelementptr/store pairs into a single store
* Convert getelementptr/load pairs into a single load

llvm-svn: 1075
2001-11-01 03:12:34 +00:00
Chris Lattner 025f9fcf80 Initial checkin of level raising code, after move and cleanup and expands from the opt directory
llvm-svn: 1074
2001-11-01 02:42:08 +00:00
Chris Lattner 8ac538db47 Initial checkin of level raising code
llvm-svn: 1073
2001-11-01 02:41:52 +00:00
Chris Lattner e326957333 Move the Raise xform from opt to transforms
llvm-svn: 1072
2001-11-01 02:41:09 +00:00
Chris Lattner 246f157af4 Propogate name to the malloc itself instead of to the cast
llvm-svn: 1071
2001-11-01 02:40:36 +00:00
Chris Lattner d307537327 Move level change xfor into the transforms directory
llvm-svn: 1070
2001-11-01 02:39:49 +00:00
Chris Lattner d67f2a4493 Add some useful accessors
llvm-svn: 1069
2001-11-01 02:39:36 +00:00
Chris Lattner 9fb50fe167 crunch the output of GCC a bit to make it nicer
llvm-svn: 1068
2001-10-31 06:36:48 +00:00
Chris Lattner 55c72cb47a Start testing the new cleangcc pass
llvm-svn: 1067
2001-10-31 06:36:34 +00:00
Chris Lattner 7e6a0d8c17 Use the correct prototype for malloc and free
llvm-svn: 1066
2001-10-31 06:36:23 +00:00
Chris Lattner 20726ed31b Implement code to convert %malloc and %free FUNCTION CALLS into the instruction equivalent
llvm-svn: 1065
2001-10-31 06:35:59 +00:00
Chris Lattner 9db8b765cd Implemented constant propogation of cast instructions
llvm-svn: 1064
2001-10-31 05:07:57 +00:00
Chris Lattner ae6de303fc Fix dumb copy and paste typos
llvm-svn: 1063
2001-10-31 04:33:33 +00:00
Chris Lattner 34b9518c88 Initial version of GCC cleanup pass: just removes extraneous global symbol table entries for types
llvm-svn: 1062
2001-10-31 04:33:19 +00:00
Chris Lattner b3f4d1bc73 New GCC cleanup pass interface
llvm-svn: 1061
2001-10-31 04:32:53 +00:00
Chris Lattner 7a2d677332 Add hook for GCC cleanup pass
llvm-svn: 1060
2001-10-31 04:29:44 +00:00
Chris Lattner 129aac7468 Build new gccas tool
llvm-svn: 1059
2001-10-31 04:29:30 +00:00
Chris Lattner 1a30617664 Initial checkin of GCCAS
llvm-svn: 1058
2001-10-31 04:28:11 +00:00
Chris Lattner 49d9307ca6 Initial checkin of heapsort benchmark
llvm-svn: 1057
2001-10-31 02:28:25 +00:00
Chris Lattner 2a2b531294 Fix bug when inlining a method that refers to a global variable
llvm-svn: 1056
2001-10-31 02:27:26 +00:00
Chris Lattner 0d5c295536 Implement memset memcpy, calloc
llvm-svn: 1055
2001-10-30 22:37:01 +00:00
Chris Lattner 7551ec25e7 Initial checkin of ary3 "benchmark" from prog lang shootout
llvm-svn: 1051
2001-10-30 22:17:57 +00:00
Chris Lattner 487b1b8cc1 Implement xor operator
llvm-svn: 1050
2001-10-30 20:54:36 +00:00
Chris Lattner 3f741a560a Initialize map for purify
llvm-svn: 1049
2001-10-30 20:28:46 +00:00
Chris Lattner 8bd5c77731 callExternalMethod now returns the return value of the function
llvm-svn: 1048
2001-10-30 20:28:23 +00:00
Chris Lattner 7fd51b54e5 Implement a gross function name map that must be used when linking statically
This is for use with purify

llvm-svn: 1047
2001-10-30 20:28:00 +00:00
Chris Lattner 5946b1150d * Add some assertions for checking internal error conditions
* Implement the 'rem' instruction
* Fix getelementptr to work right
* Copy the return result of an external function call into the receiving value
* Convert stuff to new style casts

llvm-svn: 1046
2001-10-30 20:27:31 +00:00
Chris Lattner b20b290c5e Add easy way to enable purify support
llvm-svn: 1045
2001-10-30 20:24:08 +00:00
Chris Lattner c85ee99b42 Don't fail to load runtime if running LLI from the current directory
llvm-svn: 1044
2001-10-30 16:40:37 +00:00
Chris Lattner ff2a07f4df Initialize isRecursive. Found by Purify
llvm-svn: 1043
2001-10-30 16:39:16 +00:00
Chris Lattner 92fcd608cf Fix ordering problem. Found by purify. :)
llvm-svn: 1042
2001-10-30 16:38:49 +00:00
Chris Lattner cdb5936f45 Add testcase for missed SCCP optimization
llvm-svn: 1040
2001-10-30 03:22:59 +00:00
Chris Lattner 62d1fb6777 Print out a label if we step into the first instruction of a basic block
llvm-svn: 1038
2001-10-29 20:44:34 +00:00
Chris Lattner 490d2a8461 * Fix pow wrapper to actually work
* Implement rudimentary printf support for lli

llvm-svn: 1037
2001-10-29 20:27:45 +00:00
Chris Lattner 05fbeedde8 Implement getelementptr instruction as well as the load and store forms
that incorporate gep

llvm-svn: 1036
2001-10-29 19:32:19 +00:00
Chris Lattner eec6046adf I screwed up the macros, so of course strtol didn't work. *sigh*
llvm-svn: 1035
2001-10-29 17:47:10 +00:00
Chris Lattner cba9036e34 Fix broken assertion. Didn't allow for pointer case
llvm-svn: 1034
2001-10-29 17:27:38 +00:00
Chris Lattner 3e95c716aa Pull method symbols over when linking. Otherwise the result of the link will appear stripped
llvm-svn: 1033
2001-10-29 16:55:41 +00:00
Chris Lattner 72f866eda3 Fix blatent bugs in checkin
llvm-svn: 1032
2001-10-29 16:40:32 +00:00
Chris Lattner b86620e9b1 Expose the WriteTypeSymbolic function from the library. Refactor code to make
this function explicit.  Cause WriteAsOperand to use symbolic types as available.

llvm-svn: 1031
2001-10-29 16:37:48 +00:00
Chris Lattner 790409a07a Expose some more printing functionality from the assembly writer library
llvm-svn: 1030
2001-10-29 16:36:49 +00:00
Chris Lattner 7bfee414aa Be careful to output symbolic type name if possible for a type. This makes
debugging the Olden/health benchmark actually possible.

llvm-svn: 1029
2001-10-29 16:05:51 +00:00
Chris Lattner 13babb6805 Remember to print out the next instruction if stepping over an external method call
llvm-svn: 1028
2001-10-29 16:05:19 +00:00
Chris Lattner 689049e1cd Fix problem next'ing over an external method
llvm-svn: 1027
2001-10-29 14:08:33 +00:00
Chris Lattner c6503e8a2f Oops, accidentally broke reading from stdin when doing command line arguments
llvm-svn: 1026
2001-10-29 14:00:48 +00:00
Chris Lattner 1711dcbd29 Test bitwise operations
llvm-svn: 1025
2001-10-29 13:56:42 +00:00
Chris Lattner 41a8289eb8 Check in to use moved stringizing code
llvm-svn: 1024
2001-10-29 13:39:38 +00:00
Chris Lattner e10ec076e9 Systems headers use <> not ""
llvm-svn: 1023
2001-10-29 13:29:50 +00:00
Chris Lattner 8c857b86fd Checkin of C string stuff. Fix several bugs, including most escape codes being
printed as '\\n' instead of their correct code.  Also print things in octal instead of hex.

llvm-svn: 1022
2001-10-29 13:28:00 +00:00
Chris Lattner 239a1bdfe1 Remove C string capability from VMCore library. Move to Support
llvm-svn: 1021
2001-10-29 13:27:09 +00:00
Chris Lattner 3bb79584d5 Include functionality to get a string array constant as a string
llvm-svn: 1020
2001-10-29 13:24:31 +00:00
Chris Lattner 0936089b67 Remove useCSyntax flag
llvm-svn: 1019
2001-10-29 13:22:49 +00:00
Chris Lattner 108d8d46b9 Initial checkin of name mangling code moved from linker
llvm-svn: 1018
2001-10-28 23:44:03 +00:00
Chris Lattner 84085ac517 Initial checkin of name mangling code. Moved from Linker.h
llvm-svn: 1017
2001-10-28 23:31:10 +00:00
Vikram S. Adve 66aea7a58c Make newlines be newlines! This should now work in both lli and native code.
llvm-svn: 1016
2001-10-28 22:44:02 +00:00
Chris Lattner fc361b1d55 Remove non linking related stuff
llvm-svn: 1015
2001-10-28 22:43:06 +00:00
Chris Lattner 328c9afafe Remove unneccesary function prototypes
llvm-svn: 1014
2001-10-28 22:40:59 +00:00
Chris Lattner 9cd1451b89 Fix some illegal uses of the ## operator
llvm-svn: 1013
2001-10-28 22:38:22 +00:00
Vikram S. Adve 5ff15721c9 Minor fix I omitted to check in.
llvm-svn: 1012
2001-10-28 22:19:06 +00:00
Vikram S. Adve eada6b128a Support printing control characters in standard C/assembly style,
if you specify useCSyntax = true.  The old style is still the default.

llvm-svn: 1011
2001-10-28 21:48:05 +00:00
Vikram S. Adve 33ec4a3c23 Record constants that need to be emitted in the assembly code.
llvm-svn: 1010
2001-10-28 21:46:23 +00:00
Vikram S. Adve 979800ede8 Allow combinations of True/Anti/Output flags for each edge to
support, e.g., dependences on Call instructions.

llvm-svn: 1009
2001-10-28 21:45:02 +00:00
Vikram S. Adve df6913549a Add edges between call instructions and (a) load/store instructions, and
(b) any instructions that use or set CC registers.  Whether or not the
latter are needed really should be machine-dependent.

llvm-svn: 1008
2001-10-28 21:43:33 +00:00
Vikram S. Adve 2f72cdd756 Generate SETX for 64-bit integers!
llvm-svn: 1007
2001-10-28 21:41:46 +00:00
Vikram S. Adve a5619eb835 Add SETX instruction for 64-bit constants.
Add M_CC_FLAG for many instructions that use int or fp CC registers.

llvm-svn: 1006
2001-10-28 21:41:01 +00:00
Vikram S. Adve b31f9c3ea6 Need to subtract, not add, stack size in SAVE instruction!
llvm-svn: 1005
2001-10-28 21:39:47 +00:00
Vikram S. Adve 71b265a848 Major overhaul to print globals and constants.
llvm-svn: 1004
2001-10-28 21:38:52 +00:00
Vikram S. Adve 6e26c8b0fc Added name-mangling routines for future use.
llvm-svn: 1003
2001-10-28 21:38:02 +00:00
Vikram S. Adve 96f6ac9ffc Use separate functions for printing values of each type.
Put trace code before condition-generating instruction in basic blocks
that end in a conditional branch.

llvm-svn: 1002
2001-10-28 21:37:25 +00:00
Vikram S. Adve ef3544314e Added printPointer.
llvm-svn: 1001
2001-10-28 21:34:59 +00:00
Vikram S. Adve 1b7cc1e33b Runtime routines implementing print<TYPE> for all basic types.
llvm-svn: 1000
2001-10-28 21:31:33 +00:00
Vikram S. Adve 8716cdfb52 Added a constant pool to record values that need to be emitted
in the assembly code.

llvm-svn: 999
2001-10-28 21:24:50 +00:00
Vikram S. Adve e3b575497d Add support for name mangling.
llvm-svn: 998
2001-10-28 21:23:44 +00:00
Vikram S. Adve 42ea891fb8 Switch useLLVMSyntax to useCSyntax.
llvm-svn: 997
2001-10-28 21:21:25 +00:00
Vikram S. Adve 4a6067f959 Add calls to print results in fib, simpleadd and sumarray.
indirectcall is the same as fib but uses function pointers.

llvm-svn: 996
2001-10-28 21:16:34 +00:00
Vikram S. Adve e6298e3574 Support printing control characters in standard C/assembly style.
llvm-svn: 995
2001-10-28 21:06:48 +00:00
Vikram S. Adve 578a840b29 Add methods print<TYPE> for String, Pointer, and each primitive type.
llvm-svn: 994
2001-10-28 20:52:27 +00:00
Vikram S. Adve 03fb2f3916 Added rules for building sparc executable with and without tracing,
and linking with local runtime library.

llvm-svn: 993
2001-10-28 20:18:11 +00:00
Ruchira Sasanka 9c38dbc249 Added support for spilling
llvm-svn: 992
2001-10-28 18:15:12 +00:00
Ruchira Sasanka cf28a7c7d3 Moved callerSaving code to machine specific classes since we have to handle
%ccr reg differently.

llvm-svn: 991
2001-10-28 18:14:15 +00:00
Ruchira Sasanka 321ed7be93 Added spill code support; moved insertCallerSaving to SparRegInfo since
we need to handle %ccr reg in a special way.

llvm-svn: 990
2001-10-28 18:12:02 +00:00
Chris Lattner 009f8108bc Implement a -trace command line option and a trace option in the interpreter.
llvm-svn: 989
2001-10-27 08:43:52 +00:00
Chris Lattner 0b00b31c78 * Make pointer values work better by treating them uniformly as 64 bit values.
This causes code that is generated by gcc to work better.
* Implement mul & div
* Export malloc, free, and pow
* add strtol, atoi, and atol to the runtime library

llvm-svn: 988
2001-10-27 08:28:11 +00:00
Chris Lattner 6642eec003 Provide argv for commands
llvm-svn: 987
2001-10-27 05:54:31 +00:00
Chris Lattner e81c409952 Provide option to enable eating of all arguments following a specific one
llvm-svn: 986
2001-10-27 05:54:17 +00:00
Chris Lattner 15157b88e9 * Implement exit() builtin function
* Implement linked in runtime library with puts(char*) in it
* implement builtin putchar(int) function

llvm-svn: 985
2001-10-27 04:15:57 +00:00
Ruchira Sasanka 0863c161e9 Fixed load syntax in EmitAssembly
Fixed cpReg2Mem (store) operand oreder in SparcRegInfo.cpp

llvm-svn: 984
2001-10-24 22:05:34 +00:00
Chris Lattner f9e623e1f9 Add support for building a runtime library for LLI
llvm-svn: 983
2001-10-24 19:52:41 +00:00
Ruchira Sasanka 36bcd79050 Fixed logic for checking whether a LR received the correct color.
llvm-svn: 976
2001-10-24 15:56:58 +00:00
Chris Lattner ae31f5b65f Implement a -L command line argument to specify a search path. Implement minimal ar compatibility stuff
llvm-svn: 975
2001-10-24 06:23:00 +00:00
Chris Lattner d4617cdf41 Clean up error handling a bit. Add / as a seperator for command line arguments. This is just a big old ugly hack.
llvm-svn: 974
2001-10-24 06:21:56 +00:00
Chris Lattner e3fe1ac4ee Frivolous cleanups
llvm-svn: 973
2001-10-24 06:21:22 +00:00
Chris Lattner a065a732bf Dang it, do NOT check in code that enables debugging. Bad chris
llvm-svn: 972
2001-10-24 05:14:35 +00:00
Chris Lattner 7dacd514ca Two things:
1. Forward propogate a loaded constant to make debugging slightly less annoying
2. Fix an extremely nasty hard to find bug that really irritated me for the better
   part of 6 hours and was causing linking to die and bizarre and mysterious ways.
   Things should be much more stable now that this one liner has been fixed. GRR

llvm-svn: 971
2001-10-24 05:12:04 +00:00
Chris Lattner daebd7508d Changes to get some meaningful feedback from the bytecode reader. At some point this stuff should all be exception driven, but for now it is not.
llvm-svn: 970
2001-10-24 01:15:12 +00:00
Ruchira Sasanka 6a7f02082b Corrected a bug in SparcRegInfo.cpp - to add inserted instructions before a return
llvm-svn: 969
2001-10-23 21:40:39 +00:00
Ruchira Sasanka 33b0d85f65 added support to move "added instructions" after the delay slot
llvm-svn: 968
2001-10-23 21:38:42 +00:00
Ruchira Sasanka c300c6ba58 Added support to move "added instructions" after the delay slot
llvm-svn: 967
2001-10-23 21:38:00 +00:00
Chris Lattner ebaa78852c Add '-v' option to enable verbose output from the linker
llvm-svn: 966
2001-10-23 20:44:55 +00:00
Chris Lattner b046867a97 Fix problem linking in a method prototype when a method body exists
llvm-svn: 965
2001-10-23 20:43:42 +00:00
Chris Lattner aeaec1ccb9 Remove unnamed prototypes that are created.
llvm-svn: 964
2001-10-23 15:30:18 +00:00
Chris Lattner adb4dbaef3 Negative FP constants... whodathunkit.
llvm-svn: 963
2001-10-23 04:13:01 +00:00
Chris Lattner 7540328e46 Oops, didn't mean to check in enabled debugging support. :(
llvm-svn: 962
2001-10-23 03:21:42 +00:00
Chris Lattner b5498aba50 Fixed a LONG standing, SCARY problem with bytecode encoding. It turns out to be an endian problem that only shows up with type 0 instructions in LARGE programs.
llvm-svn: 961
2001-10-23 03:21:10 +00:00
Chris Lattner 98960dce6d More symbol table bugfixes that are impossible to track down. Goody
llvm-svn: 960
2001-10-23 02:32:45 +00:00
Chris Lattner 0557f117dd Allow unresolved/opaque types to be read and written to bytecode files
llvm-svn: 959
2001-10-23 01:53:22 +00:00
Chris Lattner 61b665528e Fix another annoying bug that took forever to track down. This one involves abstract type resolution at a bad time that broke symbol tables.
llvm-svn: 958
2001-10-23 01:53:01 +00:00
Vikram S. Adve 4b9c7c23b2 Disable alloca code gen tests until size of extra args in stack frame
can be computed.

llvm-svn: 957
2001-10-22 22:33:08 +00:00
Vikram S. Adve 0009da41c6 Delete MachineCodeInfoForMethod object.
llvm-svn: 956
2001-10-22 22:32:11 +00:00
Chris Lattner 100884edad Fix a problem occuring with type unification of symbol table entries
llvm-svn: 955
2001-10-22 21:59:46 +00:00
Vikram S. Adve 4dedee5dc4 Simplify etags command.
llvm-svn: 954
2001-10-22 13:58:22 +00:00
Vikram S. Adve bdea601096 Added object of class MachineCodeForMethod.
llvm-svn: 953
2001-10-22 13:58:08 +00:00
Vikram S. Adve 21c3a754fc Added class MachineCodeForMethod to provide method-level information
about the generated native code (e.g., frame layout information).

llvm-svn: 952
2001-10-22 13:57:39 +00:00
Vikram S. Adve 0f228750ec Added function interfaces for generating prolog and epilog code.
The functions must be implemented by the target-specific code generator.

llvm-svn: 951
2001-10-22 13:56:33 +00:00
Vikram S. Adve 5dab57de99 Added function IsLeafMethod to identify leaf methods.
This will use the CallGraph only if one is provided.

llvm-svn: 950
2001-10-22 13:55:46 +00:00
Vikram S. Adve 4e594bebba Added MachineCodeForMethod object in class Method.
llvm-svn: 949
2001-10-22 13:52:47 +00:00
Vikram S. Adve 901da32e64 Use class MachineCodeForMethod to print machine code.
llvm-svn: 948
2001-10-22 13:52:03 +00:00
Vikram S. Adve cc80b02834 Added class MachineCodeForMethod.
llvm-svn: 947
2001-10-22 13:51:33 +00:00
Vikram S. Adve 3686293bd2 Cosmetic changes only.
llvm-svn: 946
2001-10-22 13:51:09 +00:00
Vikram S. Adve 9a6457388f Modify code that processes delay slots so that it preserves any
useful instructions already inserted into delay slots.

llvm-svn: 945
2001-10-22 13:49:27 +00:00
Vikram S. Adve 18a9e39214 UNUSED.
llvm-svn: 944
2001-10-22 13:46:38 +00:00
Vikram S. Adve a0177cdca5 Split JMPL into JMPLCALL and JMPLRET.
llvm-svn: 943
2001-10-22 13:44:53 +00:00
Vikram S. Adve 9090b50ba9 Added a frame layout class, and code to insert prolog/epilog code.
llvm-svn: 942
2001-10-22 13:44:23 +00:00
Vikram S. Adve 5462dca9f1 Reordered registers slightly to simplify a new check.
Added a function to map between the caller's and callee's register windows.

llvm-svn: 941
2001-10-22 13:43:08 +00:00
Vikram S. Adve 8498277e77 Split JMPL into JMPLCALL and JMPLRET so that IsCall and IsReturn can
be used to distinguish those uses of the `jmpl' instruction.

llvm-svn: 940
2001-10-22 13:41:12 +00:00
Vikram S. Adve 52e41008e3 Added functions to generate prolog and epilog code.
Use JMPLRET instead of RETURN for method returns so that

llvm-svn: 939
2001-10-22 13:36:31 +00:00
Vikram S. Adve 6b492ddc15 Added SAVE and RESTORE. Duplicated JMPL into JMPLCALL and JMPLRET,
which have the same opcode and operands but different flags.

llvm-svn: 938
2001-10-22 13:32:55 +00:00
Vikram S. Adve 7c1a8d6d53 Reordered a couple of registers to simplify some new checks.
Added code to map between caller's and callee's register windows.
Added frame layout class.

llvm-svn: 937
2001-10-22 13:31:53 +00:00
Chris Lattner e6b470c3f1 Remove ugly subclass of Opaque type
llvm-svn: 936
2001-10-22 06:01:08 +00:00
Chris Lattner d50fa5aa36 Fix bug with
%list = type {%list *}
%list = type {%list *}

not being accepted (broken testmisc.ll)

llvm-svn: 935
2001-10-22 05:56:09 +00:00
Chris Lattner fb864a35aa Fix bug exposed by this testcase:
declare int "call_operand"      (%rtx_def*, int)        ;; Prototype for: call_operand
declare int "restore_operand"   (%rtx_def*, int)        ;; Prototype for: restore_operand

%rtx_def = type opaque
%rtx_def = type int
implementation

llvm-svn: 934
2001-10-22 04:55:44 +00:00
Chris Lattner 6265d798d4 Two changes:
1. Delete type handle regardless of whether a collision occured
2. Remove a MAJOR pessimization of runtime performance (thought be be an optimization at the time).

This second one was causing a 105k llvm file (from gcc) to parse in 58 seconds... without the
'optimization' it now parses in 3.64 seconds.  I suck.

llvm-svn: 933
2001-10-21 23:02:41 +00:00
Chris Lattner b57ac6f4bd Fix erroneous assertion failure on the following code:
declare int "malloc"(...)

...

%reg112 = call int (...) * %malloc( uint %cast1007 )

llvm-svn: 932
2001-10-21 21:54:51 +00:00
Chris Lattner 28a63e2972 Fix bug caused by:
%list = type opaque
%list = type %list

llvm-svn: 931
2001-10-21 21:43:25 +00:00
Ruchira Sasanka 24729a34ce Added support for both call/jmpl instructions
llvm-svn: 930
2001-10-21 16:43:41 +00:00
Chris Lattner 18e81933c7 Fix problem with a cast instruction that must be expanded to type 0
llvm-svn: 929
2001-10-21 00:14:44 +00:00
Vikram S. Adve 9bc488984f Fixed printing of offset operand for RETURN instruction.
llvm-svn: 928
2001-10-20 21:33:50 +00:00
Vikram S. Adve 5731249137 Use CALL for direct function calls; JMPL for indirect ones.
llvm-svn: 927
2001-10-20 20:57:06 +00:00
Vikram S. Adve 72ebb454d0 Minor bug fix in printing operands of JMPL.
llvm-svn: 926
2001-10-20 20:56:40 +00:00
Chris Lattner b6fe2345f1 Fix shift printing when using a ubyte LHS
llvm-svn: 925
2001-10-20 09:33:10 +00:00
Chris Lattner c27b1d7bf3 Add support for And, XOR, and Or
llvm-svn: 924
2001-10-20 09:32:59 +00:00
Chris Lattner f96ef663e0 It is valid to have unsigned arrays as constants... the linker may initialize them later
llvm-svn: 923
2001-10-20 06:43:05 +00:00
Ruchira Sasanka 53516cd05b Added code to support unusable Suggested Colors.
llvm-svn: 922
2001-10-19 21:42:06 +00:00
Ruchira Sasanka 6a073498ba Added code so that colorIGNode does not unnecessarily reserve unusable
Suggested colors for neighbors.

llvm-svn: 921
2001-10-19 21:41:16 +00:00