mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10138 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user