Commit Graph

4522 Commits

Author SHA1 Message Date
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
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
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
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
71ffba7b70 We can do cast-add elimination even on casts that reinterpret
llvm-svn: 1427
2001-12-06 18:06:13 +00:00
Chris Lattner
b1995e1e69 Fix bug that caused invalid transformations to be applied
llvm-svn: 1426
2001-12-06 18:05:55 +00:00
Chris Lattner
674394077f Actually return true when a change has been made
llvm-svn: 1425
2001-12-05 19:41:33 +00:00
Chris Lattner
8d16760c21 Handle more complex array indexing expressions
llvm-svn: 1424
2001-12-05 19:41:16 +00:00
Chris Lattner
1d244625c0 Fix pessimizations on sized arrays
llvm-svn: 1423
2001-12-05 19:40:32 +00:00
Chris Lattner
ad08d2fd8e Fix a few bugs. Fix pessimization handling sized arrays
llvm-svn: 1422
2001-12-05 19:39:15 +00:00
Chris Lattner
cd7fb504a5 Hrm, don't do debugging output when debugging is off. :(
llvm-svn: 1420
2001-12-05 06:40:17 +00:00
Chris Lattner
617aaaad86 Fixes to type conversion stuff to match induction variables more frequently
llvm-svn: 1417
2001-12-05 06:34:00 +00:00
Chris Lattner
25b151dfdf Fix a bug introduced by "internal linkage" work.
llvm-svn: 1415
2001-12-04 18:01:49 +00:00
Chris Lattner
d23d752dc5 Fix bugs, don't do external methods which causes segv.
llvm-svn: 1414
2001-12-04 08:13:06 +00:00
Chris Lattner
4c160c39b4 Remove printouts
llvm-svn: 1413
2001-12-04 08:12:53 +00:00
Chris Lattner
91daaabb56 Implement induction variable simplification
llvm-svn: 1411
2001-12-04 04:32:29 +00:00
Chris Lattner
2413b160ec Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()

llvm-svn: 1408
2001-12-04 00:03:30 +00:00
Chris Lattner
3462ae3ad7 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
fb5ae02e1a Split the PHINode class out from the iOther.h file into the iPHINode.h file
llvm-svn: 1405
2001-12-03 18:02:31 +00:00
Chris Lattner
476e6df794 Initial checkin of indvar stuff
llvm-svn: 1404
2001-12-03 17:28:42 +00:00
Chris Lattner
f55d8013d9 Compile the scalar directory
llvm-svn: 1403
2001-12-03 17:28:15 +00:00
Chris Lattner
5de2204fe8 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
54d5928569 Turn off debug info
llvm-svn: 1396
2001-11-26 19:36:58 +00:00
Chris Lattner
302014f2e7 Make strings be internal
llvm-svn: 1384
2001-11-26 19:14:33 +00:00
Chris Lattner
1416a2992e Remove debugging output
llvm-svn: 1383
2001-11-26 19:14:16 +00:00
Chris Lattner
4219baafb5 Support internal linkage
llvm-svn: 1382
2001-11-26 19:14:03 +00:00
Chris Lattner
660c2f0e6f Build IPO directory
llvm-svn: 1381
2001-11-26 18:59:30 +00:00
Chris Lattner
22fd21ed16 Implement support for internal methods
llvm-svn: 1380
2001-11-26 18:59:18 +00:00
Chris Lattner
ee568eb459 Include const prop as part of -raise
llvm-svn: 1379
2001-11-26 18:58:55 +00:00
Chris Lattner
c4ad64cb9c Misc cleanups
llvm-svn: 1377
2001-11-26 18:57:38 +00:00
Chris Lattner
1f86880af4 Expose constant propogation of an instruction in a clean way
llvm-svn: 1376
2001-11-26 18:57:12 +00:00
Chris Lattner
bd422e6686 Implement DCE of global values
llvm-svn: 1360
2001-11-26 18:42:17 +00:00
Chris Lattner
330dc57305 Support array indexing
llvm-svn: 1345
2001-11-26 17:00:43 +00:00
Chris Lattner
c43c461ca6 Support Composite's, not just structs
llvm-svn: 1344
2001-11-26 17:00:13 +00:00
Chris Lattner
03386ec88b losslessCastableTypes is moved to Type class
getStructOffsetType supports array indexing

llvm-svn: 1343
2001-11-26 16:59:47 +00:00
Chris Lattner
2cc6d418fa Support selectable structure transformations
llvm-svn: 1342
2001-11-26 16:59:10 +00:00
Chris Lattner
f80013a917 Support mutation of array indexing
llvm-svn: 1341
2001-11-26 16:58:33 +00:00
Chris Lattner
f9378e7d2d Clean up code, implement array indexing stuff
llvm-svn: 1340
2001-11-26 16:58:14 +00:00
Chris Lattner
1df615c834 Implement array indexing reverse engineering
llvm-svn: 1339
2001-11-26 16:57:31 +00:00
Vikram S. Adve
b601fda7ce Print incoming arguments and return values.
llvm-svn: 1315
2001-11-15 15:00:16 +00:00
Chris Lattner
02c43c8609 -cleangcc pass now remove type names that are never referenced and type names for pointers to primitive types.
llvm-svn: 1312
2001-11-15 04:34:46 +00:00
Chris Lattner
1237e86597 Remove much cruft from the MemAccessInst instruction
llvm-svn: 1298
2001-11-14 11:27:58 +00:00
Chris Lattner
abf40ba6e8 Better heuristics for handling arrays
llvm-svn: 1296
2001-11-14 11:02:49 +00:00
Chris Lattner
0cd962fa61 * Change ExpressionConvertableToType to more closely match map behavior of
ConvertExpressionToType
* Make ValueHandle's remove instruction from maps when they are deleted so that
  no false map hits occur if a subsequent instruction is allocated to the same
  space in memory.  This was a VERY VERY VERY EVIL NASTY BUG to track down. :-P

llvm-svn: 1288
2001-11-13 05:01:36 +00:00
Chris Lattner
4f8e9468cb Avoid assertion failure when taking size of unsized array. Todo item herE
llvm-svn: 1286
2001-11-13 04:59:41 +00:00