Chris Lattner
64a028b47a
Initial checkin of instcombine
...
llvm-svn: 1479
2001-12-14 16:52:09 +00:00
Chris Lattner
4f106568d4
Add instruction combining pass
...
Rename -mergecons to -constmerge
llvm-svn: 1478
2001-12-14 16:50:35 +00:00
Chris Lattner
24404f8223
* Support the new -q flag for automated tests
...
* Remove unsized array support
* Add pointer indexing support
llvm-svn: 1477
2001-12-14 16:49:29 +00:00
Chris Lattner
05377bbe3f
Add more passes to run after raising
...
llvm-svn: 1476
2001-12-14 16:48:30 +00:00
Chris Lattner
eb81d53e40
Update LLVM tests to use new pointer indexing, and remove unsized array test support
...
llvm-svn: 1474
2001-12-14 16:46:53 +00:00
Chris Lattner
913fe0f5a9
Build Programs subdirectory
...
llvm-svn: 1473
2001-12-14 16:43:59 +00:00
Chris Lattner
195b8779dc
* Assert that indices are valid for an indexing instruction.
...
* Add support for indexing into pointers
* Remove support for unsized arrays
llvm-svn: 1472
2001-12-14 16:43:26 +00:00
Chris Lattner
6d6f01a488
Rename ConstPoolVals.cpp to Constants.cpp
...
llvm-svn: 1471
2001-12-14 16:42:30 +00:00
Chris Lattner
44d49e2bb8
Remove unsized array support
...
Add new SequentialType class
llvm-svn: 1470
2001-12-14 16:41:56 +00:00
Chris Lattner
bec9b0b9ef
Make strings SByte* arrays instead of UByte * arrays
...
llvm-svn: 1469
2001-12-14 16:41:18 +00:00
Chris Lattner
3655cfb4e2
* isFirstClassType is now provided by the Type class
...
* Add ReplaceInstWithInst
llvm-svn: 1468
2001-12-14 16:39:22 +00:00
Chris Lattner
9dedd32ff4
* add ReplaceInstWithInst
...
* Add support for pointer indexing
* Fix minor bugs that are majorly annoying
llvm-svn: 1467
2001-12-14 16:38:59 +00:00
Chris Lattner
b3364fc169
Remove unsized array support
...
llvm-svn: 1466
2001-12-14 16:38:04 +00:00
Chris Lattner
b457653c6f
* Support pointer indexing
...
* Unsized arrays are a thing of the past, remove DoInsertArrayCast family
* Remove cases were we would get into infinite loops because we would insert a cast
which would then be removed, inserting a different cast, ad infinitum...
* Remove some code that should be redundant with ExprTypeConvert code
llvm-svn: 1465
2001-12-14 16:37:52 +00:00
Chris Lattner
3e88b44afc
Many many changes and bugfixes:
...
* Remove support for unsized arrays
* Add pointer indexing support
* Allow more arbitrary malloc type changes (which are too generous currently
and should be fixed in the future)
* Allow more and better conversions
llvm-svn: 1464
2001-12-14 16:35:53 +00:00
Chris Lattner
11439b2360
The proper prototype for malloc returns a pointer, not an unsized array
...
llvm-svn: 1463
2001-12-14 16:32:20 +00:00
Chris Lattner
7dc20864b6
Allow pointer indexing
...
llvm-svn: 1462
2001-12-14 16:31:26 +00:00
Chris Lattner
b2b1b3d036
Remove unsized array support
...
llvm-svn: 1461
2001-12-14 16:30:51 +00:00
Chris Lattner
f4ba330416
Add pointer indexing support
...
llvm-svn: 1460
2001-12-14 16:30:09 +00:00
Chris Lattner
3cb3a1f06c
Don't waste as much horizontal space on #uses flag when printing
...
llvm-svn: 1459
2001-12-14 16:29:12 +00:00
Chris Lattner
ef99d3c144
* Fix cases where we were calling Type->getName() instead of Type->getDescription()
...
* Remove unsized array support
* Malloc/alloca do not require that the first element be an unsized array to be an
array allocation
llvm-svn: 1458
2001-12-14 16:28:42 +00:00
Chris Lattner
f1197b0d43
* Refactor trace values to work as a proper pass. Before it used to add
...
methods while the pass was running which was a no no. Now it adds the
printf method at pass initialization
* Revamp code to use printf calls instead of the old style print_<type>
calls.
* Simplify code
llvm-svn: 1457
2001-12-14 16:26:05 +00:00
Chris Lattner
7c84dc6abb
Refactor trace values to work as a proper pass. Before it used to add
...
methods while the pass was running which was a no no. Now it adds the
printf method at pass initialization
llvm-svn: 1456
2001-12-14 16:23:53 +00:00
Chris Lattner
8ddb00c804
* Remove support for unsized arrays.
...
* Free instruction does not accept a name
* MemAccessInst can now be used with cast/isa/dyn_cast/...
llvm-svn: 1455
2001-12-14 16:22:56 +00:00
Chris Lattner
8e4131077a
PointerType and ArrayType now subclass Sequential type, which contains addressability logic for indexing. Unsized arrays have been removed.
...
llvm-svn: 1454
2001-12-14 16:20:21 +00:00
Ruchira Sasanka
1a98b28bde
added a section on how to modify live variable code to use LLVM instructions
...
instead of machine instructions.
llvm-svn: 1451
2001-12-13 21:25:46 +00:00
Chris Lattner
6650d18892
Not just arrays are unsized
...
llvm-svn: 1450
2001-12-13 00:46:11 +00:00
Chris Lattner
f5c6f65e7f
Assertion could never fail because another one would in it's place. :)
...
llvm-svn: 1449
2001-12-13 00:45:40 +00:00
Chris Lattner
cdbcb1fd17
Some programs are using BB's as values, until we resolve this. Disable the assert
...
llvm-svn: 1448
2001-12-13 00:45:06 +00:00
Chris Lattner
403ff802a3
Build runtime library with local GCCAS
...
llvm-svn: 1447
2001-12-13 00:44:23 +00:00
Chris Lattner
fbf1106e2c
Implement strlen strdup strcmp
...
llvm-svn: 1446
2001-12-13 00:44:09 +00:00
Chris Lattner
60a9a23aba
Implement sprintf
...
llvm-svn: 1445
2001-12-13 00:43:47 +00:00
Chris Lattner
156344c890
Swap operands now preserves the semantics of the binary operator by changing
...
the opcode of the instruction if possible.
llvm-svn: 1444
2001-12-13 00:43:03 +00:00
Chris Lattner
25450e32c0
Add debugging to make a more useful message if a value gets constructed with a null type
...
llvm-svn: 1443
2001-12-13 00:41:27 +00:00
Chris Lattner
49e9f8e2d4
Implement some nice functions useful for looking at types
...
llvm-svn: 1442
2001-12-13 00:40:16 +00:00
Chris Lattner
15778ac793
Implement proper iterator tags
...
llvm-svn: 1441
2001-12-13 00:39:49 +00:00
Chris Lattner
e0c16866c6
Subclasses can change the opcode of an instruction
...
llvm-svn: 1440
2001-12-13 00:39:33 +00:00
Chris Lattner
e6a24c2f4d
Constants KNOW they are of a derived type
...
llvm-svn: 1439
2001-12-13 00:38:57 +00:00
Vikram S. Adve
45ea2fd95e
Added TRACEM option. Use -g when building native code for tests.
...
llvm-svn: 1438
2001-12-12 15:19:55 +00:00
Ruchira Sasanka
c34f500f71
Documentation (draft) for reg alloc
...
llvm-svn: 1437
2001-12-09 20:21:49 +00:00
Chris Lattner
a6f3071b05
Use _LOCAL_ gccas to build instead of Chris's
...
llvm-svn: 1436
2001-12-09 16:55:43 +00:00
Ruchira Sasanka
4552ee447a
Added more comments. Added code to destructor in MethodLiveVarInfo to delete
...
LiveVarSet caches.
llvm-svn: 1435
2001-12-08 21:05:27 +00:00
Ruchira Sasanka
565a5c423d
Added comments are more documentation info
...
llvm-svn: 1434
2001-12-08 21:04:22 +00:00
Chris Lattner
5053ba9749
Tell the user if a file is corrupt or not... not that the file cannot be
...
found.
llvm-svn: 1433
2001-12-08 20:31:32 +00:00
Chris Lattner
e51379766b
Implement more general conversions for getelementptr instructions
...
llvm-svn: 1432
2001-12-07 04:40:30 +00:00
Chris Lattner
dae4d63ddf
Remove code that is superceeded by code in ExprTypeConvert.cpp
...
llvm-svn: 1431
2001-12-07 04:39:01 +00:00
Chris Lattner
72da4460b3
Don't insert scales of 1 :)
...
llvm-svn: 1430
2001-12-07 04:26:02 +00:00
Chris Lattner
a57615faaa
Run DCE before cleanupGCCoutput which will cause some dead types (like FILE) to be removed
...
llvm-svn: 1429
2001-12-07 04:25:36 +00:00
Chris Lattner
7af2be143d
Do not pessimize users of this function. Fix logic.
...
llvm-svn: 1428
2001-12-06 18:06:37 +00:00
Chris Lattner
71ffba7b70
We can do cast-add elimination even on casts that reinterpret
...
llvm-svn: 1427
2001-12-06 18:06:13 +00:00