Skip to content

Commit

Permalink
[globalisel] Allow combiners to query legality
Browse files Browse the repository at this point in the history
llvm-svn: 357820
  • Loading branch information
dsandersllvm committed Apr 5, 2019
1 parent bcf7f3c commit ab8c608
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,9 @@ class LegalizerInfo {
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;
Expand Down

0 comments on commit ab8c608

Please sign in to comment.