Commit Graph

415 Commits

Author SHA1 Message Date
Chris Lattner
4387370c1c Factor parentness out of Module & GlobalVariable into GlobalValue
Implement SymbolTable debug/dump utility


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@710 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 19:28:15 +00:00
Chris Lattner
6a57baa295 Rename getNullPointer to getNull
Allow sharing of null pointer constants


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@709 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 15:39:36 +00:00
Chris Lattner
ef9c23f281 * Both Method & GlobalVariable now subclass GlobalValue
* ConstPoolPointerReference now represents a pointer to a GlobalValue
* Methods name references are now explicit pointers to methods
* Rename Value::GlobalVal to Value::GlobalVariableVal to avoid confusion


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@703 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 14:53:21 +00:00
Chris Lattner
f4ba6c710c First try at a horrible global value reference wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@701 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 06:12:09 +00:00
Chris Lattner
b00c582b6d Commit more code over to new cast style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@697 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-02 03:41:24 +00:00
Chris Lattner
1d87bcf490 Convert more code to use new style casts
Eliminate old style casts from value.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@696 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 20:11:19 +00:00
Chris Lattner
cfe26c930a Add more support for new style casts
Convert more code to use them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@695 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 18:26:53 +00:00
Chris Lattner
9636a91649 Add support for new style casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@694 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 16:18:37 +00:00
Chris Lattner
f0604b84c7 Pull predecessor and successor iterators out of the CFG*.h files, and plop them into
the BasicBlock class where they should be.  pred_begin/pred_end become methods on BasicBlock,
and the cfg namespace isn't used anymore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@691 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 13:19:53 +00:00
Chris Lattner
4cfb153316 Implement a constant pointer value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@667 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-30 20:14:07 +00:00
Chris Lattner
3ff4387113 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@664 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 22:56:31 +00:00
Chris Lattner
5efec28901 Make error report a little more useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@657 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-28 00:06:52 +00:00
Chris Lattner
c04bf0724a Okay, make the member function work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@643 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-19 14:09:25 +00:00
Chris Lattner
45f598806b Remove global debug output fns that have been superceded by a member func
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@642 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-19 14:08:53 +00:00
Chris Lattner
bcbb6b3fac Fix up code a bit, remove operator<< to Assembly/Writer.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@628 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 17:03:59 +00:00
Vikram S. Adve
5efa3ccbd1 Moved DebugValue to Value.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@606 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 12:48:16 +00:00
Vikram S. Adve
bb6a8c0849 Added debugging support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@605 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 12:44:41 +00:00
Chris Lattner
7f5ef148b0 Remove the unsized array constraint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@599 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 04:38:32 +00:00
Chris Lattner
d70684f758 Add support for global constants, and for initializers for constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@598 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-18 04:01:05 +00:00
Chris Lattner
46cbff625e Chris seems fond of #include <vector>. Fix these. Also convert use list in
Value to a vector instead of a list.

Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@572 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 16:56:32 +00:00
Chris Lattner
ca24d381e7 Use correct style casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@545 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:11:44 +00:00
Chris Lattner
243f1f7315 Use correct style casts
Types are not all constant now


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@544 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:11:28 +00:00
Chris Lattner
b0e4523624 Add support for printing globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@537 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 20:08:19 +00:00
Chris Lattner
70cc3397f8 Implement global variable support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@530 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-10 07:58:01 +00:00
Chris Lattner
2a7eb23091 Remove the definitions of 3 global functions that don't belong in the core
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@526 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 23:02:07 +00:00
Chris Lattner
74c2b7633f Rename contype to subtype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@522 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 22:26:58 +00:00
Chris Lattner
167ed34a1f Rename file to be consistent with header name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@519 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 21:59:43 +00:00
Chris Lattner
82072d4743 Clean up Type class by removing mutable ConstRules member and use annotations insead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@516 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 21:02:38 +00:00
Chris Lattner
14712a6abf Clean up ConstRules stuff to use annotations instead of a mutable member in Type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@515 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 21:01:20 +00:00
Chris Lattner
78914e772f Convert ConstRules to use annotations to clean it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@514 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-09 21:00:23 +00:00
Chris Lattner
a361ba2ca0 Moved functionality into the other constant pool stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@477 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 18:00:19 +00:00
Chris Lattner
bc7a95eb7a Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@467 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:57:29 +00:00
Chris Lattner
36bd82aa47 Support abstract types
Remove constant pool support


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@466 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:57:07 +00:00
Chris Lattner
c038a2f953 Support a abstract, opaque, and recursive types
Remove lockty, remove fillerty
Make type lookup more efficient
Support shared generic factory code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@465 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:56:42 +00:00
Chris Lattner
2fd4413a7e Types and constnats are wierd objects in the symtabs
Support abstract types in symtab


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@464 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:48:17 +00:00
Chris Lattner
9cb66f7e67 Modules must have a valid, nonnull type. Make them void
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@463 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:47:42 +00:00
Chris Lattner
7c43a0ace7 Support new setName interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@462 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:47:18 +00:00
Chris Lattner
e05bf2f49c * Support new setname interface
* Add assertion for sanity checking


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@461 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:47:03 +00:00
Chris Lattner
531daef154 * Cnstants are now global objects
* ConstantPools no longer exist
* Constants are global objects in the LLVM system
* Constants are structurally equilivant if they are pointer equilivant
* Support abstract & opaque types
* Support setName on constants even though they don't track names
* Constnats don't get copy ctors anymore
* ConstPoolVal::equals is no longer useful [use ptr equivalency]
* Support generic factory classes to create and maintain constants


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@460 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:46:31 +00:00
Chris Lattner
6892b126e3 Support new setName itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@459 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:44:17 +00:00
Chris Lattner
311611079b * Support global constants
* Eliminate need for constant pool


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@451 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:40:34 +00:00
Chris Lattner
007377f381 * Assembly writer is not a module analyzer anymore
* There is no constant pool anymore


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@447 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:36:04 +00:00
Chris Lattner
85b0bb175f Remove #include of nonexistant header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@443 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:32:10 +00:00
Chris Lattner
9a29790a6b * Slot calc is now simpler and not based on module analyzer.
* Add new SC_DEBUG option to enable debugging of why stuff doesn't work


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@442 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:31:52 +00:00
Chris Lattner
539a4bf4b5 You no longer have to delete constants! They are located in a global
constant pool instead of in local ones.

Change bool handling to prevent modification of bool values


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@436 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:29:18 +00:00
Vikram S. Adve
402ace79fc *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@390 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-28 22:35:21 +00:00
Chris Lattner
e37dbf843d Remove target specific stuff from Type classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@383 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-27 15:52:13 +00:00
Chris Lattner
b5d2f1db8c Remove target specific method from MemAccessInst class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@382 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-27 15:51:43 +00:00
Chris Lattner
1b5499bbb8 Make sure noone branches to the entry node of the method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-24 14:56:34 +00:00
Chris Lattner
384e5b1595 Handle case where there is no exit node from a flowgraph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-23 17:07:19 +00:00
Chris Lattner
9407be443e Changed an assertion message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364 91177308-0d34-0410-b5e6-96231b3b80d8
2001-08-23 17:06:38 +00:00
Vikram S. Adve
b63933975f Added vector of machine instructions for the basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-30 18:47:24 +00:00
Chris Lattner
ca112b361e Remove some gross stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@328 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 17:52:53 +00:00
Chris Lattner
3868521e22 Allow vararg method types with 0 fixed types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 17:52:35 +00:00
Chris Lattner
36e4b8aec4 Make error msg nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 17:52:14 +00:00
Chris Lattner
81e29632f7 * Fix bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-28 17:49:02 +00:00
Chris Lattner
1333ed5b4f Don't write out constants that do not have a name, they will be inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-26 16:29:38 +00:00
Chris Lattner
9b50c1578d Add an arg to insertVal to allow us to prevent builtin types from being ignored
when they are inserted.

