LLVM 20.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.
 
LegalizeAction getAction () const
 
std::pair< unsigned, LLTdetermineMutation (const LegalityQuery &Query) const
 Determine the change to make.
 

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 399 of file LegalizerInfo.h.

Constructor & Destructor Documentation

◆ LegalizeRule()

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

Definition at line 405 of file LegalizerInfo.h.

References Mutation.

Member Function Documentation

◆ determineMutation()

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

Determine the change to make.

Definition at line 417 of file LegalizerInfo.h.

References Mutation.

◆ getAction()

LegalizeAction llvm::LegalizeRule::getAction ( ) const
inline

Definition at line 414 of file LegalizerInfo.h.

Referenced by hasNoSimpleLoops(), and mutationIsSane().

◆ match()

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

Test whether the LegalityQuery matches.

Definition at line 410 of file LegalizerInfo.h.


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