Skip to content

Commit f83b024

Browse files
authored
[H2BLB][GISel] Use custom incoming value assigner (#46)
Use H2BLBIncomingValueAssigner instead of the base CallLowering::IncomingValueAssigner when lowering formal arguments. This is mainly a consistency cleanup. H2BLBIncomingValueAssigner overrides assignArg(), but the previous code instantiated the base assigner directly, so the custom override was never used. The book example also uses H2BLBIncomingValueAssigner at this point. No functional change is expected, since the override currently delegates to the same AssignFn path.
1 parent 3b92282 commit f83b024

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

llvm/lib/Target/H2BLB/GISel/H2BLBCallLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ namespace {
6565

6666
struct H2BLBIncomingValueAssigner : public CallLowering::IncomingValueAssigner {
6767
H2BLBIncomingValueAssigner(CCAssignFn *AssignFn_, CCAssignFn *AssignFnVarArg_,
68-
const H2BLBSubtarget &Subtarget_, bool IsReturn)
68+
bool IsReturn)
6969
: IncomingValueAssigner(AssignFn_, AssignFnVarArg_) {}
7070

7171
bool assignArg(unsigned ValNo, EVT OrigVT, MVT ValVT, MVT LocVT,
@@ -341,7 +341,7 @@ bool H2BLBCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
341341

342342
CCAssignFn *AssignFn = CC_H2BLB_Common;
343343

344-
CallLowering::IncomingValueAssigner Assigner(AssignFn, AssignFn);
344+
H2BLBIncomingValueAssigner Assigner(AssignFn, AssignFn, /*IsReturn*/ false);
345345
FormalArgHandler Handler(MIRBuilder, MRI);
346346
SmallVector<CCValAssign, 16> ArgLocs;
347347
CCState CCInfo(F.getCallingConv(), F.isVarArg(), MF, ArgLocs, F.getContext());

0 commit comments

Comments
 (0)