Chris Lattner
323c46631a
New testcase
...
llvm-svn: 2304
2002-04-18 20:30:58 +00:00
Chris Lattner
ded2679ed0
Make sure that there is no case where a signal can occur leaving a partially
...
written output file. This is important because crashing testcases often write
part of a file out, and the testing harness decides the file is up-to-date next
time the test is run.
llvm-svn: 2303
2002-04-18 19:55:25 +00:00
Chris Lattner
37c9e90c89
Add new api for basic signal handling for tools
...
llvm-svn: 2302
2002-04-18 19:53:53 +00:00
Chris Lattner
01ad1e2383
New api for signal handling for LLVM tools
...
llvm-svn: 2301
2002-04-18 19:53:34 +00:00
Chris Lattner
8f81cd7da6
Move asmwriter/getStrValue cruft into AsmWriter.cpp file.
...
llvm-svn: 2300
2002-04-18 18:53:33 +00:00
Chris Lattner
f1dee31d23
Pull all of the getStrValue implementation cruft out of Constants.cpp and
...
put it into the AsmWriter. This code is kinda gross and could probably be
cleaned up, but not now.
llvm-svn: 2299
2002-04-18 18:53:13 +00:00
Chris Lattner
8e2b6edf87
Add a fixme so that we don't forget this is broken.
...
llvm-svn: 2298
2002-04-18 18:52:03 +00:00
Chris Lattner
bfad09f50d
Remove getStrValue method from Constant implementations. The AssemblyWriter
...
now knows how to write out a constant, not the constants themselves. This is
fixed due to the move of the AsmWriter to the VMcore library.
llvm-svn: 2297
2002-04-18 18:51:39 +00:00
Chris Lattner
2789c27277
* getAsString requires that the input array is string compatible, so
...
assert it.
* Use WriteAsOperand instead of getStringValue for constants
llvm-svn: 2296
2002-04-18 18:15:38 +00:00
Chris Lattner
f43286a1e4
Make debugging code not use getStrValue
...
llvm-svn: 2295
2002-04-18 18:14:56 +00:00
Chris Lattner
e935ad94d0
Just use << isntead of forcing getStrValue
...
llvm-svn: 2294
2002-04-18 18:14:40 +00:00
Chris Lattner
bde9202648
Print argument scalars as ellipses instead of boxes
...
llvm-svn: 2293
2002-04-18 18:14:19 +00:00
Chris Lattner
a392a80a60
Significantly rework InstructionCombining to work better and to be cleaner.
...
We now use an InstVisitor to delegate to different cases that we are
interested in handling. We also fix the FIXME's by adding users to the
worklist when appropriate.
llvm-svn: 2292
2002-04-18 17:39:14 +00:00
Chris Lattner
6e578a2b00
New testcase.
...
llvm-svn: 2291
2002-04-18 17:35:39 +00:00
Chris Lattner
3cdb370e13
* Add a comment to the header giving a breif overview of how to return a
...
value from a visit function
* Define a (file local) DELEGATE macro to make the code easier to read/maintain
* Define per-opcode delegation functions so that users can override specific
instances of BinaryOperator for example.
llvm-svn: 2290
2002-04-18 16:16:16 +00:00
Chris Lattner
fea39ddbf3
* Make dtor virtual
...
* Add a new defaulted argument that allows the instruction visitation
visitors to return a non-void value.
llvm-svn: 2289
2002-04-18 15:46:40 +00:00
Chris Lattner
a1f5a1b920
Check in the first test: make sure getelementptr gets folded
...
llvm-svn: 2288
2002-04-18 15:39:50 +00:00
Chris Lattner
9a7a1140d1
Test the instruction combiner
...
llvm-svn: 2287
2002-04-18 15:39:15 +00:00
Chris Lattner
bb60c83409
Convert SCCP over to use InstVisitor instead of hand crafted switch
...
llvm-svn: 2286
2002-04-18 15:13:15 +00:00
Chris Lattner
e2f1e01fc1
Remove gep::isStructSelector
...
CTor's do not allow names anymore for StoreInst objects
llvm-svn: 2285
2002-04-18 14:44:53 +00:00
Chris Lattner
b736829547
GEP instructions can never be constant propogated.
...
llvm-svn: 2284
2002-04-18 14:44:13 +00:00
Chris Lattner
5e7d6d8066
Store instructions always return void, so they never get a name
...
llvm-svn: 2283
2002-04-18 14:43:54 +00:00
Chris Lattner
eee0e3f1f7
Correctly transform dependant arguments, allowing the perimeter bm to work.
...
llvm-svn: 2282
2002-04-18 14:43:30 +00:00
Chris Lattner
e47ac70405
* StoreInst's shouldn't take names (they are _always_ void type)
...
* Remove two methods that are not used
llvm-svn: 2281
2002-04-18 14:42:27 +00:00
Chris Lattner
e4f2e7ecf4
Fix a bug printing out %c formated characters.
...
llvm-svn: 2277
2002-04-17 17:43:01 +00:00
Chris Lattner
a4add093c6
Inline indirect function calls that are only capable of calling one function
...
llvm-svn: 2275
2002-04-17 03:42:51 +00:00
Chris Lattner
59927296e4
Make data structure acurately get ALL edges, even loads of null fields of
...
nodes that are not shadow nodes
This fixes em3d to be _correct_ if not optimial
llvm-svn: 2274
2002-04-17 03:24:59 +00:00
Chris Lattner
6830bf4c34
Make data structure acurately get ALL edges, even loads of null fields of
...
nodes that are not shadow nodes
llvm-svn: 2273
2002-04-17 03:24:47 +00:00
Chris Lattner
04437c9749
Add casts for documentation
...
llvm-svn: 2272
2002-04-16 22:10:52 +00:00
Chris Lattner
68c032623c
* Clean up the code a bit
...
* Allow structs with negative offsets. This enables the em3d benchmark to
be made typesafe. In this case, the struct had an array as the first
element, so a negative index was ok (the expr was -8 + 8x)
llvm-svn: 2271
2002-04-16 22:10:36 +00:00
Chris Lattner
f1dd584bbe
Remove old frivolous uses of getStrValue in a debugging statement
...
llvm-svn: 2270
2002-04-16 21:36:59 +00:00
Chris Lattner
c43b279e94
Remove unneccesary cast
...
llvm-svn: 2269
2002-04-16 21:36:29 +00:00
Chris Lattner
10c22c6970
Changes to:
...
* Fix bug printing method types (oops when converting previous code)
* Move some of the code from Constant::getStrValue implementations here.
This allows us to do a MUCH MUCH better job printing out complex constant
values (think an array of structure pointers), because we print symbolic
type names instead of structural. The assistance when debugging is immense
Eventually, Constant::getStrValue should be removed (it existed before because
the asmwriter file was not in VMCore), and everyone should go through the
asmwriter that want's equivalent functionality.
llvm-svn: 2268
2002-04-16 21:36:08 +00:00
Chris Lattner
7f3c232f01
Fix for buggy test
...
llvm-svn: 2267
2002-04-16 21:31:08 +00:00
Chris Lattner
0cda7182ba
* Remove the concept of a critical shadow node
...
* Make the function pointer argument explicit for a call nodes
* Eliminate unreachable global values
* Merge call nodes that are identical
llvm-svn: 2266
2002-04-16 20:39:59 +00:00
Chris Lattner
407c7385f8
Remove the concept of a critical shadow node
...
llvm-svn: 2265
2002-04-16 20:39:23 +00:00
Chris Lattner
52d1ff5be0
New testcase
...
llvm-svn: 2262
2002-04-16 05:58:24 +00:00
Chris Lattner
068a98c2a5
New testcase
...
llvm-svn: 2261
2002-04-16 05:44:56 +00:00
Chris Lattner
11f9ff83ec
* Eliminate ArgDSNode's completely, now rely on scalar map
...
* Fold call nodes that are indistinguishable for each other. This is a big
win for external functions like sqrt, which would multiply dramatically
before.
* Global nodes with no edges to or from them are now eliminated from the graph.
llvm-svn: 2257
2002-04-16 03:44:03 +00:00
Chris Lattner
e673eb0d73
* Eliminate ArgDSNode's completely, rely now on Scalar map
...
llvm-svn: 2256
2002-04-16 03:41:22 +00:00
Chris Lattner
c004e8f534
run an extra pass after a function has been transformed to eliminate
...
obviously duplicate loads of the pool base.
llvm-svn: 2255
2002-04-15 22:42:23 +00:00
Chris Lattner
9799e40136
Only print debug message if DEBUG_RA is on
...
llvm-svn: 2254
2002-04-15 22:41:48 +00:00
Chris Lattner
572d298aa6
Only emit message if DEBUG_RA is on
...
llvm-svn: 2252
2002-04-15 20:36:15 +00:00
Chris Lattner
1923a5cfaa
Eliminate cast of same type instructions.
...
llvm-svn: 2251
2002-04-15 19:45:29 +00:00
Chris Lattner
bd8fdf2d57
* s/Method/Function
...
* Add/allow callbacks for module,function, & basic block visiting
llvm-svn: 2250
2002-04-15 19:32:36 +00:00
Chris Lattner
c1442592fb
Checkin first unit testcases for the backend
...
llvm-svn: 2249
2002-04-14 06:23:00 +00:00
Chris Lattner
2e20403fad
* s/Method/Function
...
* Fix bug where the character after a % was being discarded
llvm-svn: 2248
2002-04-14 06:15:24 +00:00
Chris Lattner
983272ba58
Turn off debug output
...
llvm-svn: 2247
2002-04-14 06:14:41 +00:00
Chris Lattner
65dd63d712
s/Method/Function
...
llvm-svn: 2246
2002-04-14 06:14:15 +00:00
Chris Lattner
a7184775f4
Update documentation a LOT, make it more accurate and match current model
...
better. Still more room for improvement.
llvm-svn: 2245
2002-04-14 06:13:44 +00:00