mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
remove dead code, by this point all uses of CI are gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -543,7 +543,7 @@ static GlobalVariable *SRAGlobal(GlobalVariable *GV, const TargetData &TD) {
|
|||||||
|
|
||||||
if (NewGlobals.empty())
|
if (NewGlobals.empty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
DEBUG(dbgs() << "PERFORMING GLOBAL SRA ON: " << *GV);
|
DEBUG(dbgs() << "PERFORMING GLOBAL SRA ON: " << *GV);
|
||||||
|
|
||||||
Constant *NullInt =Constant::getNullValue(Type::getInt32Ty(GV->getContext()));
|
Constant *NullInt =Constant::getNullValue(Type::getInt32Ty(GV->getContext()));
|
||||||
@ -855,9 +855,6 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Anything else that used the malloc or its bitcast now uses the global directly.
|
|
||||||
CI->replaceAllUsesWith(new BitCastInst(NewGV, CI->getType(), "newgv", CI));
|
|
||||||
|
|
||||||
Constant *RepValue = NewGV;
|
Constant *RepValue = NewGV;
|
||||||
if (NewGV->getType() != GV->getType()->getElementType())
|
if (NewGV->getType() != GV->getType()->getElementType())
|
||||||
RepValue = ConstantExpr::getBitCast(RepValue,
|
RepValue = ConstantExpr::getBitCast(RepValue,
|
||||||
|
Reference in New Issue
Block a user