diff options
author | Tim Northover <tnorthover@apple.com> | 2015-02-21 02:11:17 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2015-02-21 02:11:17 +0000 |
commit | 3b6b7ca2bc6e0ea188bc3501f25384eaf97eb55a (patch) | |
tree | 5de33f3a5e5e001d1fba1769d37605cd98efe584 /llvm/utils | |
parent | 6b0d0464a8654619ab9e14f0f1096b398f9819c2 (diff) | |
download | bcm5719-llvm-3b6b7ca2bc6e0ea188bc3501f25384eaf97eb55a.tar.gz bcm5719-llvm-3b6b7ca2bc6e0ea188bc3501f25384eaf97eb55a.zip |
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.
llvm-svn: 230118
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/CallingConvEmitter.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/CallingConvEmitter.cpp b/llvm/utils/TableGen/CallingConvEmitter.cpp index 276a8b1813c..051a7e98141 100644 --- a/llvm/utils/TableGen/CallingConvEmitter.cpp +++ b/llvm/utils/TableGen/CallingConvEmitter.cpp @@ -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"; |