69 Commits

Author SHA1 Message Date
Vikram S. Adve
a0db1c9a0e Only print values live at BB or method exit, and insert loads at each
BB exit to read and print values stored in that BB.   Note that only
these stored values are live at method exit!.  Also, print messages at
method entry and exit.

llvm-svn: 892
2001-10-18 18:16:11 +00:00
Vikram S. Adve
7ac553aa12 Handle multiple exit blocks correctly.
Restore string variable cache.
Resurrect code to use formatted printing instead of PrintVal
but leave it turned off for now.

llvm-svn: 888
2001-10-18 13:49:22 +00:00
Chris Lattner
5309e10be1 Convert to be compatible with lli.
Need to eliminate duplicate \n entries

llvm-svn: 883
2001-10-18 06:03:05 +00:00
Chris Lattner
a0a8b5bc26 Massive hacks to try to fix subtle logic bugs. I think it's all working now,
at least what used to.  I should disable method exit code completely because
it's broken (doesn't insert just post dominating values)

llvm-svn: 881
2001-10-18 05:28:08 +00:00
Chris Lattner
6fea0324d7 Convert to new simpler pass itf
llvm-svn: 880
2001-10-18 05:27:33 +00:00
Chris Lattner
5398a6eb6c Convert optimizations to the pass infrastructure
llvm-svn: 873
2001-10-18 01:32:34 +00:00
Chris Lattner
1bb5f8e4ee Add new Pass infrastructure and some examples
llvm-svn: 836
2001-10-15 17:31:51 +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
1afbdc0ea5 * getExitNode() doesn't exist in method anymore
* Make local functions static

llvm-svn: 820
2001-10-15 13:07:21 +00:00
Vikram S. Adve
9a35320053 Added Instrumentation subdirectory.
llvm-svn: 819
2001-10-15 12:01:05 +00:00
Chris Lattner
c306f18c3e Implement linking of global variable constant references
llvm-svn: 817
2001-10-15 03:12:52 +00:00
Chris Lattner
a972919f92 Minor cleanup
llvm-svn: 812
2001-10-14 23:29:30 +00:00
Chris Lattner
1090dc96ff Implement linker. It's 95% working now.
llvm-svn: 810
2001-10-14 23:29:15 +00:00
Vikram S. Adve
a200a6c583 Insert code to trace values at basic block and method exits.
Current version does not check for liveness.

llvm-svn: 800
2001-10-14 23:18:45 +00:00
Chris Lattner
1362299644 Check in makefile
llvm-svn: 788
2001-10-13 16:57:03 +00:00
Chris Lattner
b7b537f192 Start of a linker
llvm-svn: 775
2001-10-13 07:03:50 +00:00
Chris Lattner
f0b68888af Support the invoke instruction
llvm-svn: 765
2001-10-13 06:52:41 +00:00
Chris Lattner
cfc2f446a6 Support indirect calls
llvm-svn: 764
2001-10-13 06:52:31 +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
Chris Lattner
ba1c1f2fb6 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.

llvm-svn: 691
2001-10-01 13:19:53 +00:00
Chris Lattner
bb09a10929 Pull iterators out of CFG.h and CFGdecls and put them in Support directory
llvm-svn: 664
2001-09-28 22:56:31 +00:00
Chris Lattner
b271be3185 ADCE is broken but at least we know why
llvm-svn: 656
2001-09-28 00:06:42 +00:00
Chris Lattner
acfd27d502 Make ADCE more robust, it still has problems, but it's getting closer
llvm-svn: 521
2001-09-09 22:26:47 +00:00
Chris Lattner
d707ec62b6 Types and constants are wierd things in symbol tables now
llvm-svn: 457
2001-09-07 16:43:50 +00:00
Chris Lattner
dae05dc937 * Eliminate reference to ConstantPool class
* Constants are global objects that are not allocated or freed

llvm-svn: 456
2001-09-07 16:43:22 +00:00
Chris Lattner
e57fc205f4 Constant pool is dead
llvm-svn: 455
2001-09-07 16:42:51 +00:00
Chris Lattner
6d7bce9f3c Constants are now global unique objects
llvm-svn: 454
2001-09-07 16:42:26 +00:00
Chris Lattner
07e158de3c * Eliminate constant pool dependancies:
* Eliminate DoRemoveUnusedConstants

llvm-svn: 453
2001-09-07 16:42:08 +00:00
Chris Lattner
030772df99 * Supoprt global constants
* Remove support for local constant pools
* Eliminate constant pool merging method, which is no longer neccesary
* Disable invalid optimization (todo: fix it)

llvm-svn: 452
2001-09-07 16:41:30 +00:00
Chris Lattner
b62b602fe2 Enable the elimination of method prototypes that are not referenced
llvm-svn: 325
2001-07-28 17:51:49 +00:00
Chris Lattner
e2472bbf6c Moved inline/llvm/Tools/* to include/llvm/Support/*
llvm-svn: 279
2001-07-23 17:46:59 +00:00
Chris Lattner
3e37ec7c0a Support external methods
llvm-svn: 200
2001-07-15 21:43:45 +00:00
Chris Lattner
5451c9e977 Add knowledge about the struct form of the GetElementPtr instruction
llvm-svn: 183
2001-07-14 06:11:51 +00:00
Chris Lattner
5b1200bf8e Remove dependency on the structure of ValueHolder.
llvm-svn: 182
2001-07-14 06:11:26 +00:00
Chris Lattner
d6c5a769ea Don't clean out the type plane of the constant pool... this is a hack. FIXME
llvm-svn: 172
2001-07-09 19:38:52 +00:00
Chris Lattner
31feae8550 Implement checking for new instructions
llvm-svn: 163
2001-07-08 21:18:49 +00:00
Chris Lattner
fb8ed0cf3a Use the CDG to mark branches alive on demand.
llvm-svn: 159
2001-07-08 18:38:36 +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
29aae157f7 Add method to unify all exit nodes of a method
llvm-svn: 143
2001-07-06 16:58:36 +00:00
Chris Lattner
8024bde7c7 Update to include right file
llvm-svn: 138
2001-07-06 16:32:07 +00:00
Chris Lattner
b28986ffc7 Initial checkin. Should print dead instructions, except it doesn't do
control dependencies.  :(

llvm-svn: 119
2001-06-30 06:39:11 +00:00
Chris Lattner
1960b3c6d2 Rename DoSparseConditionalConstantProp -> DoSCCP
llvm-svn: 117
2001-06-30 06:37:43 +00:00
Chris Lattner
d42d492734 Optimizations got their own header files
Optimizations now live in the 'opt' namespace
include/llvm/Opt was renamed include/llvm/Optimizations

llvm-svn: 113
2001-06-30 04:36:40 +00:00
Chris Lattner
7ce8b17e60 Export ConstantFoldTerminator, allow it to fold conditional branches to
the same label.

llvm-svn: 107
2001-06-29 23:56:58 +00:00
Chris Lattner
10b250eb4d Added documentation. Constant fold terminators.
llvm-svn: 106
2001-06-29 23:56:23 +00:00