#include "llvm/Support/InstIterator.h"
#include "Support/CommandLine.h"
+static RegisterAnalysis<FindUnsafePointerTypes>
+X("unsafepointertypes", "Find Unsafe Pointer Types");
AnalysisID FindUnsafePointerTypes::ID(AnalysisID::create<FindUnsafePointerTypes>());
// Provide a command line option to turn on printing of which instructions cause
#include "llvm/Module.h"
#include "llvm/Support/InstIterator.h"
+static RegisterAnalysis<FindUsedTypes>
+X("printusedtypes", "Find Used Types");
AnalysisID FindUsedTypes::ID(AnalysisID::create<FindUsedTypes>());
// IncorporateType - Incorporate one type and all of its subtypes into the
return doFunctionInlining(F);
}
};
- RegisterPass<FunctionInlining> X("inline", "Function Integration/Inlining");
+ RegisterOpt<FunctionInlining> X("inline", "Function Integration/Inlining");
}
Pass *createFunctionInliningPass() { return new FunctionInlining(); }
bool runOnBasicBlock(BasicBlock &BB);
};
-RegisterPass<RaiseAllocations>
-X("raiseallocs", "Raise allocations from calls to instructions");
+ RegisterOpt<RaiseAllocations>
+ X("raiseallocs", "Raise allocations from calls to instructions");
} // end anonymous namespace
bool run(Module &M);
};
- RegisterPass<EmitFunctionTable> X("emitfuncs", "Emit a Function Table");
+ RegisterOpt<EmitFunctionTable> X("emitfuncs", "Emit a Function Table");
}
// Create a new pass to add function table
};
// Register the passes...
- RegisterPass<FunctionTracer> X("tracem","Insert Function trace code only");
- RegisterPass<BasicBlockTracer> Y("trace","Insert BB and Function trace code");
+ RegisterOpt<FunctionTracer> X("tracem","Insert Function trace code only");
+ RegisterOpt<BasicBlockTracer> Y("trace","Insert BB and Function trace code");
} // end anonymous namespace
return new RaisePointerReferences(TD);
}
-static RegisterPass<RaisePointerReferences>
+static RegisterOpt<RaisePointerReferences>
X("raise", "Raise Pointer References", createRaisePointerReferencesPass);
}
};
- RegisterPass<ADCE> X("adce", "Aggressive Dead Code Elimination");
+ RegisterOpt<ADCE> X("adce", "Aggressive Dead Code Elimination");
} // End of anonymous namespace
Pass *createAggressiveDCEPass() { return new ADCE(); }
}
};
-RegisterPass<ConstantPropogation> X("constprop", "Simple constant propogation");
+ RegisterOpt<ConstantPropogation> X("constprop","Simple constant propogation");
}
Pass *createConstantPropogationPass() {
}
};
- RegisterPass<DeadInstElimination> X("die", "Dead Instruction Elimination");
+ RegisterOpt<DeadInstElimination> X("die", "Dead Instruction Elimination");
}
Pass *createDeadInstEliminationPass() {
}
};
- RegisterPass<DCE> Y("dce", "Dead Code Elimination");
+ RegisterOpt<DCE> Y("dce", "Dead Code Elimination");
}
bool DCE::runOnFunction(Function &F) {
static void decomposeArrayRef(BasicBlock::iterator &BBI);
};
-RegisterPass<DecomposePass> X("lowerrefs", "Decompose multi-dimensional "
- "structure/array references");
+ RegisterOpt<DecomposePass> X("lowerrefs", "Decompose multi-dimensional "
+ "structure/array references");
}
Pass *createDecomposeMultiDimRefsPass() {
}
};
- RegisterPass<GCSE> X("gcse", "Global Common Subexpression Elimination");
+ RegisterOpt<GCSE> X("gcse", "Global Common Subexpression Elimination");
}
// createGCSEPass - The public interface to this file...
AU.preservesCFG();
}
};
- RegisterPass<InductionVariableSimplify> X("indvars",
+ RegisterOpt<InductionVariableSimplify> X("indvars",
"Cannonicalize Induction Variables");
}
Instruction *visitInstruction(Instruction &I) { return 0; }
};
- RegisterPass<InstCombiner> X("instcombine", "Combine redundant instructions");
+ RegisterOpt<InstCombiner> X("instcombine", "Combine redundant instructions");
}
}
};
- RegisterPass<LICM> X("licm", "Loop Invariant Code Motion");
+ RegisterOpt<LICM> X("licm", "Loop Invariant Code Motion");
}
Pass *createLICMPass() { return new LICM(); }
bool insertPiNodeFor(Value *V, BasicBlock *BB, Value *Rep = 0);
};
- RegisterPass<PiNodeInserter> X("pinodes", "Pi Node Insertion");
+ RegisterOpt<PiNodeInserter> X("pinodes", "Pi Node Insertion");
}
Pass *createPiNodeInsertionPass() { return new PiNodeInserter(); }
bool ReassociateBB(BasicBlock *BB);
};
- RegisterPass<Reassociate> X("reassociate", "Reassociate expressions");
+ RegisterOpt<Reassociate> X("reassociate", "Reassociate expressions");
}
Pass *createReassociatePass() { return new Reassociate(); }
}
};
- RegisterPass<SCCP> X("sccp", "Sparse Conditional Constant Propogation");
+ RegisterOpt<SCCP> X("sccp", "Sparse Conditional Constant Propogation");
} // end anonymous namespace
struct CFGSimplifyPass : public FunctionPass {
virtual bool runOnFunction(Function &F);
};
- RegisterPass<CFGSimplifyPass> X("simplifycfg", "Simplify the CFG");
+ RegisterOpt<CFGSimplifyPass> X("simplifycfg", "Simplify the CFG");
}
Pass *createCFGSimplificationPass() {
AU.setPreservesAll();
}
};
- RegisterPass<SymbolStripping> X("strip", "Strip symbols from functions");
+ RegisterOpt<SymbolStripping> X("strip", "Strip symbols from functions");
struct FullSymbolStripping : public SymbolStripping {
virtual bool doInitialization(Module &M) {
return StripSymbolTable(M.getSymbolTable());
}
};
- RegisterPass<FullSymbolStripping> Y("mstrip",
- "Strip symbols from module and functions");
+ RegisterOpt<FullSymbolStripping> Y("mstrip",
+ "Strip symbols from module and functions");
}
Pass *createSymbolStrippingPass() {
return new LowerAllocations(TD);
}
-static RegisterPass<LowerAllocations>
+static RegisterOpt<LowerAllocations>
X("lowerallocs", "Lower allocations from instructions to calls (TD)",
createLowerAllocationsPass);
void FindSafeAllocas(Function &F);
};
- RegisterPass<PromotePass> X("mem2reg", "Promote Memory to Register");
+ RegisterOpt<PromotePass> X("mem2reg", "Promote Memory to Register");
} // end of anonymous namespace
using std::vector;
using std::ostream;
-static RegisterPass<PrintModulePass> X("printm", "Print module to stderr");
-static RegisterPass<PrintFunctionPass> Y("print", "Print function to stderr");
+static RegisterPass<PrintModulePass>
+X("printm", "Print module to stderr",PassInfo::Analysis|PassInfo::Optimization);
+static RegisterPass<PrintFunctionPass>
+Y("print","Print function to stderr",PassInfo::Analysis|PassInfo::Optimization);
static void WriteAsOperandInternal(ostream &Out, const Value *V, bool PrintName,
map<const Type *, string> &TypeTable,