Commit Graph

42 Commits

Author SHA1 Message Date
Chris Lattner 6d216fdc1f * Cleanup the pass a bit more, making it more object oriented.
* Split the two behaviors of the InsertTraceCode class into two subclasses
* Register Passes

llvm-svn: 3014
2002-07-23 18:04:15 +00:00
Chris Lattner df7633fb5f Hide extra argument
llvm-svn: 2986
2002-07-22 02:17:27 +00:00
Chris Lattner f5cad15a67 *** empty log message ***
llvm-svn: 2985
2002-07-22 02:10:13 +00:00
Vikram S. Adve 4b581be494 Fix iteration and InsertPos bugs introduced when Chris changed over to ilist.
llvm-svn: 2840
2002-07-08 23:37:07 +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 ace7b8d3bd * Change commandline options a bit to be nicer
* Insert accurate prototypes for functions
* Insert casts to use accurate prototypes

llvm-svn: 2677
2002-05-20 21:43:59 +00:00
Vikram S. Adve 47f37c3404 Hash pointer values to a sequence number to get identical results from
lli and llc.  This is controlled with options -tracehash on|off.

Also, added an option to specify which functions should be traced.
Particularly useful to reduce output volume in basic-block tracing.

llvm-svn: 2646
2002-05-19 15:39:02 +00:00
Chris Lattner 37104aace8 Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.

llvm-svn: 2395
2002-04-29 14:57:45 +00:00
Chris Lattner f12cc842b3 Tighten up the AnalysisUsage of lots of passes, primarily to correctly indicate whether or not they invalidate the CFGA
llvm-svn: 2386
2002-04-28 21:27:06 +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 c8e665431b * Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
  - Method is now const
  - It now takes one AnalysisUsage object to fill in instead of 3 vectors
    to fill in
  - Pass's now specify which other passes they _preserve_ not which ones
    they modify (be conservative!)
  - A pass can specify that it preserves all analyses (because it never
    modifies the underlying program)
* s/Method/Function/g in other random places as well

llvm-svn: 2333
2002-04-27 06:56:12 +00:00
Chris Lattner 7e35890072 * s/Method/Function
* Fix bug where the character after a % was being discarded

llvm-svn: 2248
2002-04-14 06:15:24 +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 d92b01c385 Add #includes to make up for #includes pruned out of header files.
llvm-svn: 2207
2002-04-09 18:37:46 +00:00
Chris Lattner e2f2f54f0c s/MethodType/FunctionType
llvm-svn: 2115
2002-04-04 22:19:18 +00:00
Chris Lattner c46dcca220 Simplify code a bit by using Module::getOrInsertFunction
llvm-svn: 2032
2002-03-29 03:43:24 +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
Vikram S. Adve 9f129ffe56 Just a comment.
llvm-svn: 1908
2002-03-18 03:40:25 +00:00
Chris Lattner 04805fa29c Change over to use new style pass mechanism, now passes only expose small
creation functions in their public header file, unless they can help it.

llvm-svn: 1816
2002-02-26 21:46:54 +00:00
Chris Lattner 352151e222 MethodPass's are now guaranteed to not be run on external methods!
llvm-svn: 1611
2002-01-31 00:51:24 +00:00
Chris Lattner 0686e435d1 Implement a more powerful, simpler, pass system. This pass system can figure
out how to run a collection of passes optimially given their behaviors and
charactaristics.

Convert code to use it.

llvm-svn: 1507
2002-01-21 07:31:50 +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 f1197b0d43 * Refactor trace values to work as a proper pass. Before it used to add
methods while the pass was running which was a no no.  Now it adds the
  printf method at pass initialization
* Revamp code to use printf calls instead of the old style print_<type>
  calls.
* Simplify code

llvm-svn: 1457
2001-12-14 16:26:05 +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 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 302014f2e7 Make strings be internal
llvm-svn: 1384
2001-11-26 19:14:33 +00:00
Chris Lattner 330dc57305 Support array indexing
llvm-svn: 1345
2001-11-26 17:00:43 +00:00
Vikram S. Adve b601fda7ce Print incoming arguments and return values.
llvm-svn: 1315
2001-11-15 15:00:16 +00:00
Chris Lattner 1237e86597 Remove much cruft from the MemAccessInst instruction
llvm-svn: 1298
2001-11-14 11:27:58 +00:00
Chris Lattner 33d9cb9903 Minor method rename
llvm-svn: 1119
2001-11-04 08:08:34 +00:00
Chris Lattner cba9036e34 Fix broken assertion. Didn't allow for pointer case
llvm-svn: 1034
2001-10-29 17:27:38 +00:00
Vikram S. Adve 66aea7a58c Make newlines be newlines! This should now work in both lli and native code.
llvm-svn: 1016
2001-10-28 22:44:02 +00:00
Vikram S. Adve 96f6ac9ffc Use separate functions for printing values of each type.
Put trace code before condition-generating instruction in basic blocks
that end in a conditional branch.

llvm-svn: 1002
2001-10-28 21:37:25 +00:00
Chris Lattner e2c61267ad Refix bugs, stop using deprecated strstream header
llvm-svn: 898
2001-10-18 20:06:03 +00:00
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 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 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