diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-27 06:56:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-27 06:56:12 +0000 |
commit | f57b845547302d24ecb6a9e79d7bc386f761a6c9 (patch) | |
tree | 369bc5be013a3a6d0373dbf26820d701e01c5297 /include/llvm/CodeGen/FunctionLiveVarInfo.h | |
parent | f2361c5e5c2917e6f19a55927b221d8671753a40 (diff) | |
download | external_llvm-f57b845547302d24ecb6a9e79d7bc386f761a6c9.zip external_llvm-f57b845547302d24ecb6a9e79d7bc386f761a6c9.tar.gz external_llvm-f57b845547302d24ecb6a9e79d7bc386f761a6c9.tar.bz2 |
* 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/FunctionLiveVarInfo.h')
-rw-r--r-- | include/llvm/CodeGen/FunctionLiveVarInfo.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/include/llvm/CodeGen/FunctionLiveVarInfo.h b/include/llvm/CodeGen/FunctionLiveVarInfo.h index 435f177..eabae4b 100644 --- a/include/llvm/CodeGen/FunctionLiveVarInfo.h +++ b/include/llvm/CodeGen/FunctionLiveVarInfo.h @@ -1,15 +1,15 @@ -/* Title: MethodLiveVarInfo.h -*- C++ -*- +/* Title: FunctionLiveVarInfo.h -*- C++ -*- Author: Ruchira Sasanka Date: Jun 30, 01 Purpose: - This is the interface for live variable info of a method that is required + This is the interface for live variable info of a function that is required by any other part of the compiler It must be called like: - MethodLiveVarInfo MLVI(Function *); // initializes data structures - MLVI.analyze(); // do the actural live variable anal + FunctionLiveVarInfo FLVI(Function *); // initializes data structures + FLVI.analyze(); // do the actural live variable anal After the analysis, getInSetOfBB or getOutSetofBB can be called to get live var info of a BB. @@ -79,7 +79,7 @@ enum LiveVarDebugLevel_t { extern cl::Enum<LiveVarDebugLevel_t> DEBUG_LV; -class MethodLiveVarInfo : public MethodPass { +class MethodLiveVarInfo : public FunctionPass { // Machine Instr to LiveVarSet Map for providing LVset BEFORE each inst std::map<const MachineInstr *, const ValueSet *> MInst2LVSetBI; @@ -105,19 +105,18 @@ public: MethodLiveVarInfo(AnalysisID id = ID) { assert(id == ID); } - // --------- Implement the MethodPass interface ---------------------- + // --------- Implement the FunctionPass interface ---------------------- - // runOnMethod - Perform analysis, update internal data structures. - virtual bool runOnMethod(Function *F); + // runOnFunction - Perform analysis, update internal data structures. + virtual bool runOnFunction(Function *F); // releaseMemory - After LiveVariable analysis has been used, forget! virtual void releaseMemory(); - // getAnalysisUsageInfo - Provide self! - virtual void getAnalysisUsageInfo(AnalysisSet &Required, - AnalysisSet &Destroyed, - AnalysisSet &Provided) { - Provided.push_back(ID); + // getAnalysisUsage - Provide self! + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + AU.addProvided(ID); } // --------- Functions to access analysis results ------------------- |