[llvm] [GlobalISel][NFC]Update the comments of XXLegalizerInfo (PR #76918)

Ningning Shi 史宁宁 via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 18:37:29 PST 2024


https://github.com/shining1984 updated https://github.com/llvm/llvm-project/pull/76918

>From 4689be0dfa3a51c4c661aac2dcf3f5b7ef7ebeb1 Mon Sep 17 00:00:00 2001
From: shining1984 <shiningning at iscas.ac.cn>
Date: Thu, 4 Jan 2024 15:38:29 +0800
Subject: [PATCH 1/2] [GlobalISel][NFC]Update the comments of XXLegalizerInfo

Update the LegalizerInfo comments of AArch64/AMD64/ARM/M68k/RISCV/x86,
according the BPFLegalizerInfo.
---
 llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h | 3 ++-
 llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h         | 3 ++-
 llvm/lib/Target/ARM/ARMLegalizerInfo.h               | 3 ++-
 llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h       | 3 ++-
 llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h     | 3 ++-
 llvm/lib/Target/X86/GISel/X86LegalizerInfo.h         | 3 ++-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
index e96ec6db3a1bc2..29ac64d8a90c94 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
+++ b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
@@ -23,7 +23,8 @@ namespace llvm {
 
 class AArch64Subtarget;
 
-/// This class provides the information for the target register banks.
+/// This class provides the information for the AArch64 target legalizer for
+/// GlobalISel.
 class AArch64LegalizerInfo : public LegalizerInfo {
 public:
   AArch64LegalizerInfo(const AArch64Subtarget &ST);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
index 1fa064891a2d93..f30be891eba507 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
@@ -27,7 +27,8 @@ class MachineIRBuilder;
 namespace AMDGPU {
 struct ImageDimIntrinsicInfo;
 }
-/// This class provides the information for the target register banks.
+/// This class provides the information for the AMDGPU target legalizer for
+/// GlobalISel.
 class AMDGPULegalizerInfo final : public LegalizerInfo {
   const GCNSubtarget &ST;
 
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.h b/llvm/lib/Target/ARM/ARMLegalizerInfo.h
index 3636cc6402b810..e59ea9c06c49cb 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.h
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.h
@@ -23,7 +23,8 @@ namespace llvm {
 
 class ARMSubtarget;
 
-/// This class provides the information for the target register banks.
+/// This class provides the information for the ARM target legalizer for
+/// GlobalISel.
 class ARMLegalizerInfo : public LegalizerInfo {
 public:
   ARMLegalizerInfo(const ARMSubtarget &ST);
diff --git a/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h b/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h
index a10401ed1a9a3e..bc7d2a53ae62cb 100644
--- a/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h
+++ b/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h
@@ -20,7 +20,8 @@ namespace llvm {
 
 class M68kSubtarget;
 
-/// This struct provides the information for the target register banks.
+/// This class provides the information for the M68k target legalizer for
+/// GlobalISel.
 struct M68kLegalizerInfo : public LegalizerInfo {
 public:
   M68kLegalizerInfo(const M68kSubtarget &ST);
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
index 4335bd0cbbff0e..18a0e2b637a140 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
+++ b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
@@ -21,7 +21,8 @@ class GISelChangeObserver;
 class MachineIRBuilder;
 class RISCVSubtarget;
 
-/// This class provides the information for the target register banks.
+/// This class provides the information for the RISCV target legalizer for
+/// GlobalISel.
 class RISCVLegalizerInfo : public LegalizerInfo {
   const RISCVSubtarget &STI;
   const unsigned XLen;
diff --git a/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h b/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h
index 1f69feceae2750..99258d0dc397a0 100644
--- a/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h
+++ b/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h
@@ -21,7 +21,8 @@ namespace llvm {
 class X86Subtarget;
 class X86TargetMachine;
 
-/// This class provides the information for the target register banks.
+/// This class provides the information for the X86 target legalizer for
+/// GlobalISel.
 class X86LegalizerInfo : public LegalizerInfo {
 private:
   /// Keep a reference to the X86Subtarget around so that we can

>From fa07060de50606601f326298eb0f28d490d23acf Mon Sep 17 00:00:00 2001
From: shining1984 <shiningning at iscas.ac.cn>
Date: Fri, 5 Jan 2024 10:37:08 +0800
Subject: [PATCH 2/2] [GlobalISel][NFC]Delete the wrong comments of
 XXLegalizerInfo

Delete the LegalizerInfo comments of AArch64/AMD64/ARM/M68k/RISCV/x86,
they are copied from register banks.
---
 llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h | 2 --
 llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h         | 2 --
 llvm/lib/Target/ARM/ARMLegalizerInfo.h               | 2 --
 llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h       | 2 --
 llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h     | 2 --
 llvm/lib/Target/X86/GISel/X86LegalizerInfo.h         | 2 --
 6 files changed, 12 deletions(-)

diff --git a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
index 29ac64d8a90c94..c62a9d847c52f6 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
+++ b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.h
@@ -23,8 +23,6 @@ namespace llvm {
 
 class AArch64Subtarget;
 
-/// This class provides the information for the AArch64 target legalizer for
-/// GlobalISel.
 class AArch64LegalizerInfo : public LegalizerInfo {
 public:
   AArch64LegalizerInfo(const AArch64Subtarget &ST);
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
index f30be891eba507..56aabd4f6ab71b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
@@ -27,8 +27,6 @@ class MachineIRBuilder;
 namespace AMDGPU {
 struct ImageDimIntrinsicInfo;
 }
-/// This class provides the information for the AMDGPU target legalizer for
-/// GlobalISel.
 class AMDGPULegalizerInfo final : public LegalizerInfo {
   const GCNSubtarget &ST;
 
diff --git a/llvm/lib/Target/ARM/ARMLegalizerInfo.h b/llvm/lib/Target/ARM/ARMLegalizerInfo.h
index e59ea9c06c49cb..d6ce4eb1055b48 100644
--- a/llvm/lib/Target/ARM/ARMLegalizerInfo.h
+++ b/llvm/lib/Target/ARM/ARMLegalizerInfo.h
@@ -23,8 +23,6 @@ namespace llvm {
 
 class ARMSubtarget;
 
-/// This class provides the information for the ARM target legalizer for
-/// GlobalISel.
 class ARMLegalizerInfo : public LegalizerInfo {
 public:
   ARMLegalizerInfo(const ARMSubtarget &ST);
diff --git a/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h b/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h
index bc7d2a53ae62cb..cbe30ec494c959 100644
--- a/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h
+++ b/llvm/lib/Target/M68k/GISel/M68kLegalizerInfo.h
@@ -20,8 +20,6 @@ namespace llvm {
 
 class M68kSubtarget;
 
-/// This class provides the information for the M68k target legalizer for
-/// GlobalISel.
 struct M68kLegalizerInfo : public LegalizerInfo {
 public:
   M68kLegalizerInfo(const M68kSubtarget &ST);
diff --git a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
index 18a0e2b637a140..f3ec6be167347e 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
+++ b/llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h
@@ -21,8 +21,6 @@ class GISelChangeObserver;
 class MachineIRBuilder;
 class RISCVSubtarget;
 
-/// This class provides the information for the RISCV target legalizer for
-/// GlobalISel.
 class RISCVLegalizerInfo : public LegalizerInfo {
   const RISCVSubtarget &STI;
   const unsigned XLen;
diff --git a/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h b/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h
index 99258d0dc397a0..12134f7b00f1cf 100644
--- a/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h
+++ b/llvm/lib/Target/X86/GISel/X86LegalizerInfo.h
@@ -21,8 +21,6 @@ namespace llvm {
 class X86Subtarget;
 class X86TargetMachine;
 
-/// This class provides the information for the X86 target legalizer for
-/// GlobalISel.
 class X86LegalizerInfo : public LegalizerInfo {
 private:
   /// Keep a reference to the X86Subtarget around so that we can



More information about the llvm-commits mailing list