Commit Graph

266 Commits

Author SHA1 Message Date
Chris Lattner a9e1535afc * Add debug support for PATypeHolder
* PATypeHolder is now not a template

llvm-svn: 2108
2002-04-04 19:26:02 +00:00
Chris Lattner 1be6266721 Make the release build compile
llvm-svn: 2107
2002-04-04 19:24:48 +00:00
Chris Lattner 8cb8e4608c Add a new replaceWith method useful for replacing instructions
llvm-svn: 2088
2002-04-01 17:52:16 +00:00
Chris Lattner 3e6e3e6bce * s/Method/Function
* Implement a check to make sure a function is not internal and external
  at the same time

llvm-svn: 2050
2002-03-29 19:06:18 +00:00
Chris Lattner 5c1f41eb97 Add an insert method to VAlueHolder to allow batch insertion
llvm-svn: 2038
2002-03-29 05:49:37 +00:00
Chris Lattner 13ae72f175 Add new addTypeName method to Module class
llvm-svn: 2037
2002-03-29 04:48:40 +00:00
Chris Lattner 91db58298a s/Method/Function
llvm-svn: 2034
2002-03-29 03:44:36 +00:00
Chris Lattner a483b0616a Implement new getFunction and getOrInsertFunction methods
llvm-svn: 2033
2002-03-29 03:44:18 +00:00
Chris Lattner cd8846ff84 Remove the reduceApply functions they are obsolete things from the days before
we had a reasonable pass system

llvm-svn: 2022
2002-03-28 22:49:49 +00:00
Chris Lattner 57698e2c0b Change references from Method to Function
change references from MethodARgument to FunctionArgument

llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner 4e8c4877aa Rename Method to Function
llvm-svn: 1957
2002-03-23 22:51:58 +00:00
Chris Lattner 220ef17a9e Add an assertion that would hopefully catch a problem that was tripping
cameron up

llvm-svn: 1944
2002-03-22 18:01:58 +00:00
Chris Lattner eae5096ebd * AllocationInst ctor moved here from iMemory.h
* AllocationInst now always has an array size operand

llvm-svn: 1939
2002-03-21 22:37:48 +00:00
Chris Lattner 25c8f60b0a Add an assertion to catch a misuse of replaceAllUsesWith
llvm-svn: 1924
2002-03-21 05:38:15 +00:00
Chris Lattner de421a7993 Make an assertion provide a more helpful error message
llvm-svn: 1883
2002-03-17 21:16:01 +00:00
Chris Lattner fbf5be52c3 Checkin new test for problem anand ran into
llvm-svn: 1880
2002-03-15 20:25:09 +00:00
Chris Lattner 7704e9f337 Add a check to ensure that only PHI nodes are self referential. Code
input to instruction combination was broken, which caused it to explode.

llvm-svn: 1870
2002-03-14 16:53:48 +00:00
Chris Lattner 9818bab2dc * Add new method localLookup
* SymbolTable::remove(Value *N) checks to see if we are internally
  inconsistent before looking for a type plane (caused a crash)
* insertEntry now does a local lookup instead of a global lookup, which was
  causing an infinite loop in the renamer logic.
* Added assertions to make sure stuff stays happy
* Now the linker correctly links the SPECINT2000 mcf benchmark

llvm-svn: 1840
2002-03-08 20:26:17 +00:00
Chris Lattner b67f732b8c Expose more entry points to the verifier
llvm-svn: 1815
2002-02-26 21:45:33 +00:00
Chris Lattner 4eed0b8390 Fix bug: test/Regression/Other/2002-02-24-InlineBrokePHINodes.ll
llvm-svn: 1798
2002-02-25 00:35:07 +00:00
Chris Lattner 43373a6868 Make it compile with GCC 3.0.4
llvm-svn: 1786
2002-02-24 23:01:21 +00:00
Chris Lattner d02f08dec9 Actually implement some checking in the verifier.
These specific problems were ones Anand ran into in his work and seem not
uncommon for beginners.

llvm-svn: 1781
2002-02-20 17:55:43 +00:00
Chris Lattner 480fa41d2c Fix isArrayAllocation() to be correct
llvm-svn: 1779
2002-02-19 21:24:17 +00:00
Chris Lattner 83d485b310 * Pull BasicBlock::pred_* and BasicBlock::succ_* out of BasicBlock.h and into
llvm/Support/CFG.h
* Make pred & succ iterators for intervals global functions
* Add #includes that are now neccesary because BasicBlock.h doesn't include
  InstrTypes.h anymore

llvm-svn: 1750
2002-02-12 22:39:50 +00:00
Chris Lattner 60a6591d83 Method.h no longer includes BasicBlock.h
Method::inst_* is now in llvm/Support/InstIterator.h
GraphTraits specializations for BasicBlock and Methods are now in llvm/Support/CFG.h

llvm-svn: 1746
2002-02-12 21:07:25 +00:00
Chris Lattner a2b661f764 Remove generic routines to Support/SetOperations.h
llvm-svn: 1715
2002-02-05 03:35:31 +00:00
Chris Lattner 4b361376f0 Switch from MachineCodeForVMInstr model that is built into the VMCore library to an annotation based MAchineCodeForInstruction model
Instruction.cpp now has 0 lines of code generation related code in it.

llvm-svn: 1658
2002-02-03 07:52:58 +00:00
Chris Lattner f2f31bdfb5 Add more debug output
llvm-svn: 1627
2002-02-01 04:53:36 +00:00
Chris Lattner ac3e060c59 * Make debugging output nicer
* Implement pass memory freeing after the pass is unused
* Expose PassManager typedef in Pass.h instead of PassManager.h

llvm-svn: 1617
2002-01-31 18:32:27 +00:00
Chris Lattner a5e103a2ae Provide the right AnalysisID for postdominators
llvm-svn: 1616
2002-01-31 18:29:24 +00:00
Chris Lattner cdd09c2c17 Implement new pass framework
llvm-svn: 1606
2002-01-31 00:45:31 +00:00
Chris Lattner ccf571a408 Convert analyses to new pass structure
llvm-svn: 1603
2002-01-31 00:42:27 +00:00
Chris Lattner 2eaac39d9e Fix bug where we didn't initialize and finalize basic block passes
llvm-svn: 1599
2002-01-31 00:40:44 +00:00
Chris Lattner 67d256568f Checkin new pass framework. This one is more useful and automatically
creates analysis results for passes that need them.   MethodPass's never
have to worry about being invoked on external methods.

llvm-svn: 1594
2002-01-30 23:20:39 +00:00
Chris Lattner d5851db315 Remove extraneous #includes
llvm-svn: 1588
2002-01-26 22:47:32 +00:00
Chris Lattner 36faf3a99c This checkin fixes the bug described in:
test/Regression/Assembler/2002-01-24-BadSymbolTableAssert.ll

llvm-svn: 1583
2002-01-25 03:56:34 +00:00
Chris Lattner 67e5c29ae4 Check in fix for bug: test/Regression/Assembler/ValueRefineAbsType.ll
llvm-svn: 1582
2002-01-25 03:45:27 +00:00
Chris Lattner d013ba96a9 * Expose new command line arg --debug-pass for gccas and llc debugging
* Remember to initialize MethodPassBatcher::BBPBatcher instance var in ctor
* Move PassManager::run() from header file

llvm-svn: 1556
2002-01-23 05:49:41 +00:00
Chris Lattner 9c56a28309 Oops, misnamed function, didn't override correctly, drat.
llvm-svn: 1528
2002-01-22 03:30:25 +00:00
Chris Lattner 654b5bc77a Ooops, forgot to implement void PassManager::add(BasicBlockPass *BBP)
llvm-svn: 1523
2002-01-22 00:17:48 +00:00
Chris Lattner ee965abc36 Move stuff out of the Optimizations directories into the appropriate Transforms
directories.  Eliminate the opt namespace.

