diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-07 20:49:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-07 20:49:59 +0000 |
commit | 2fbfdcffd3e0cf41422aaa6c526c37cb02b81341 (patch) | |
tree | c1991eac5d23807b38e5909f861609b243562f70 /lib/Transforms/LevelRaise.cpp | |
parent | dcc6d4cada290857ee74164816ec3c502c1db7a4 (diff) |
Change references to the Method class to be references to the Function
class. The Method class is obsolete (renamed) and all references to it
are being converted over to Function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/LevelRaise.cpp')
-rw-r--r-- | lib/Transforms/LevelRaise.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp index de64793566..aecf78dc64 100644 --- a/lib/Transforms/LevelRaise.cpp +++ b/lib/Transforms/LevelRaise.cpp @@ -8,7 +8,7 @@ #include "llvm/Transforms/LevelChange.h" #include "TransformInternals.h" -#include "llvm/Method.h" +#include "llvm/Function.h" #include "llvm/iOther.h" #include "llvm/iMemory.h" #include "llvm/ConstantVals.h" @@ -417,9 +417,9 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) { -static bool DoRaisePass(Method *M) { +static bool DoRaisePass(Function *F) { bool Changed = false; - for (Method::iterator MI = M->begin(), ME = M->end(); MI != ME; ++MI) { + for (Method::iterator MI = F->begin(), ME = F->end(); MI != ME; ++MI) { BasicBlock *BB = *MI; BasicBlock::InstListType &BIL = BB->getInstList(); @@ -445,9 +445,9 @@ static bool DoRaisePass(Method *M) { // RaisePointerReferences::doit - Raise a method representation to a higher // level. // -static bool doRPR(Method *M) { +static bool doRPR(Function *F) { #ifdef DEBUG_PEEPHOLE_INSTS - cerr << "\n\n\nStarting to work on Method '" << M->getName() << "'\n"; + cerr << "\n\n\nStarting to work on Function '" << F->getName() << "'\n"; #endif // Insert casts for all incoming pointer pointer values that are treated as @@ -457,13 +457,13 @@ static bool doRPR(Method *M) { do { #ifdef DEBUG_PEEPHOLE_INSTS - cerr << "Looping: \n" << M; + cerr << "Looping: \n" << F; #endif // Iterate over the method, refining it, until it converges on a stable // state LocalChange = false; - while (DoRaisePass(M)) LocalChange = true; + while (DoRaisePass(F)) LocalChange = true; Changed |= LocalChange; } while (LocalChange); @@ -473,7 +473,7 @@ static bool doRPR(Method *M) { namespace { struct RaisePointerReferences : public MethodPass { - virtual bool runOnMethod(Method *M) { return doRPR(M); } + virtual bool runOnMethod(Function *F) { return doRPR(F); } }; } |