LLVM  12.0.0git
Public Member Functions | List of all members
llvm::LegalizeRule Class Reference

A single rule in a legalizer info ruleset. More...

#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"

Public Member Functions

 LegalizeRule (LegalityPredicate Predicate, LegalizeAction Action, LegalizeMutation Mutation=nullptr)
bool match (const LegalityQuery &Query) const
 Test whether the LegalityQuery matches. More...
LegalizeAction getAction () const
std::pair< unsigned, LLTdetermineMutation (const LegalityQuery &Query) const
 Determine the change to make. More...

Detailed Description

A single rule in a legalizer info ruleset.

The specified action is chosen when the predicate is true. Where appropriate for the action (e.g. for WidenScalar) the new type is selected using the given mutator.

Definition at line 326 of file LegalizerInfo.h.

Constructor & Destructor Documentation

◆ LegalizeRule()

llvm::LegalizeRule::LegalizeRule ( LegalityPredicate  Predicate,
LegalizeAction  Action,
LegalizeMutation  Mutation = nullptr 

Definition at line 332 of file LegalizerInfo.h.

Member Function Documentation

◆ determineMutation()

std::pair<unsigned, LLT> llvm::LegalizeRule::determineMutation ( const LegalityQuery Query) const

Determine the change to make.

Definition at line 344 of file LegalizerInfo.h.

References Mutation.

◆ getAction()

LegalizeAction llvm::LegalizeRule::getAction ( ) const

Definition at line 341 of file LegalizerInfo.h.

Referenced by hasNoSimpleLoops(), and mutationIsSane().

◆ match()

bool llvm::LegalizeRule::match ( const LegalityQuery Query) const

Test whether the LegalityQuery matches.

Definition at line 337 of file LegalizerInfo.h.

The documentation for this class was generated from the following file: