diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2010-09-17 15:48:55 +0000 |
commit | d39c594d39df7f283c2fb8a704a3f31c501180d9 (patch) | |
tree | 36453626c792cccd91f783a38a169d610a6b9db9 /lib/Transforms/IPO/IPConstantPropagation.cpp | |
parent | 6144c1de6a7674dad94290650e4e14f24d42e421 (diff) |
Notes
Diffstat (limited to 'lib/Transforms/IPO/IPConstantPropagation.cpp')
-rw-r--r-- | lib/Transforms/IPO/IPConstantPropagation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/IPO/IPConstantPropagation.cpp b/lib/Transforms/IPO/IPConstantPropagation.cpp index e4db235b1d108..1b3cf7810cc68 100644 --- a/lib/Transforms/IPO/IPConstantPropagation.cpp +++ b/lib/Transforms/IPO/IPConstantPropagation.cpp @@ -35,7 +35,7 @@ namespace { /// struct IPCP : public ModulePass { static char ID; // Pass identification, replacement for typeid - IPCP() : ModulePass(&ID) {} + IPCP() : ModulePass(ID) {} bool runOnModule(Module &M); private: @@ -45,8 +45,8 @@ namespace { } char IPCP::ID = 0; -static RegisterPass<IPCP> -X("ipconstprop", "Interprocedural constant propagation"); +INITIALIZE_PASS(IPCP, "ipconstprop", + "Interprocedural constant propagation", false, false); ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); } @@ -94,7 +94,7 @@ bool IPCP::PropagateConstantsIntoArguments(Function &F) { if (!isa<CallInst>(U) && !isa<InvokeInst>(U)) return false; - CallSite CS = CallSite::get(cast<Instruction>(U)); + CallSite CS(cast<Instruction>(U)); if (!CS.isCallee(UI)) return false; @@ -219,7 +219,7 @@ bool IPCP::PropagateConstantReturn(Function &F) { // constant. bool MadeChange = false; for (Value::use_iterator UI = F.use_begin(), E = F.use_end(); UI != E; ++UI) { - CallSite CS = CallSite::get(*UI); + CallSite CS(*UI); Instruction* Call = CS.getInstruction(); // Not a call instruction or a call instruction that's not calling F |