Skip to content

Conversation

@justinfargnoli
Copy link
Contributor

No description provided.

@justinfargnoli justinfargnoli self-assigned this May 6, 2025
@justinfargnoli justinfargnoli changed the title [NVPTX] Touchup combineADDRSPACECAST (NFC) [NVPTX] Touch-up combineADDRSPACECAST (NFC) May 6, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the NVPTX addrspace cast combiner by renaming the function and removing the unused DAGCombinerInfo parameter.

  • Renamed combineADDRSPACECAST to PerformADDRSPACECASTCombine.
  • Updated call sites in PerformDAGCombine to use the new function signature.
Comments suppressed due to low confidence (1)

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp:5689

  • The renaming to 'PerformADDRSPACECASTCombine' is clear. Consider adding a brief documentation comment noting that the DAGCombinerInfo parameter was removed, so that future maintainers understand the change.
static SDValue PerformADDRSPACECASTCombine(SDNode *N) {

@llvmbot
Copy link
Member

llvmbot commented May 6, 2025

@llvm/pr-subscribers-backend-nvptx

Author: Justin Fargnoli (justinfargnoli)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/138779.diff

1 Files Affected:

  • (modified) llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp (+2-3)
diff --git a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
index 3769aae7b620f..0b624981cdbc8 100644
--- a/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
@@ -5686,8 +5686,7 @@ PerformBUILD_VECTORCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
   return DAG.getNode(ISD::BITCAST, DL, VT, PRMT);
 }
 
-static SDValue combineADDRSPACECAST(SDNode *N,
-                                    TargetLowering::DAGCombinerInfo &DCI) {
+static SDValue PerformADDRSPACECASTCombine(SDNode *N) {
   auto *ASCN1 = cast<AddrSpaceCastSDNode>(N);
 
   if (auto *ASCN2 = dyn_cast<AddrSpaceCastSDNode>(ASCN1->getOperand(0))) {
@@ -5736,7 +5735,7 @@ SDValue NVPTXTargetLowering::PerformDAGCombine(SDNode *N,
     case ISD::BUILD_VECTOR:
       return PerformBUILD_VECTORCombine(N, DCI);
     case ISD::ADDRSPACECAST:
-      return combineADDRSPACECAST(N, DCI);
+      return PerformADDRSPACECASTCombine(N);
   }
   return SDValue();
 }


static SDValue combineADDRSPACECAST(SDNode *N,
TargetLowering::DAGCombinerInfo &DCI) {
static SDValue PerformADDRSPACECASTCombine(SDNode *N) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the previous name is shorter and more consistent with LLVM stylistic standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants