]> granicus.if.org Git - llvm/commitdiff
[globalisel] Allow combiners to query legality
authorDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 5 Apr 2019 21:22:17 +0000 (21:22 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Fri, 5 Apr 2019 21:22:17 +0000 (21:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357820 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/GlobalISel/LegalizerInfo.h

index 734ef30d9d6b439d2ef338079d010c14e4cbd147..417aa402f373da6072bd1563e6b2549c7478d9b9 100644 (file)
@@ -1062,6 +1062,9 @@ public:
   LegalizeActionStep getAction(const MachineInstr &MI,
                                const MachineRegisterInfo &MRI) const;
 
+  bool isLegal(const LegalityQuery &Query) const {
+    return getAction(Query).Action == LegalizeAction::Legal;
+  }
   bool isLegal(const MachineInstr &MI, const MachineRegisterInfo &MRI) const;
   bool isLegalOrCustom(const MachineInstr &MI,
                        const MachineRegisterInfo &MRI) const;