Misha Brukman
fa100531e1
Fix spelling/grammar.
...
llvm-svn: 9023
2003-10-10 17:54:14 +00:00
Chris Lattner
504f9242c3
Add support for volatile loads/stores
...
llvm-svn: 8393
2003-09-08 17:45:59 +00:00
Chris Lattner
13651f0c46
Fix bug where we couldn't print a function without a name
...
llvm-svn: 8341
2003-09-03 17:56:43 +00:00
Chris Lattner
8068e0cd17
Support new 'any' support for pointer size and endianness
...
llvm-svn: 8119
2003-08-24 13:48:48 +00:00
Chris Lattner
1c3430491e
If an "LLVM name" has wierd characters in it, print it out in double quotes instead of prefixing it with %
...
llvm-svn: 8049
2003-08-22 05:40:38 +00:00
Chris Lattner
463d6a5e7c
Implement TODO: print out short form of Invoke if possible
...
llvm-svn: 7595
2003-08-05 15:34:45 +00:00
Chris Lattner
f26a8ee580
Remove redundant const qualifiers from cast<> expressions
...
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
6077c3195f
Simplify code by using ConstantInt::getRawValue instead of checking to see
...
whether the constant is signed or unsigned, then casting
llvm-svn: 7252
2003-07-23 15:22:26 +00:00
Misha Brukman
7fdaab4f68
The word `separate' only has one `e'.
...
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Chris Lattner
d401f39872
Avoid printing out huge structures or arrays if they are just filled with zeros
...
llvm-svn: 6938
2003-06-28 20:08:24 +00:00
Brian Gaeke
87b4f0765c
lib/CWriter/Writer.cpp: Copy AsmWriter's ConstantFP checking code here
...
into a new function FPCSafeToPrint(), and use it in printConstant()
and printFunction() to decide whether we should output ConstantFPs as
floating-point constants or as references to stack-allocated variables.
lib/VMCore/AsmWriter.cpp: Fix an apparent typo in the code mentioned above.
llvm-svn: 6762
2003-06-17 23:55:35 +00:00
Chris Lattner
39adbfca5b
Don't print out unique identifier for opaque types
...
llvm-svn: 6511
2003-06-01 03:45:51 +00:00
Chris Lattner
15285abcbe
Print opaque types
...
llvm-svn: 6200
2003-05-14 17:50:47 +00:00
Chris Lattner
f70da10697
Add support for the new va_arg instruction
...
llvm-svn: 6029
2003-05-08 02:44:12 +00:00
Chris Lattner
ab7d1ab806
Remove using declarations
...
llvm-svn: 6022
2003-05-08 02:08:14 +00:00
Chris Lattner
c840aa64e2
Emit information about target
...
llvm-svn: 5844
2003-04-22 19:07:19 +00:00
Chris Lattner
379a8d2d1c
Add new linkage types to support a real frontend
...
llvm-svn: 5786
2003-04-16 20:28:45 +00:00
Chris Lattner
deccfafddb
Improve the efficiency and cleanup writing a bit
...
llvm-svn: 5782
2003-04-16 20:20:02 +00:00
Chris Lattner
b825722ac0
Clean up cruft
...
llvm-svn: 5720
2003-03-06 23:23:32 +00:00
Chris Lattner
98cf1f5d64
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
149376dee5
- 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
d131986b0f
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
58185f2df9
- 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
7d734801d1
Add support for printing constpointerrefs more nicely
...
llvm-svn: 3654
2002-09-10 15:53:49 +00:00
Chris Lattner
cfe8f53a4b
Changed parser to always use parenthesis on ConstExprs to be consistent
...
llvm-svn: 3363
2002-08-16 21:17:11 +00:00
Chris Lattner
83b396b830
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
e5fd3867d3
Fix bug: test/Regression/Assembler/2002-07-31-SlashInString.llx
...
llvm-svn: 3195
2002-07-31 23:56:44 +00:00
Chris Lattner
3cd8c56cbb
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
c8b7092e54
* 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
d9a36a63bb
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
5fa3a4429f
Fix bug: test/Regression/Assembler/2002-07-25-QuoteInString.llx
...
llvm-svn: 3099
2002-07-25 20:32:37 +00:00
Chris Lattner
7f8845a523
Register Writer passes
...
llvm-svn: 3017
2002-07-23 18:07:49 +00:00
Vikram S. Adve
b952b5485f
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
5a9f63ef4e
*** empty log message ***
...
llvm-svn: 2852
2002-07-10 16:48:17 +00:00
Chris Lattner
113f4f4609
MEGAPATCH checkin.
...
For details, See: docs/2002-06-25-MegaPatchInfo.txt
llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
2904f44693
Support opaque type printing a little bit at least
...
llvm-svn: 2748
2002-05-26 20:17:54 +00:00
Chris Lattner
143e5a47c0
Print out function name with % style instead of "" style
...
llvm-svn: 2726
2002-05-22 22:29:26 +00:00
Chris Lattner
408dbdb9ad
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
b2f02e5952
Print functions with curly braces instead of begin/end
...
llvm-svn: 2469
2002-05-06 03:00:40 +00:00
Chris Lattner
293e186645
The implementation keyword is no longer neccesary
...
llvm-svn: 2434
2002-05-02 19:11:29 +00:00
Chris Lattner
913d18f567
Changes so that iMemory.h doesn't include DerivedTypes.h
...
llvm-svn: 2404
2002-04-29 18:46:50 +00:00
Chris Lattner
d5a847057b
Eliminate duplicate or unneccesary #include's
...
llvm-svn: 2397
2002-04-29 17:42:12 +00:00
Chris Lattner
1d7f38d15e
Todo has been implemented, remove it
...
llvm-svn: 2387
2002-04-28 21:45:02 +00:00
Chris Lattner
ca14237696
Split ConstantVals.h into Constant.h and Constants.h
...
llvm-svn: 2378
2002-04-28 19:55:58 +00:00
Chris Lattner
f491044d0f
Module's are no longer values
...
llvm-svn: 2354
2002-04-28 04:51:09 +00:00
Chris Lattner
1e19468e4a
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
d84bb63750
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
8a939c9189
Minor bugfix for previous checkin
...
llvm-svn: 2241
2002-04-13 21:11:04 +00:00
Chris Lattner
d816b5374f
* 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
8d48df2ebc
* 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
189088e5d6
* 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
2e9fa6d101
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
c0b4c7bc32
* Narrow AsmWriter interface
...
* Implement Value::print methods here instead of WriteToAssembly
llvm-svn: 2179
2002-04-08 22:03:40 +00:00
Chris Lattner
6915f8fc3c
* 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
f7e7948f1e
Update comments
...
Implement Value::dump here.
llvm-svn: 2148
2002-04-07 22:31:46 +00:00
Chris Lattner
91db58298a
s/Method/Function
...
llvm-svn: 2034
2002-03-29 03:44:36 +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
7f74a56e24
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +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
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
841d8b9e50
Implement support for internal methods
...
llvm-svn: 1373
2001-11-26 18:54:16 +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
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
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
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
b6fe2345f1
Fix shift printing when using a ubyte LHS
...
llvm-svn: 925
2001-10-20 09:33:10 +00:00
Chris Lattner
862e338b46
* 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
7fac070215
* 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
da55810666
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
3856934386
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
8f19112923
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
4b717c0edc
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Vikram S. Adve
13ba19a1a8
Moved DebugValue to Value.cpp.
...
llvm-svn: 606
2001-09-18 12:48:16 +00:00
Chris Lattner
3779864fcf
Add support for global constants, and for initializers for constants
...
llvm-svn: 598
2001-09-18 04:01:05 +00:00
Chris Lattner
adfe0d19d6
Add support for printing globals
...
llvm-svn: 537
2001-09-10 20:08:19 +00:00
Chris Lattner
da9755002f
Implement global variable support
...
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
fee714f7e0
* 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
2091efbc0a
* Fix bugs
...
llvm-svn: 322
2001-07-28 17:49:02 +00:00
Chris Lattner
ee998be490
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
90e0d464ba
Add support for extern varargs methods & varargs method calls
...
llvm-svn: 297
2001-07-25 22:47:55 +00:00
Chris Lattner
5e5abe3eaa
Factor out WriteAsOperand.
...
llvm-svn: 213
2001-07-20 19:15:21 +00:00
Chris Lattner
a7620d9656
Implement forward/external declarations for methods.
...
llvm-svn: 196
2001-07-15 06:35:59 +00:00
Chris Lattner
32e96bcb54
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
2e9fee4702
Add DebugValue member.
...
llvm-svn: 175
2001-07-12 23:35:26 +00:00
Chris Lattner
a682182f64
Neg instruction removed. Cast instruction implemented.
...
llvm-svn: 156
2001-07-08 04:57:15 +00:00
Chris Lattner
b1ca9cbceb
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
a073acb22d
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
4cee8d8ffb
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
4b94e23bd0
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
931ef3bf05
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
a2f01878b7
Fixed to print slightly differently. Added use counts for labels
...
llvm-svn: 9
2001-06-07 16:58:55 +00:00
Chris Lattner
2f7c963559
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00