mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
getRegForInlineAsmConstraint wants to use TargetRegisterInfo for
a lookup, pass that in rather than use a naked call to getSubtargetImpl. This involved passing down and around either a TargetMachine or TargetRegisterInfo. Update all callers/definitions around the targets and SelectionDAG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230699 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -133,16 +133,17 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf,
|
||||
ImmutableCallSite CS(I);
|
||||
if (isa<InlineAsm>(CS.getCalledValue())) {
|
||||
unsigned SP = TLI->getStackPointerRegisterToSaveRestore();
|
||||
const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
|
||||
std::vector<TargetLowering::AsmOperandInfo> Ops =
|
||||
TLI->ParseConstraints(CS);
|
||||
TLI->ParseConstraints(TRI, CS);
|
||||
for (size_t I = 0, E = Ops.size(); I != E; ++I) {
|
||||
TargetLowering::AsmOperandInfo &Op = Ops[I];
|
||||
if (Op.Type == InlineAsm::isClobber) {
|
||||
// Clobbers don't have SDValue operands, hence SDValue().
|
||||
TLI->ComputeConstraintToUse(Op, SDValue(), DAG);
|
||||
std::pair<unsigned, const TargetRegisterClass *> PhysReg =
|
||||
TLI->getRegForInlineAsmConstraint(Op.ConstraintCode,
|
||||
Op.ConstraintVT);
|
||||
TLI->getRegForInlineAsmConstraint(TRI, Op.ConstraintCode,
|
||||
Op.ConstraintVT);
|
||||
if (PhysReg.first == SP)
|
||||
MF->getFrameInfo()->setHasInlineAsmWithSPAdjust(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user