GlobalISel: Add accessor to known bits to CombinerHelper
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 29 Mar 2020 00:03:44 +0000 (20:03 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 30 Mar 2020 18:34:42 +0000 (11:34 -0700)
I need to pass known bits to a target combine matcher (which for some
reason aren't methods in a subclass of CombinerHelper?)

llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h

index f97c22a..d5464cb 100644 (file)
@@ -62,6 +62,10 @@ public:
                  GISelKnownBits *KB = nullptr,
                  MachineDominatorTree *MDT = nullptr);
 
+  GISelKnownBits *getKnownBits() const {
+    return KB;
+  }
+
   /// MachineRegisterInfo::replaceRegWith() and inform the observer of the changes
   void replaceRegWith(MachineRegisterInfo &MRI, Register FromReg, Register ToReg) const;