Commit Graph

176 Commits

Author SHA1 Message Date
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Chris Lattner
8a2a311939 initial checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1480 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:52:21 +00:00
Chris Lattner
c933344f1e * isFirstClassType is now provided by the Type class
* Add ReplaceInstWithInst


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1468 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:39:22 +00:00
Chris Lattner
7991c281c5 * add ReplaceInstWithInst
* Add support for pointer indexing
* Fix minor bugs that are majorly annoying


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1467 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:38:59 +00:00
Chris Lattner
38ac81cbbc Remove unsized array support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1466 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:38:04 +00:00
Chris Lattner
d554380850 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1465 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:37:52 +00:00
Chris Lattner
97ac4ee02e 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1464 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:35:53 +00:00
Chris Lattner
206ad80ef9 The proper prototype for malloc returns a pointer, not an unsized array
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1463 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:32:20 +00:00
Chris Lattner
29c147302f * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1457 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-14 16:26:05 +00:00
Chris Lattner
9102aee528 Assertion could never fail because another one would in it's place. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1449 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-13 00:45:40 +00:00
Chris Lattner
036efec1ec Implement more general conversions for getelementptr instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1432 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-07 04:40:30 +00:00
Chris Lattner
44480b52b9 Remove code that is superceeded by code in ExprTypeConvert.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1431 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-07 04:39:01 +00:00
Chris Lattner
7c3f415d99 Don't insert scales of 1 :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1430 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-07 04:26:02 +00:00
Chris Lattner
f17a09d878 We can do cast-add elimination even on casts that reinterpret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1427 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-06 18:06:13 +00:00
Chris Lattner
26a408ab9a Fix bug that caused invalid transformations to be applied
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1426 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-06 18:05:55 +00:00
Chris Lattner
4753bf21a4 Actually return true when a change has been made
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1425 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 19:41:33 +00:00
Chris Lattner
2dc48bd788 Handle more complex array indexing expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1424 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 19:41:16 +00:00
Chris Lattner
8da5d426d1 Fix pessimizations on sized arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1423 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 19:40:32 +00:00
Chris Lattner
ac0077e143 Fix a few bugs. Fix pessimization handling sized arrays
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1422 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 19:39:15 +00:00
Chris Lattner
f1d6521412 Hrm, don't do debugging output when debugging is off. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1420 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 06:40:17 +00:00
Chris Lattner
a8b6d43f2a Fixes to type conversion stuff to match induction variables more frequently
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1417 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-05 06:34:00 +00:00
Chris Lattner
ed4feac757 Fix a bug introduced by "internal linkage" work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1415 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 18:01:49 +00:00
Chris Lattner
3bf915f2a2 Fix bugs, don't do external methods which causes segv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1414 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 08:13:06 +00:00
Chris Lattner
4b770a3145 Remove printouts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1413 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 08:12:53 +00:00
Chris Lattner
394437ff7e Implement induction variable simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1411 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 04:32:29 +00:00
Chris Lattner
7a17675206 Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator   -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-04 00:03:30 +00:00
Chris Lattner
e9bb2df410 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 22:26:30 +00:00
Chris Lattner
7061dc50b2 Split the PHINode class out from the iOther.h file into the iPHINode.h file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1405 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 18:02:31 +00:00
Chris Lattner
6148c02591 Initial checkin of indvar stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1404 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 17:28:42 +00:00
Chris Lattner
c50df7e3aa Compile the scalar directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1403 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 17:28:15 +00:00
Chris Lattner
cee8f9ae67 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1400 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-27 00:03:19 +00:00
Chris Lattner
0900980cc5 Turn off debug info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1396 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:36:58 +00:00
Chris Lattner
9e00579228 Make strings be internal
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1384 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:14:33 +00:00
Chris Lattner
e81dc1dd94 Remove debugging output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1383 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:14:16 +00:00
Chris Lattner
c54692b969 Support internal linkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1382 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 19:14:03 +00:00
Chris Lattner
d4c1550cac Build IPO directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1381 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:59:30 +00:00
Chris Lattner
e4d25aad16 Implement support for internal methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1380 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:59:18 +00:00
Chris Lattner
bd70bb94d6 Include const prop as part of -raise
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1379 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:58:55 +00:00
Chris Lattner
5b7d42b142 Misc cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1377 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:57:38 +00:00
Chris Lattner
faffb053fe Expose constant propogation of an instruction in a clean way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1376 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:57:12 +00:00
Chris Lattner
30474bb929 Implement DCE of global values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1360 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 18:42:17 +00:00
Chris Lattner
7c54b4a067 Support array indexing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1345 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 17:00:43 +00:00
Chris Lattner
491b29f247 Support Composite's, not just structs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1344 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 17:00:13 +00:00
Chris Lattner
89a1c806ea losslessCastableTypes is moved to Type class
getStructOffsetType supports array indexing


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1343 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:59:47 +00:00
Chris Lattner
12739d9f87 Support selectable structure transformations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1342 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:59:10 +00:00
Chris Lattner
8090e8c18e Support mutation of array indexing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1341 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:58:33 +00:00
Chris Lattner
3cc7ddedbb Clean up code, implement array indexing stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1340 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:58:14 +00:00
Chris Lattner
a0fa588d77 Implement array indexing reverse engineering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1339 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-26 16:57:31 +00:00
Vikram S. Adve
2ed5ccd512 Print incoming arguments and return values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1315 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 15:00:16 +00:00
Chris Lattner
430aa9ec1c -cleangcc pass now remove type names that are never referenced and type names for pointers to primitive types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1312 91177308-0d34-0410-b5e6-96231b3b80d8
2001-11-15 04:34:46 +00:00