llvm-svn: 1520
2002-01-21 23:17:48 +00:00
Chris Lattner d9f1ab2077 Pull stuff out of opt namespace
llvm-svn: 1511
2002-01-21 21:44:38 +00:00
Chris Lattner 26e4f89419 Implementation of the new spiffy pass system
llvm-svn: 1508
2002-01-21 07:37:31 +00:00
Chris Lattner 7f74a56e24 Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Vikram S. Adve ecce65a4ba Eliminate function getIndicesBROKEN().
llvm-svn: 1486
2001-12-15 00:37:12 +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 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 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 7af2be143d Do not pessimize users of this function. Fix logic.
llvm-svn: 1428
2001-12-06 18:06:37 +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 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 7a787227d8 Implement internal
llvm-svn: 1385
2001-11-26 19:14:56 +00:00
Chris Lattner 841d8b9e50 Implement support for internal methods
llvm-svn: 1373
2001-11-26 18:54:16 +00:00
Chris Lattner a88403bf31 Fix a bad assertion to be correct . The root basic block can be used by PHI nodes.
llvm-svn: 1370
2001-11-26 18:52:02 +00:00
Chris Lattner 3b30570f9a Support Array Indexing
llvm-svn: 1348
2001-11-26 17:02:05 +00:00
Chris Lattner 1c5e8f5d58 Implement: isLosslesslyConvertableTo and new CompositeType base class
llvm-svn: 1347
2001-11-26 17:01:47 +00:00
Chris Lattner f87b579b9d If a name conflict occurs when inserting a value, rename it.
llvm-svn: 1346
2001-11-26 17:01:18 +00:00
Chris Lattner 99ed5fb28d Minor style cleanups
llvm-svn: 1287
2001-11-13 04:59:58 +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 3b7199e36c Add #includes to enable buiding in Release mode
llvm-svn: 1174
2001-11-07 13:49:45 +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 68289f0b89 Add notes
llvm-svn: 1163
2001-11-06 22:53:11 +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 9d3292d327 Give me PHI's space back
llvm-svn: 1150
2001-11-06 08:33:46 +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 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 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 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 977f0044fc Implement constant propogation of null pointer values.
llvm-svn: 1078
2001-11-01 05:55:13 +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 ff2a07f4df Initialize isRecursive. Found by Purify
llvm-svn: 1043
2001-10-30 16:39:16 +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 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 239a1bdfe1 Remove C string capability from VMCore library. Move to Support
llvm-svn: 1021
2001-10-29 13:27:09 +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
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 aeaec1ccb9 Remove unnamed prototypes that are created.
llvm-svn: 964
2001-10-23 15:30:18 +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
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 4e594bebba Added MachineCodeForMethod object in class Method.
llvm-svn: 949
2001-10-22 13:52:47 +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 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 b6fe2345f1 Fix shift printing when using a ubyte LHS
llvm-svn: 925
2001-10-20 09:33:10 +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
Chris Lattner 162ed4d6cc Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner 78e11ae816 Oops, didn't handle hex values correctly. :(
llvm-svn: 815
2001-10-15 00:05:03 +00:00
Chris Lattner 8f80fe0bfd * Fix the constpoolarray -> c"" printing routines to escape things properly
* Fix slightly broken sharing problems
* Do not escape the literal string passed in

llvm-svn: 814
2001-10-14 23:54:12 +00:00
Vikram S. Adve 34410432da Added routine to create a char array for a string.
Also, print char arrays as strings.

llvm-svn: 799
2001-10-14 23:17:20 +00:00
Chris Lattner cc17a7af5a Implement the invoke instruction
llvm-svn: 774
2001-10-13 07:01:45 +00:00
Chris Lattner 74a0151acb * Fix a nefarious bugs: TypesEqual was wrong for varargs methods
* MethodType::get now takes a literal isVarArg method argument
* Use new style casts

llvm-svn: 773
2001-10-13 07:01:33 +00:00