#include "llvm/Assembly/Writer.h"
#include "llvm/SymbolTable.h"
#include "llvm/iPHINode.h"
-#include "llvm/Method.h"
+#include "llvm/Function.h"
#include "llvm/BasicBlock.h"
#include "llvm/InstrTypes.h"
#include "llvm/Support/CFG.h"
// an interval invariant computation.
//
static bool isLoopInvariant(cfg::Interval *Int, Value *V) {
- assert(isa<Constant>(V) || isa<Instruction>(V) || isa<MethodArgument>(V));
+ assert(isa<Constant>(V) || isa<Instruction>(V) || isa<FunctionArgument>(V));
if (!isa<Instruction>(V))
return true; // Constants and arguments are always loop invariant
std::string PHIName, AddName;
BasicBlock *Header = Int->getHeaderNode();
- Method *M = Header->getParent();
+ Function *M = Header->getParent();
if (M->hasSymbolTable()) {
// Only name the induction variable if the method isn't stripped.
// This function loops over an interval partition of a program, reducing it
// until the graph is gone.
//
-bool InductionVariableCannonicalize::doIt(Method *M,
+bool InductionVariableCannonicalize::doIt(Function *M,
cfg::IntervalPartition &IP) {
bool Changed = false;
}
-bool InductionVariableCannonicalize::runOnMethod(Method *M) {
- return doIt(M, getAnalysis<cfg::IntervalPartition>());
+bool InductionVariableCannonicalize::runOnMethod(Function *F) {
+ return doIt(F, getAnalysis<cfg::IntervalPartition>());
}
// getAnalysisUsageInfo - This function works on the call graph of a module.