Ignore constant values without names.  If they are used, they will be inlined.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-26 16:28:37 +00:00
Chris Lattner
e5a57ee363 Add support for extern varargs methods & varargs method calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-25 22:47:55 +00:00
Chris Lattner
57dbb3ad63 Moved inline/llvm/Tools/* to include/llvm/Support/*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-23 17:46:59 +00:00
Chris Lattner
7e583cfafe Renamed include/llvm/Codegen to include/llvm/CodeGen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 20:58:30 +00:00
Chris Lattner
f9be9a9bf1 Fix code to be in a consistent style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 20:09:07 +00:00
Chris Lattner
cfad5df977 Remove getTempValuesForMachineCode from the Instruction interface
to remove dependency on <vector>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 20:04:10 +00:00
Chris Lattner
d7fa0fdbd7 Add new ctor for ConstPoolBool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:16:08 +00:00
Chris Lattner
1a2cefcb40 Add new constructor for const pool bool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:15:26 +00:00
Chris Lattner
f59bd5331e Add support for casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:10:49 +00:00
Chris Lattner
7e314d2042 Add support for casting operators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 19:10:33 +00:00
Vikram S. Adve
8ee0064983 Utility routines for simpler access to the value of an integer constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:44:00 +00:00
Vikram S. Adve
a4e6f88fbb Add isIntegral() method to SignedIntType and UnsignedIntType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-21 12:32:48 +00:00
Vikram S. Adve
d01d99b2a0 Compute and cache information about the storage size and layout
of structures.  This information is machine-dependent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:09:17 +00:00
Vikram S. Adve
6575a1d134 Provide uniform access to the pointer operand and to the index
operands (if any) for different types of MemAccessInst's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:07:06 +00:00
Vikram S. Adve
3344615555 Added a representation of the machine instructions generated
for a VM instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 21:05:02 +00:00
Chris Lattner
37bf6308ab Implement ensureTypeAvailable
Implement ConstPoolInt class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:16:02 +00:00
Chris Lattner
b5bcbc3bef Add support for constant propogation of multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:15:36 +00:00
Chris Lattner
622f740a7d Factor out WriteAsOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:15:21 +00:00
Chris Lattner
a137f87051 Add multiply as a supported constant propogation operation
Include the LevelChange.h header in AllOpts.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-20 19:14:41 +00:00
Chris Lattner
739a56d26d Implement forward/external declarations for methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 06:35:59 +00:00
Chris Lattner
a59c266d84 Add support for assembly printing fp constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-15 00:18:39 +00:00
Chris Lattner
a3d3c2b645 * ValueHolder now takes 3 arguments
* Added a few methods to ConstantPool
* ConstPoolVal no longer derives from Value
* Method & Module multiply inherit from SymTabValue & Value now
* Added a GetElementPtrInst::isStructSelector() method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:13:19 +00:00
Chris Lattner
54d56e3a99 The parent of a constant pool is a symtabvalue, not a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:10:33 +00:00
Chris Lattner
dc4c3f2f5f Made the following changes:
* ValueHolder became a 3 argument template.  This allows for BasicBlock to
  use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Module does not inherit from only SymTabValue.  Now it inherits from both
  STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
  in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-14 06:07:58 +00:00
Chris Lattner
d8c2e42aef Add DebugValue member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-12 23:35:26 +00:00
Chris Lattner
ab5ac6bb38 Implementation of Store & GetElementPtr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 23:22:50 +00:00
Chris Lattner
027dcc5b22 Implemented shl, shl, & load instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 21:10:27 +00:00
Chris Lattner
71496b3b50 Moved Cast from being a Unary instruction to being an "Other" instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 19:03:27 +00:00
Chris Lattner
3590830cef Fixed post dominator frontiers! Yaay!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 05:54:09 +00:00
Chris Lattner
0908309e3c Neg instruction removed. Cast instruction implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-08 04:57:15 +00:00
Chris Lattner
6bcc03143b Removing unnecesary file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 20:54:19 +00:00
Chris Lattner
9f3d27654a Convert BinaryOperand and UnaryOperator to only take instruction types of
the appropriate enum


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 20:17:23 +00:00
Chris Lattner
a41f50dea8 Broad superficial changes:
* Renamed getOpcode to getOpcodeName
* Changed getOpcodeName to return a const char * instead of string
* Added a getOpcode method to replace getInstType
* Changed code to use getOpcode instead of getInstType


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 19:24:15 +00:00
Chris Lattner
c8b25d40cb Changed the fundemental architecture of Operands for Instructions. Now
Operands are maintained as a vector<Use> in the User class, and operator
iterators are provided as before.  Getting an operand no longer requires
a virtual function call.

WARNING: getOperand(x) where x >= getNumOperands() will now assert instead
of returning null!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 08:36:50 +00:00
Chris Lattner
3fa0bc4408 Fixed some error messages to be nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-07 08:36:05 +00:00
Chris Lattner
94108ab8a3 Implement support for postdominators, except in dom frontiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-06 16:58:22 +00:00
Chris Lattner
1715229db9 Checkin of new dominator calculation routines. These will be improved in
the future to do post dominators and stuff


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-02 05:46:38 +00:00
Chris Lattner
7e02b7e600 Optimizations got their own header files
Optimizations now live in the 'opt' namespace
include/llvm/Opt was renamed include/llvm/Optimizations


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:36:40 +00:00
Chris Lattner
28bf86ac00 Implement reduceApply method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:35:40 +00:00
Chris Lattner
a7e26118a2 Add a new pop_back() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:35:21 +00:00
Chris Lattner
50d0b7ec3f Split AllOpts.h into lots of little .h files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:34:07 +00:00
Chris Lattner
7b8ec2d752 Add a check to avoid allowing V->replaceAllUsesWith(V)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:25:51 +00:00
Chris Lattner
b47af25099 Add implementation of BasicBlock::removePredecessor code that was factored
out of DCE.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:25:23 +00:00
Chris Lattner
1be1d79a1d Added a note about a new verification the verifier should do
Removed a redundant check


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-29 05:22:12 +00:00
Chris Lattner
7fc9fe3439 Miscellaneous cleanups:
* Convert post to pre-increment for for loops
  * Use generic programming more
  * Use new Value::cast* instructions
  * Use new Module, Method, & BasicBlock forwarding methods
  * Use new facilities in STLExtras.h
  * Use new Instruction::isPHINode() method


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:41:11 +00:00
Chris Lattner
8a36b31e1a Change to use the new GenericBinaryInst class. Support lots more operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:36:49 +00:00
Chris Lattner
6bb09d96a0 Add instructions to fold unary and binary instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:31:34 +00:00
Chris Lattner
17262f7784 Convert postincrements to more efficient preincrements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:28:02 +00:00
Chris Lattner
20554f11d0 Moved UnaryOperator::create to InstrTypes.cpp until there is an iUnaryOps.cpp
Moved BinaryOperator::create to iBinaryOperators.cpp
Add getUniqueName to SymbolTable


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:33:13 +00:00
Chris Lattner
3bcd6394ec * Rename get.*Operator to create seeing that it would have to be qualified
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:31:05 +00:00
Chris Lattner
28d480b316 Add a space to the PHI node output code to make it look nicer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-21 05:29:56 +00:00
Chris Lattner
ee976f3371 Updates to support
* Changes in PHI node structure


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-11 15:04:40 +00:00
Chris Lattner
c24d2088dc Updates to support
* Changes in PHI node structure
* Change to PHI syntax


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-11 15:04:20 +00:00
Chris Lattner
477c2ec3e0 Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
to the UnaryOperator class (from the Instruction class).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-08 21:30:13 +00:00
Chris Lattner
b0b0aa3849 Add extra method to PHI node class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:59:37 +00:00
Chris Lattner
b9a4578df5 Fixed to print slightly differently. Added use counts for labels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:58:55 +00:00
Chris Lattner
bbcfc51f3b Fixes for BB iterators, additional methods added for DCE pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-07 16:58:36 +00:00
Chris Lattner
009505452b Initial revision
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-06 20:29:01 +00:00