[llvm] r307142 - [GlobalISel][X86] For now don't handle not trivial function arguments lowering.
Igor Breger via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 04:40:35 PDT 2017
Author: ibreger
Date: Wed Jul 5 04:40:35 2017
New Revision: 307142
URL: http://llvm.org/viewvc/llvm-project?rev=307142&view=rev
Log:
[GlobalISel][X86] For now don't handle not trivial function arguments lowering.
Modified:
llvm/trunk/lib/Target/X86/X86CallLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86CallLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CallLowering.cpp?rev=307142&r1=307141&r2=307142&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86CallLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86CallLowering.cpp Wed Jul 5 04:40:35 2017
@@ -195,8 +195,18 @@ bool X86CallLowering::lowerFormalArgumen
SmallVector<ArgInfo, 8> SplitArgs;
unsigned Idx = 0;
for (auto &Arg : F.args()) {
+
+ // TODO: handle not simple cases.
+ if (Arg.hasAttribute(Attribute::ByVal) ||
+ Arg.hasAttribute(Attribute::InReg) ||
+ Arg.hasAttribute(Attribute::StructRet) ||
+ Arg.hasAttribute(Attribute::SwiftSelf) ||
+ Arg.hasAttribute(Attribute::SwiftError) ||
+ Arg.hasAttribute(Attribute::Nest))
+ return false;
+
ArgInfo OrigArg(VRegs[Idx], Arg.getType());
- setArgFlags(OrigArg, Idx + 1, DL, F);
+ setArgFlags(OrigArg, Idx + AttributeList::FirstArgIndex, DL, F);
if (!splitToValueTypes(OrigArg, SplitArgs, DL, MRI,
[&](ArrayRef<unsigned> Regs) {
MIRBuilder.buildMerge(VRegs[Idx], Regs);
More information about the llvm-commits
mailing list