[llvm] 73f55f7 - [GlobalIsel][X86] Remove some unused setLegalizerInfo* methods. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 4 04:34:25 PDT 2023


Author: Simon Pilgrim
Date: 2023-06-04T12:34:14+01:00
New Revision: 73f55f7928638d385188db553a42f2ab01243a1c

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

LOG: [GlobalIsel][X86] Remove some unused setLegalizerInfo* methods. NFC.

We're moving away from using per-ISA legalization controls and using LegalIf etc. to handle specific ISAs instead.

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 82c74e1796da5..b859415ff7a9e 100644
--- a/llvm/lib/Target/X86/X86LegalizerInfo.cpp
+++ b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
@@ -231,13 +231,9 @@ X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
   setLegalizerInfo64bit();
   setLegalizerInfoSSE1();
   setLegalizerInfoSSE2();
-  setLegalizerInfoSSE41();
-  setLegalizerInfoSSE42();
   setLegalizerInfoAVX();
   setLegalizerInfoAVX2();
   setLegalizerInfoAVX512();
-  setLegalizerInfoAVX512DQ();
-  setLegalizerInfoAVX512BW();
 
   getActionDefinitionsBuilder(G_INTRINSIC_ROUNDEVEN)
     .scalarize(0)
@@ -502,16 +498,6 @@ void X86LegalizerInfo::setLegalizerInfoSSE2() {
   }
 }
 
-void X86LegalizerInfo::setLegalizerInfoSSE41() {
-  if (!Subtarget.hasSSE41())
-    return;
-}
-
-void X86LegalizerInfo::setLegalizerInfoSSE42() {
-  if (!Subtarget.hasSSE42())
-    return;
-}
-
 void X86LegalizerInfo::setLegalizerInfoAVX() {
   if (!Subtarget.hasAVX())
     return;
@@ -622,13 +608,3 @@ void X86LegalizerInfo::setLegalizerInfoAVX512() {
     LegacyInfo.setAction({G_EXTRACT, Ty}, LegacyLegalizeActions::Legal);
   }
 }
-
-void X86LegalizerInfo::setLegalizerInfoAVX512DQ() {
-  if (!(Subtarget.hasAVX512() && Subtarget.hasDQI()))
-    return;
-}
-
-void X86LegalizerInfo::setLegalizerInfoAVX512BW() {
-  if (!(Subtarget.hasAVX512() && Subtarget.hasBWI()))
-    return;
-}

diff  --git a/llvm/lib/Target/X86/X86LegalizerInfo.h b/llvm/lib/Target/X86/X86LegalizerInfo.h
index cdde42faf5df5..79fc7e9290dda 100644
--- a/llvm/lib/Target/X86/X86LegalizerInfo.h
+++ b/llvm/lib/Target/X86/X86LegalizerInfo.h
@@ -40,13 +40,9 @@ class X86LegalizerInfo : public LegalizerInfo {
   void setLegalizerInfo64bit();
   void setLegalizerInfoSSE1();
   void setLegalizerInfoSSE2();
-  void setLegalizerInfoSSE41();
-  void setLegalizerInfoSSE42();
   void setLegalizerInfoAVX();
   void setLegalizerInfoAVX2();
   void setLegalizerInfoAVX512();
-  void setLegalizerInfoAVX512DQ();
-  void setLegalizerInfoAVX512BW();
 };
 } // namespace llvm
 #endif


        


More information about the llvm-commits mailing list