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/lib/Target/XCore/XCoreISelLowering.cpp | |
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/lib/Target/XCore/XCoreISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/XCore/XCoreISelLowering.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp index 5ef25548465..d5a63547de6 100644 --- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp +++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp @@ -1371,8 +1371,7 @@ XCoreTargetLowering::LowerCCCArguments(SDValue Chain, XCore::R0, XCore::R1, XCore::R2, XCore::R3 }; XCoreFunctionInfo *XFI = MF.getInfo<XCoreFunctionInfo>(); - unsigned FirstVAReg = CCInfo.getFirstUnallocated(ArgRegs, - array_lengthof(ArgRegs)); + unsigned FirstVAReg = CCInfo.getFirstUnallocated(ArgRegs); if (FirstVAReg < array_lengthof(ArgRegs)) { int offset = 0; // Save remaining registers, storing higher register numbers at a higher |