[llvm] r351854 - [SelectionDAGBuilder] Defer C_Register Assignments to be in line with
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 22 10:57:49 PST 2019
Author: niravd
Date: Tue Jan 22 10:57:49 2019
New Revision: 351854
URL: http://llvm.org/viewvc/llvm-project?rev=351854&view=rev
Log:
[SelectionDAGBuilder] Defer C_Register Assignments to be in line with
those of C_RegisterClass. NFCI.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=351854&r1=351853&r2=351854&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Jan 22 10:57:49 2019
@@ -7567,8 +7567,7 @@ void SelectionDAGBuilder::visitInlineAsm
else
Chain = DAG.getRoot();
- // Second pass over the constraints: compute which constraint option to use
- // and assign registers to constraints that want a specific physreg.
+ // Second pass over the constraints: compute which constraint option to use.
for (SDISelAsmOperandInfo &OpInfo : ConstraintOperands) {
// If this is an output operand with a matching input operand, look up the
// matching input. If their types mismatch, e.g. one is an integer, the
@@ -7604,14 +7603,6 @@ void SelectionDAGBuilder::visitInlineAsm
OpInfo.isIndirect = true;
}
- // If this constraint is for a specific register, allocate it before
- // anything else.
- SDISelAsmOperandInfo &RefOpInfo =
- OpInfo.isMatchingInputConstraint()
- ? ConstraintOperands[OpInfo.getMatchedOperand()]
- : OpInfo;
- if (RefOpInfo.ConstraintType == TargetLowering::C_Register)
- GetRegistersForValue(DAG, getCurSDLoc(), OpInfo, RefOpInfo);
}
// Third pass - Loop over all of the operands, assigning virtual or physregs
@@ -7622,9 +7613,8 @@ void SelectionDAGBuilder::visitInlineAsm
? ConstraintOperands[OpInfo.getMatchedOperand()]
: OpInfo;
- // C_Register operands have already been allocated, Other/Memory don't need
- // to be.
- if (RefOpInfo.ConstraintType == TargetLowering::C_RegisterClass)
+ if (RefOpInfo.ConstraintType == TargetLowering::C_Register ||
+ RefOpInfo.ConstraintType == TargetLowering::C_RegisterClass)
GetRegistersForValue(DAG, getCurSDLoc(), OpInfo, RefOpInfo);
}
More information about the llvm-commits
mailing list