CastInst *AllocaInsertionPoint =
CastInst::Create(Instruction::BitCast,
- Context->getNullValue(Type::Int32Ty), Type::Int32Ty,
+ F.getContext().getNullValue(Type::Int32Ty), Type::Int32Ty,
"reg2mem alloca point", I);
// Find the escaped instructions. But don't create stack slots for
NumRegsDemoted += worklist.size();
for (std::list<Instruction*>::iterator ilb = worklist.begin(),
ile = worklist.end(); ilb != ile; ++ilb)
- DemoteRegToStack(*Context, **ilb, false, AllocaInsertionPoint);
+ DemoteRegToStack(**ilb, false, AllocaInsertionPoint);
worklist.clear();
NumPhisDemoted += worklist.size();
for (std::list<Instruction*>::iterator ilb = worklist.begin(),
ile = worklist.end(); ilb != ile; ++ilb)
- DemotePHIToStack(*Context, cast<PHINode>(*ilb), AllocaInsertionPoint);
+ DemotePHIToStack(cast<PHINode>(*ilb), AllocaInsertionPoint);
return true;
}