class LegalizeRule

Declaration

class LegalizeRule { /* full declaration omitted */ };

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.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:393

Member Variables

private llvm::LegalityPredicate Predicate
private llvm::LegalizeActions::LegalizeAction Action
private llvm::LegalizeMutation Mutation

Method Overview

  • public LegalizeRule(llvm::LegalityPredicate Predicate, llvm::LegalizeActions::LegalizeAction Action, llvm::LegalizeMutation Mutation = nullptr)
  • public std::pair<unsigned int, LLT> determineMutation(const llvm::LegalityQuery & Query) const
  • public llvm::LegalizeActions::LegalizeAction getAction() const
  • public bool match(const llvm::LegalityQuery & Query) const

Methods

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

Declared at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:399

Parameters

llvm::LegalityPredicate Predicate
llvm::LegalizeActions::LegalizeAction Action
llvm::LegalizeMutation Mutation = nullptr

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

Description

Determine the change to make.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:411

Parameters

const llvm::LegalityQuery& Query

llvm::LegalizeActions::LegalizeAction getAction()
    const

Declared at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:408

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

Description

Test whether the LegalityQuery matches.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:404

Parameters

const llvm::LegalityQuery& Query