[llvm] 974b1a6 - [GlobalIsel][X86] Remove unused private field 'TM' in X86LegalizerInfo (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 06:16:30 PDT 2023


Author: Jie Fu
Date: 2023-06-15T21:15:45+08:00
New Revision: 974b1a6a88fa8ed96577a32b1ae26e81691d3203

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

LOG: [GlobalIsel][X86] Remove unused private field 'TM' in X86LegalizerInfo (NFC)

/data/llvm-project/llvm/lib/Target/X86/X86LegalizerInfo.h:30:27: error: private field 'TM' is not used [-Werror,-Wunused-private-field]
  const X86TargetMachine &TM;
                          ^
1 error generated.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86LegalizerInfo.cpp
    llvm/lib/Target/X86/X86LegalizerInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86LegalizerInfo.cpp b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
index ed246fb25b558..228272c7953c9 100644
--- a/llvm/lib/Target/X86/X86LegalizerInfo.cpp
+++ b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
@@ -26,7 +26,7 @@ using namespace LegalityPredicates;
 
 X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
                                    const X86TargetMachine &TM)
-    : Subtarget(STI), TM(TM) {
+    : Subtarget(STI) {
 
   bool Is64Bit = Subtarget.is64Bit();
   bool HasSSE1 = Subtarget.hasSSE1();

diff  --git a/llvm/lib/Target/X86/X86LegalizerInfo.h b/llvm/lib/Target/X86/X86LegalizerInfo.h
index ba3119a9e9d2a..b951ad687b410 100644
--- a/llvm/lib/Target/X86/X86LegalizerInfo.h
+++ b/llvm/lib/Target/X86/X86LegalizerInfo.h
@@ -27,7 +27,6 @@ class X86LegalizerInfo : public LegalizerInfo {
   /// Keep a reference to the X86Subtarget around so that we can
   /// make the right decision when generating code for 
diff erent targets.
   const X86Subtarget &Subtarget;
-  const X86TargetMachine &TM;
 
 public:
   X86LegalizerInfo(const X86Subtarget &STI, const X86TargetMachine &TM);


        


More information about the llvm-commits mailing list