Commit Graph

92 Commits

Author SHA1 Message Date
Chris Lattner
9148ad3099 Make Module annotable. Reid has a bunch of code that depends on this, and
we really don't win that much by eliminating this (not many Modules are
allocated), so it's not worth it.  When we can, we should revisit this in
the future.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12023 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-01 01:25:37 +00:00
Chris Lattner
61f57fae7a Module does not need to be annotatable aka annotable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-29 19:27:55 +00:00
Chris Lattner
3f804530c7 Add some comments, add a new getGlobalVariable method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10670 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 08:42:27 +00:00
Chris Lattner
6d28a268c3 * Make Module::getTypeName const
* Add new Module::getTypeByName method
* Group methods in Module.cpp better


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10668 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 07:09:33 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
072ddb1dac Expose new print methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9620 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:41:19 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
12d40d2926 Add new helper function which makes it even easier to do this sort of thing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8237 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-31 00:19:18 +00:00
Chris Lattner
a7a35a831b Allow modules to have 'any' pointer size and endianness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8117 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-24 13:46:37 +00:00
Misha Brukman
90a24c71a2 Lined things up in a more aesthetically pleasing way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7365 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-28 19:17:53 +00:00
Chris Lattner
678c6a089d Add support for tracking whether a module is 64/32 bit and big/little endian
Also add a moduleID field which can be used for diagnostics


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5834 91177308-0d34-0410-b5e6-96231b3b80d8
2003-04-22 18:02:04 +00:00
Chris Lattner
6e6026b465 - Eliminated the deferred symbol table stuff in Module & Function, it really
wasn't an optimization and it was causing lots of bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-20 18:36:02 +00:00
Chris Lattner
9a641b4bce Add a new Module::getNamedFunction method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4758 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-19 18:41:44 +00:00
Chris Lattner
a9a93f3777 Add a method "getMainFunction()" that efficiently locates 'main' in a module
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4629 91177308-0d34-0410-b5e6-96231b3b80d8
2002-11-08 20:34:02 +00:00
Chris Lattner
34048e2ace - Dramatically simplify the Constant::mutateReferences implementation,
allowing it to be called on all constant types (structures/arrays)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4160 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-14 03:30:23 +00:00
Chris Lattner
2619905926 Convert comments to Doxygen style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3507 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-25 22:54:55 +00:00
Chris Lattner
e0fbb497ee - ConstantPointerRefs are now automatically removed from the module table
when they are destroyed, which makes Constant::destroyConstant an actually
    useful external interface.  Expose these methods publicly.
  - Implement destroyConstant on ConstPointerNull so that destroyConstant can
    be used on any derived type constant safely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3378 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-18 00:39:59 +00:00
Chris Lattner
58dda9a8f2 Add Module::dump() method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3374 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-17 23:32:42 +00:00
Anand Shukla
4b244ac1b4 Add new << to allow printing modules by reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2814 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-03 16:52:15 +00:00
Chris Lattner
18961504fc *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2777 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:12:52 +00:00
Chris Lattner
dae4a36849 Include an operator<<, to print modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2358 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:56:28 +00:00
Chris Lattner
6b5689ed55 * Module's are no longer Value's
* Incorporate SymTabValue contents into the Module class


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2345 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:45:48 +00:00
Chris Lattner
f33fa6fb57 Add Module::getTypeName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2237 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-13 18:58:33 +00:00
Chris Lattner
5109f75f50 * Add virtual print methods
* s/Method/Function


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2172 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-08 21:56:02 +00:00
Chris Lattner
68e5ed8dbe Add new addTypeName method to Module class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2037 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 04:48:40 +00:00
Chris Lattner
db70a8eff3 Add getOrInsertFunction and getFunction methods to Module. This simplifies
some code in the transformations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2026 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-29 03:32:29 +00:00
Chris Lattner
21ba3fec99 Remove the reduceApply functions they are obsolete things from the days before
we had a reasonable pass system


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2022 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-28 22:49:49 +00:00
Chris Lattner
19b0411c95 Transform uses of Method into uses of Function.
Rename MethodArgument to FunctionArgument
Fix some _really_ out of date comments


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1986 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-26 17:48:08 +00:00
Chris Lattner
bcd8e03138 Remove extranous forward decl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1956 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-23 22:48:21 +00:00
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
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
c18545dc9e Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@822 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-15 13:21:42 +00:00
Chris Lattner
7502f635c6 Add support for module local constants
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@737 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:17:32 +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
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
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
640040e1cf SymTabValue no longer includes ValueHolder for Module. Include it ourself
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@423 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:20:46 +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
d180e0fda7 Add a reduceApply method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-30 04:34:42 +00:00
Chris Lattner
1020b3982c Add extra forwarding accessor methods so that getMethodList(), getBasicBlocks()
and getInstList() are obsolete... except for when modifying those lists.  This
makes code much more succinct and to the point.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-27 23:26:41 +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