[PATCH] D100890: [AArch64] Remove an unnecessary parameter to AArch64CallLowering OutgoingArgHandler. NFC.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 20 14:10:37 PDT 2021
mstorsjo created this revision.
mstorsjo added reviewers: arsenm, rnk, aemerson.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.
mstorsjo requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
This removes an unnecessary parameter added in
5144f730a8a8a4c7c7984ff945187a9aa83c91ac <https://reviews.llvm.org/rG5144f730a8a8a4c7c7984ff945187a9aa83c91ac>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100890
Files:
llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
llvm/test/CodeGen/AArch64/win64_vararg_float.ll
Index: llvm/test/CodeGen/AArch64/win64_vararg_float.ll
===================================================================
--- llvm/test/CodeGen/AArch64/win64_vararg_float.ll
+++ llvm/test/CodeGen/AArch64/win64_vararg_float.ll
@@ -101,8 +101,22 @@
; GISEL: fmov d0, #3.00000000
; CHECK: mov w3, #4
; CHECK: b other_d_va_fn
- tail call void (double, i32, ...) @other_d_va_fn(double 1.000000e+00, i32 2, double 3.000000e+00, i32 4) #4
+ tail call void (double, i32, ...) @other_d_va_fn(double 1.000000e+00, i32 2, double 3.000000e+00, i32 4)
ret void
}
declare dso_local void @other_d_va_fn(double, i32, ...)
+
+define void @call_d_non_va() nounwind {
+entry:
+; CHECK-LABEL: call_d_non_va:
+; CHECK-DAG: fmov d0, #1.00000000
+; CHECK-DAG: fmov d1, #3.00000000
+; CHECK-DAG: mov w0, #2
+; CHECK-DAG: mov w1, #4
+; CHECK: b other_d_non_va_fn
+ tail call void (double, i32, double, i32) @other_d_non_va_fn(double 1.000000e+00, i32 2, double 3.000000e+00, i32 4)
+ ret void
+}
+
+declare dso_local void @other_d_non_va_fn(double, i32, double, i32)
Index: llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
+++ llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
@@ -164,8 +164,8 @@
struct OutgoingArgHandler : public CallLowering::OutgoingValueHandler {
OutgoingArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI,
MachineInstrBuilder MIB, CCAssignFn *AssignFn,
- CCAssignFn *AssignFnVarArg, bool IsVarArg,
- bool IsTailCall = false, int FPDiff = 0)
+ CCAssignFn *AssignFnVarArg, bool IsTailCall = false,
+ int FPDiff = 0)
: OutgoingValueHandler(MIRBuilder, MRI, AssignFn), MIB(MIB),
AssignFnVarArg(AssignFnVarArg), IsTailCall(IsTailCall), FPDiff(FPDiff),
StackSize(0), SPReg(0) {
@@ -173,7 +173,7 @@
const auto &Subtarget = MF.getSubtarget<AArch64Subtarget>();
bool IsWin =
Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv());
- UseVarArgsCCForFixed = IsVarArg && IsWin;
+ UseVarArgsCCForFixed = IsWin;
}
Register getStackAddress(uint64_t Size, int64_t Offset,
@@ -246,7 +246,7 @@
ISD::ArgFlagsTy Flags,
CCState &State) override {
bool Res;
- if (Info.IsFixed && !UseVarArgsCCForFixed)
+ if (Info.IsFixed && (!UseVarArgsCCForFixed || !State.isVarArg()))
Res = AssignFn(ValNo, ValVT, LocVT, LocInfo, Flags, State);
else
Res = AssignFnVarArg(ValNo, ValVT, LocVT, LocInfo, Flags, State);
@@ -383,8 +383,7 @@
splitToValueTypes(CurArgInfo, SplitArgs, DL, CC);
}
- OutgoingArgHandler Handler(MIRBuilder, MRI, MIB, AssignFn, AssignFn,
- F.isVarArg());
+ OutgoingArgHandler Handler(MIRBuilder, MRI, MIB, AssignFn, AssignFn);
Success =
handleAssignments(MIRBuilder, SplitArgs, Handler, CC, F.isVarArg());
}
@@ -887,7 +886,7 @@
// Do the actual argument marshalling.
OutgoingArgHandler Handler(MIRBuilder, MRI, MIB, AssignFnFixed,
- AssignFnVarArg, Info.IsVarArg, true, FPDiff);
+ AssignFnVarArg, true, FPDiff);
if (!handleAssignments(MIRBuilder, OutArgs, Handler, CalleeCC, Info.IsVarArg))
return false;
@@ -999,7 +998,7 @@
// Do the actual argument marshalling.
OutgoingArgHandler Handler(MIRBuilder, MRI, MIB, AssignFnFixed,
- AssignFnVarArg, Info.IsVarArg, false);
+ AssignFnVarArg, false);
if (!handleAssignments(MIRBuilder, OutArgs, Handler, Info.CallConv,
Info.IsVarArg))
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100890.338998.patch
Type: text/x-patch
Size: 3819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210420/708b111d/attachment.bin>
More information about the llvm-commits
mailing list