summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2019-04-05 21:22:17 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2019-04-05 21:22:17 +0000
commitab8c60867b6d27b97961b91bb8c251b18acbf118 (patch)
tree65e4a92948937b7828b7089339bbf7361020b988 /llvm/include
parentbcf7f3c573ca282d79ca76b250b831457faecafc (diff)
downloadbcm5719-llvm-ab8c60867b6d27b97961b91bb8c251b18acbf118.tar.gz
bcm5719-llvm-ab8c60867b6d27b97961b91bb8c251b18acbf118.zip
[globalisel] Allow combiners to query legality
llvm-svn: 357820
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h b/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
index 734ef30d9d6..417aa402f37 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
@@ -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;
OpenPOWER on IntegriCloud