[llvm] [NVPTX][NFC] Refactor and cleanup NVPTXISelLowering call lowering 2/n (PR #137666)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 28 12:41:18 PDT 2025
================
@@ -1778,20 +1731,19 @@ SDValue NVPTXTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
CalleeFunc->addFnAttr("nvptx-libcall-callee", "true");
}
- if (isIndirectCall) {
+ if (IsIndirectCall) {
// This is indirect function call case : PTX requires a prototype of the
// form
// proto_0 : .callprototype(.param .b32 _) _ (.param .b32 _);
// to be emitted, and the label has to used as the last arg of call
// instruction.
// The prototype is embedded in a string and put as the operand for a
// CallPrototype SDNode which will print out to the value of the string.
- SDVTList ProtoVTs = DAG.getVTList(MVT::Other, MVT::Glue);
std::string Proto = getPrototype(
- DL, RetTy, Args, Outs, retAlignment,
+ DL, RetTy, Args, CLI.Outs, RetAlign,
HasVAArgs
- ? std::optional<std::pair<unsigned, const APInt &>>(std::make_pair(
- CLI.NumFixedArgs, VADeclareParam->getConstantOperandAPInt(1)))
+ ? std::optional<std::pair<unsigned, unsigned>>(std::make_pair(
+ CLI.NumFixedArgs, VADeclareParam.getConstantOperandVal(1)))
----------------
Artem-B wrote:
We could let compiler deduce the template parameters and skip make_pair.
```
std::optional(std::pair(CLI.NumFixedArgs, VADeclareParam.getConstantOperandVal(1)))
```
https://github.com/llvm/llvm-project/pull/137666
More information about the llvm-commits
mailing list