mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -60,10 +60,10 @@ namespace {
|
||||
bool OptimizeFunctions(Module &M);
|
||||
bool OptimizeGlobalVars(Module &M);
|
||||
bool OptimizeGlobalCtorsList(GlobalVariable *&GCL);
|
||||
bool ProcessInternalGlobal(GlobalVariable *GV, Module::global_iterator &GVI);
|
||||
bool ProcessInternalGlobal(GlobalVariable *GV,Module::global_iterator &GVI);
|
||||
};
|
||||
|
||||
RegisterOpt<GlobalOpt> X("globalopt", "Global Variable Optimizer");
|
||||
RegisterPass<GlobalOpt> X("globalopt", "Global Variable Optimizer");
|
||||
}
|
||||
|
||||
ModulePass *llvm::createGlobalOptimizerPass() { return new GlobalOpt(); }
|
||||
@@ -800,7 +800,8 @@ static bool ValueIsOnlyUsedLocallyOrStoredToOneGlobal(Instruction *V,
|
||||
// OptimizeOnceStoredGlobal - Try to optimize globals based on the knowledge
|
||||
// that only one value (besides its initializer) is ever stored to the global.
|
||||
static bool OptimizeOnceStoredGlobal(GlobalVariable *GV, Value *StoredOnceVal,
|
||||
Module::global_iterator &GVI, TargetData &TD) {
|
||||
Module::global_iterator &GVI,
|
||||
TargetData &TD) {
|
||||
if (CastInst *CI = dyn_cast<CastInst>(StoredOnceVal))
|
||||
StoredOnceVal = CI->getOperand(0);
|
||||
else if (GetElementPtrInst *GEPI =dyn_cast<GetElementPtrInst>(StoredOnceVal)){
|
||||
|
||||
Reference in New Issue
Block a user