Created
February 17, 2018 19:49
-
-
Save brainlag/51928996f539bfafcfe0531e5dfd6236 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: lib/Target/AVR/AVRISelLowering.cpp | |
=================================================================== | |
--- lib/Target/AVR/AVRISelLowering.cpp (revision 325378) | |
+++ lib/Target/AVR/AVRISelLowering.cpp (working copy) | |
@@ -867,10 +867,11 @@ | |
/// For each argument in a function store the number of pieces it is composed | |
/// of. | |
-static void parseFunctionArgs(const Function *F, const DataLayout *TD, | |
+static void parseFunctionArgs(const SmallVectorImpl<ISD::InputArg> &Ins, | |
SmallVectorImpl<unsigned> &Out) { | |
- for (Argument const &Arg : F->args()) { | |
- unsigned Bytes = (TD->getTypeSizeInBits(Arg.getType()) + 7) / 8; | |
+ for (const ISD::InputArg &Arg : Ins) { | |
+ if(Arg.PartOffset > 0) continue; | |
+ unsigned Bytes = ((Arg.ArgVT.getSizeInBits()) + 7) / 8; | |
Out.push_back((Bytes + 1) / 2); | |
} | |
} | |
@@ -938,7 +939,7 @@ | |
parseExternFuncCallArgs(*Outs, Args); | |
} else { | |
assert(F != nullptr && "function should not be null"); | |
- parseFunctionArgs(F, TD, Args); | |
+ parseFunctionArgs(*Ins, Args); | |
} | |
unsigned RegsLeft = array_lengthof(RegList8), ValNo = 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment