Finegrainify namespacification

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10138 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2003-11-21 21:54:22 +00:00
parent 1192283096
commit 1e2385b941
12 changed files with 27 additions and 52 deletions
+3 -4
View File
@@ -21,8 +21,7 @@
#include "llvm/Constants.h"
#include "llvm/Support/CallSite.h"
#include "Support/Statistic.h"
namespace llvm {
using namespace llvm;
namespace {
Statistic<> NumArgumentsProped("ipconstprop",
@@ -38,7 +37,7 @@ namespace {
RegisterOpt<IPCP> X("ipconstprop", "Interprocedural constant propagation");
}
Pass *createIPConstantPropagationPass() { return new IPCP(); }
Pass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
bool IPCP::run(Module &M) {
bool Changed = false;
@@ -117,6 +116,7 @@ bool IPCP::processFunction(Function &F) {
Value *V = ArgumentConstants[i].first;
if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(V))
V = CPR->getValue();
AI->replaceAllUsesWith(V);
++NumArgumentsProped;
MadeChange = true;
@@ -124,4 +124,3 @@ bool IPCP::processFunction(Function &F) {
return MadeChange;
}
} // End llvm namespace