mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-01-09 05:28:42 +00:00
CodeGen: convert CCState interface to using ArrayRefs
Everyone except R600 was manually passing the length of a static array at each callsite, calculated in a variety of interesting ways. Far easier to let ArrayRef handle that. There should be no functional change, but out of tree targets may have to tweak their calls as with these examples. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230118 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -124,7 +124,7 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
||||
}
|
||||
O << "\n" << IndentStr << "};\n";
|
||||
O << IndentStr << "if (unsigned Reg = State.AllocateReg(RegList"
|
||||
<< Counter << ", " << RegList->getSize() << ")) {\n";
|
||||
<< Counter << ")) {\n";
|
||||
}
|
||||
O << IndentStr << " State.addLoc(CCValAssign::getReg(ValNo, ValVT, "
|
||||
<< "Reg, LocVT, LocInfo));\n";
|
||||
@@ -166,7 +166,7 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
||||
|
||||
O << IndentStr << "if (unsigned Reg = State.AllocateReg(RegList"
|
||||
<< RegListNumber << ", " << "RegList" << ShadowRegListNumber
|
||||
<< ", " << RegList->getSize() << ")) {\n";
|
||||
<< ")) {\n";
|
||||
}
|
||||
O << IndentStr << " State.addLoc(CCValAssign::getReg(ValNo, ValVT, "
|
||||
<< "Reg, LocVT, LocInfo));\n";
|
||||
@@ -215,8 +215,7 @@ void CallingConvEmitter::EmitAction(Record *Action,
|
||||
O << IndentStr << "unsigned Offset" << ++Counter
|
||||
<< " = State.AllocateStack("
|
||||
<< Size << ", " << Align << ", "
|
||||
<< "ShadowRegList" << ShadowRegListNumber << ", "
|
||||
<< ShadowRegList->getSize() << ");\n";
|
||||
<< "ShadowRegList" << ShadowRegListNumber << ");\n";
|
||||
O << IndentStr << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset"
|
||||
<< Counter << ", LocVT, LocInfo));\n";
|
||||
O << IndentStr << "return false;\n";
|
||||
|
||||
Reference in New Issue
Block a user