[llvm] a1163d8 - [NVPTX][NFC] Rename hasAAFeatures() (#127990)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 08:02:23 PST 2025


Author: Durgadoss R
Date: 2025-02-21T21:32:18+05:30
New Revision: a1163d8fd350b54852e9f9c0735b6f4858384b45

URL: https://github.com/llvm/llvm-project/commit/a1163d8fd350b54852e9f9c0735b6f4858384b45
DIFF: https://github.com/llvm/llvm-project/commit/a1163d8fd350b54852e9f9c0735b6f4858384b45.diff

LOG: [NVPTX][NFC] Rename hasAAFeatures() (#127990)

This patch renames hasAAFeatures() to hasArchAccelFeatures()
and updates its usages in tablegen files.

Signed-off-by: Durgadoss R <durgadossr at nvidia.com>

Added: 
    

Modified: 
    llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
    llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
    llvm/lib/Target/NVPTX/NVPTXSubtarget.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td b/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
index f75a70409340f..6a0f708021a16 100644
--- a/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
+++ b/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
@@ -142,7 +142,7 @@ def hasLDU : Predicate<"Subtarget->hasLDU()">;
 def hasPTXASUnreachableBug : Predicate<"Subtarget->hasPTXASUnreachableBug()">;
 def noPTXASUnreachableBug : Predicate<"!Subtarget->hasPTXASUnreachableBug()">;
 def hasOptEnabled : Predicate<"TM.getOptLevel() != CodeGenOptLevel::None">;
-def hasAcceleratedFeatures : Predicate<"Subtarget->hasAAFeatures()">;
+def hasArchAccelFeatures : Predicate<"Subtarget->hasArchAccelFeatures()">;
 
 def doF32FTZ : Predicate<"useF32FTZ()">;
 def doNoF32FTZ : Predicate<"!useF32FTZ()">;

diff  --git a/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td b/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
index 0640d25031c6a..acb9fc9867b0f 100644
--- a/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
+++ b/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
@@ -7566,7 +7566,7 @@ multiclass SET_MAXNREG<string Action, Intrinsic Intr> {
   def : NVPTXInst<(outs), (ins i32imm:$reg_count),
           "setmaxnreg." # Action # ".sync.aligned.u32 $reg_count;",
           [(Intr timm:$reg_count)]>,
-    Requires<[hasAcceleratedFeatures, hasSM<90>, hasPTX<80>]>;
+    Requires<[hasArchAccelFeatures, hasSM<90>, hasPTX<80>]>;
 }
 
 defm INT_SET_MAXNREG_INC : SET_MAXNREG<"inc", int_nvvm_setmaxnreg_inc_sync_aligned_u32>;

diff  --git a/llvm/lib/Target/NVPTX/NVPTXSubtarget.h b/llvm/lib/Target/NVPTX/NVPTXSubtarget.h
index 851c9152e4cb8..09d7cb9837a98 100644
--- a/llvm/lib/Target/NVPTX/NVPTXSubtarget.h
+++ b/llvm/lib/Target/NVPTX/NVPTXSubtarget.h
@@ -125,11 +125,11 @@ class NVPTXSubtarget : public NVPTXGenSubtargetInfo {
   unsigned int getSmVersion() const { return getFullSmVersion() / 10; }
   // GPUs with "a" suffix have include architecture-accelerated features that
   // are supported on the specified architecture only, hence such targets do not
-  // follow the onion layer model. hasAAFeatures() allows distinguishing such
-  // GPU variants from the base GPU architecture.
+  // follow the onion layer model. hasArchAccelFeatures() allows
+  // distinguishing such GPU variants from the base GPU architecture.
   // - 0 represents base GPU model,
   // - non-zero value identifies particular architecture-accelerated variant.
-  bool hasAAFeatures() const { return getFullSmVersion() % 10; }
+  bool hasArchAccelFeatures() const { return getFullSmVersion() % 10; }
 
   // If the user did not provide a target we default to the `sm_30` target.
   std::string getTargetName() const {


        


More information about the llvm-commits mailing list