1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

479 Commits

Author SHA1 Message Date
Chris Lattner
82f54dca49 - Change Function's so that their argument list is populated when they are
constructed.  Before, external functions would have an empty argument list,
    now a Function ALWAYS has a populated argument list.

llvm-svn: 4149
2002-10-13 20:57:00 +00:00
Chris Lattner
4e19009255 Global variables are now external if they don't have initializers, not
"uninitialized"

llvm-svn: 4052
2002-10-06 22:48:09 +00:00
Chris Lattner
94a5211b6a - Print the predecessors of a basic block instead of the number of uses of
the block in the AsmWriter

llvm-svn: 4019
2002-10-02 19:38:55 +00:00
Chris Lattner
a63519afc8 Add support for printing constpointerrefs more nicely
llvm-svn: 3654
2002-09-10 15:53:49 +00:00
Chris Lattner
e63ef1c3ab Changed parser to always use parenthesis on ConstExprs to be consistent
llvm-svn: 3363
2002-08-16 21:17:11 +00:00
Chris Lattner
0d1bc11665 Write constexpr casts using the cast X to Y notation, not using the implicit
type result

llvm-svn: 3354
2002-08-15 19:37:43 +00:00
Chris Lattner
8adb533609 Fix bug: test/Regression/Assembler/2002-07-31-SlashInString.llx
llvm-svn: 3195
2002-07-31 23:56:44 +00:00
Chris Lattner
1720a4c0b7 Cleanup ConstantExpr handling:
* Correctly delete TypeHandles in AsmParser.  In addition to not leaking
   memory, this prevents a bug that could have occurred when a type got
   resolved that the constexpr was using
 * Check for errors in the AsmParser instead of hitting assertion failures
   deep in the code
 * Simplify the interface to the ConstantExpr class, removing unneccesary
   parameters to the ::get* methods.
 * Rename the 'getelementptr' version of ConstantExpr::get to
   ConstantExpr::getGetElementPtr

llvm-svn: 3161
2002-07-30 18:54:25 +00:00
Chris Lattner
7a9eb848cd * Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
  are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses

llvm-svn: 3113
2002-07-26 21:12:46 +00:00
Chris Lattner
32f5f52f92 Fix typeo that caused bug:
test/Regression/Assembler/2002-07-25-ReturnPtrFunction.llx

llvm-svn: 3103
2002-07-25 20:58:51 +00:00
Chris Lattner
2aa4420d83 Fix bug: test/Regression/Assembler/2002-07-25-QuoteInString.llx
llvm-svn: 3099
2002-07-25 20:32:37 +00:00
Chris Lattner
cc707df01a Register Writer passes
llvm-svn: 3017
2002-07-23 18:07:49 +00:00
Vikram S. Adve
ca1f1c58e1 Added support to write out ConstantExpr nodes.
Also, avoid asserting out when writing out an invalid tree
since the assembly writer is used when debugging.

llvm-svn: 2902
2002-07-14 23:14:45 +00:00
Chris Lattner
c27a459095 *** empty log message ***
llvm-svn: 2852
2002-07-10 16:48:17 +00:00
Chris Lattner
dfd421a7df MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
365806ddf7 Support opaque type printing a little bit at least
llvm-svn: 2748
2002-05-26 20:17:54 +00:00
Chris Lattner
37107da53e Print out function name with % style instead of "" style
llvm-svn: 2726
2002-05-22 22:29:26 +00:00
Chris Lattner
f7333e31a1 Avoid emitting a useless comment for a basic block with no uses (which
often happens for the entry basic block of a function)

llvm-svn: 2624
2002-05-14 16:02:05 +00:00
Chris Lattner
dfb7d63b15 Print functions with curly braces instead of begin/end
llvm-svn: 2469
2002-05-06 03:00:40 +00:00
Chris Lattner
bbd002a9ca The implementation keyword is no longer neccesary
llvm-svn: 2434
2002-05-02 19:11:29 +00:00
Chris Lattner
a2c59f1302 Changes so that iMemory.h doesn't include DerivedTypes.h
llvm-svn: 2404
2002-04-29 18:46:50 +00:00
Chris Lattner
96e0c48175 Eliminate duplicate or unneccesary #include's
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
c760a6a4f4 Todo has been implemented, remove it
llvm-svn: 2387
2002-04-28 21:45:02 +00:00
Chris Lattner
321a8cf4ba Split ConstantVals.h into Constant.h and Constants.h
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
07da09cd34 Module's are no longer values
llvm-svn: 2354
2002-04-28 04:51:09 +00:00
Chris Lattner
f1dee31d23 Pull all of the getStrValue implementation cruft out of Constants.cpp and
put it into the AsmWriter.  This code is kinda gross and could probably be
cleaned up, but not now.

llvm-svn: 2299
2002-04-18 18:53:13 +00:00
Chris Lattner
10c22c6970 Changes to:
* Fix bug printing method types (oops when converting previous code)
* Move some of the code from Constant::getStrValue implementations here.
  This allows us to do a MUCH MUCH better job printing out complex constant
  values (think an array of structure pointers), because we print symbolic
  type names instead of structural.  The assistance when debugging is immense

Eventually, Constant::getStrValue should be removed (it existed before because
the asmwriter file was not in VMCore), and everyone should go through the
asmwriter that want's equivalent functionality.

llvm-svn: 2268
2002-04-16 21:36:08 +00:00
Chris Lattner
c0505e8d4e Minor bugfix for previous checkin
llvm-svn: 2241
2002-04-13 21:11:04 +00:00
Chris Lattner
5496a44cc2 * Remove obselete code for unsized arrays
* Add new function printTypeAtLeastOneLevel used to...
* Print the symbol table *WITH SYMBOLIC TYPES*.  Now we get:
       %tree = type { int, %tree*, %tree* }
  in the type definition section of the disassembled output instead of
       %tree = type { int, \2*, \2* }
  the different for the health benchmark and power are simply amazing.

llvm-svn: 2240
2002-04-13 20:53:41 +00:00
Chris Lattner
a4bce481d6 * Clean up code to use isa & dyncast instead of poking directly into instructions
* Do not print the allocation size for a non array allocation (this used to work,
  but was broken).

llvm-svn: 2235
2002-04-13 18:34:38 +00:00
Chris Lattner
d1d6edad49 * Add comment
* Do not print a space before the * in a pointer type.

llvm-svn: 2232
2002-04-12 18:21:53 +00:00
Chris Lattner
5e12c7caf5 Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument.

llvm-svn: 2216
2002-04-09 19:48:49 +00:00
Chris Lattner
5046c084ec * Narrow AsmWriter interface
* Implement Value::print methods here instead of WriteToAssembly

llvm-svn: 2179
2002-04-08 22:03:40 +00:00
Chris Lattner
137fa92dce * Move include/llvm/Analysis/SlotCalculator.h to include/llvm/SlotCalculator.h
because the slot calculator is already part of the VMCore library.
* Rename incorporateMethod and purgeMethod to *Function

llvm-svn: 2154
2002-04-07 22:49:37 +00:00
Chris Lattner
c994519230 Update comments
Implement Value::dump here.

llvm-svn: 2148
2002-04-07 22:31:46 +00:00
Chris Lattner
084601e6f4 s/Method/Function
llvm-svn: 2034
2002-03-29 03:44:36 +00:00
Chris Lattner
849c762b02 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
3dc9a2a61f Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
2cd50171de 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
c4a5815033 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
f6b7da2bb5 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
bcf2df7058 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
463cc31132 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
2a1613d3b2 Implement support for internal methods
llvm-svn: 1373
2001-11-26 18:54:16 +00:00
Chris Lattner
3aeffe685c 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
69d20ed13e Print out the abridged form of the call instruction.
llvm-svn: 1159
2001-11-06 21:28:12 +00:00
Chris Lattner
a797d17ed7 Give me PHI's space back
llvm-svn: 1150
2001-11-06 08:33:46 +00:00
Chris Lattner
c75cb61a5d Print PHI nodes with zero operands even if they are illegal
llvm-svn: 1145
2001-11-06 01:48:45 +00:00
Chris Lattner
a9dacc1925 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
ee3536a8e6 Fix blatent bugs in checkin
llvm-svn: 1032
2001-10-29 16:40:32 +00:00
Chris Lattner
2c6b9de3ca 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
29a0fa2839 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
65647505e2 Fix shift printing when using a ubyte LHS
llvm-svn: 925
2001-10-20 09:33:10 +00:00
Chris Lattner
ecd7a98aad * Support writing GlobalVariables with info comments by them
* Print out prototypes correctly in cases that we weren't before
* Use new style casts more
* Support printing new invoke instruction

llvm-svn: 759
2001-10-13 06:42:36 +00:00
Chris Lattner
a01eda3091 * 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

llvm-svn: 703
2001-10-03 14:53:21 +00:00
Chris Lattner
08b1dde37e Commit more code over to new cast style
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
ad1b0a1a83 Convert more code to use new style casts
Eliminate old style casts from value.h

llvm-svn: 696
2001-10-01 20:11:19 +00:00
Chris Lattner
4c684cde80 Add more support for new style casts
Convert more code to use them

llvm-svn: 695
2001-10-01 18:26:53 +00:00
Chris Lattner
43781f1f96 Add support for new style casts
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Vikram S. Adve
bf084ec2e7 Moved DebugValue to Value.cpp.
llvm-svn: 606
2001-09-18 12:48:16 +00:00
Chris Lattner
ac91b150a7 Add support for global constants, and for initializers for constants
llvm-svn: 598
2001-09-18 04:01:05 +00:00
Chris Lattner
0631fccc21 Add support for printing globals
llvm-svn: 537
2001-09-10 20:08:19 +00:00
Chris Lattner
9d1629d688 Implement global variable support
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
c189163d03 * Assembly writer is not a module analyzer anymore
* There is no constant pool anymore

llvm-svn: 447
2001-09-07 16:36:04 +00:00
Chris Lattner
92c31e1634 * Fix bugs
llvm-svn: 322
2001-07-28 17:49:02 +00:00
Chris Lattner
55c9388cc7 Don't write out constants that do not have a name, they will be inlined.
llvm-svn: 305
2001-07-26 16:29:38 +00:00
Chris Lattner
fc1d7dd221 Add support for extern varargs methods & varargs method calls
llvm-svn: 297
2001-07-25 22:47:55 +00:00
Chris Lattner
a2122c28d0 Factor out WriteAsOperand.
llvm-svn: 213
2001-07-20 19:15:21 +00:00
Chris Lattner
5c33905f73 Implement forward/external declarations for methods.
llvm-svn: 196
2001-07-15 06:35:59 +00:00
Chris Lattner
f7499bce49 The parent of a constant pool is a symtabvalue, not a value.
llvm-svn: 180
2001-07-14 06:10:33 +00:00
Chris Lattner
fcdbcb6ac1 Add DebugValue member.
llvm-svn: 175
2001-07-12 23:35:26 +00:00
Chris Lattner
7a7ddef47e Neg instruction removed. Cast instruction implemented.
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
c00392210d 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

llvm-svn: 152
2001-07-07 19:24:15 +00:00
Chris Lattner
6f7587e4d3 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!

llvm-svn: 149
2001-07-07 08:36:50 +00:00
Chris Lattner
d616582a7a 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

llvm-svn: 96
2001-06-27 23:41:11 +00:00
Chris Lattner
86182934b5 Add a space to the PHI node output code to make it look nicer
llvm-svn: 53
2001-06-21 05:29:56 +00:00
Chris Lattner
88f6f66802 Updates to support
* Changes in PHI node structure
* Change to PHI syntax

llvm-svn: 24
2001-06-11 15:04:20 +00:00
Chris Lattner
f2f80282cb Fixed to print slightly differently. Added use counts for labels
llvm-svn: 9
2001-06-07 16:58:55 +00:00
Chris Lattner
e6b9b382e2 Initial revision
llvm-svn: 2
2001-06-06 20:29:01 +00:00