Skip to content

Commit

Permalink
[NVPTX][NFC] Remove unused parameter of getArgumentAlignment (#78604)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMaclean committed Jan 18, 2024
1 parent cb67dc1 commit 0c195e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1666,8 +1666,7 @@ std::string NVPTXTargetLowering::getPrototype(
return Prototype;
}

Align NVPTXTargetLowering::getArgumentAlignment(SDValue Callee,
const CallBase *CB, Type *Ty,
Align NVPTXTargetLowering::getArgumentAlignment(const CallBase *CB, Type *Ty,
unsigned Idx,
const DataLayout &DL) const {
if (!CB) {
Expand Down Expand Up @@ -1794,7 +1793,7 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
if (IsVAArg)
VAOffset = alignTo(VAOffset, ArgAlign);
} else {
ArgAlign = getArgumentAlignment(Callee, CB, Ty, ParamCount + 1, DL);
ArgAlign = getArgumentAlignment(CB, Ty, ParamCount + 1, DL);
}

unsigned TypeSize =
Expand Down Expand Up @@ -1976,7 +1975,7 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
DeclareRetOps);
InGlue = Chain.getValue(1);
} else {
retAlignment = getArgumentAlignment(Callee, CB, RetTy, 0, DL);
retAlignment = getArgumentAlignment(CB, RetTy, 0, DL);
assert(retAlignment && "retAlignment is guaranteed to be set");
SDVTList DeclareRetVTs = DAG.getVTList(MVT::Other, MVT::Glue);
SDValue DeclareRetOps[] = {
Expand Down Expand Up @@ -2107,7 +2106,7 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
ComputePTXValueVTs(*this, DL, RetTy, VTs, &Offsets, 0);
assert(VTs.size() == Ins.size() && "Bad value decomposition");

Align RetAlign = getArgumentAlignment(Callee, CB, RetTy, 0, DL);
Align RetAlign = getArgumentAlignment(CB, RetTy, 0, DL);
auto VectorInfo = VectorizePTXValueVTs(VTs, Offsets, RetAlign);

SmallVector<EVT, 6> LoadVTs;
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/NVPTX/NVPTXISelLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,8 @@ class NVPTXTargetLowering : public TargetLowering {
SelectionDAG &DAG) const override;
SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override;

Align getArgumentAlignment(SDValue Callee, const CallBase *CB, Type *Ty,
unsigned Idx, const DataLayout &DL) const;
Align getArgumentAlignment(const CallBase *CB, Type *Ty, unsigned Idx,
const DataLayout &DL) const;
};

} // namespace llvm
Expand Down

0 comments on commit 0c195e5

Please sign in to comment.