Executes GlobalISel match tables for instruction selection and combining.

Synopsis

Declared in <llvm/CodeGen/GlobalISel/GIMatchTableExecutor.h>

class GIMatchTableExecutor;

Description

Match tables are used by the instruction selector and instruction combiners as their engine to match and apply MIR patterns.

Types

Name

Description

ExecInfoTy

Tables and maps used while interpreting a target match table.

Member Functions

Name

Description

~GIMatchTableExecutor [destructor] [virtual]

Virtual destructor.

setupGeneratedPerFunctionState [virtual]

Set up target‐generated per‐function state for MF.

setupMF [virtual]

Setup per‐MF executor state.

Static Member Functions

Name

Description

fastDecodeULEB128

Decode a ULEB128 value from MatchTable at CurrentIdx.

Data Members

Name

Description

BFI

Optional block frequency info for size‐optimization decisions.

CoverageInfo

Optional rule coverage tracking for matched patterns.

CurMBB

Basic block currently being matched, when needed by predicates.

MF

Machine function currently being processed.

PSI

Optional profile summary info for size‐optimization decisions.

VT

Optional value tracking analysis for the current function.

Protected Types

Name

Description

MatcherState

Mutable state shared across match‐table opcode handlers.

Protected Type Aliases

Name

Description

ComplexRendererFns

Optional list of complex‐pattern operand renderer callbacks.

NewMIVector

Small vector of newly built machine instructions.

RecordedMIVector

Small vector of recorded machine instructions from the match.

Protected Member Functions

Name

Description

GIMatchTableExecutor [constructor]

Construct a match‐table executor with default state.

executeMatchTable

Execute a given matcher table and return true if the match was successful and false otherwise.

getMatchTable [virtual]

Return the match table used by this executor.

isBaseWithConstantOffset

Return true if the operand is a G_PTR_ADD with a G_CONSTANT RHS.

isObviouslySafeToFold

Return true if MI can obviously be folded into IntoMI.

isOperandImmEqual

Return true if MO equals immediate Value (or a splat of it).

runCustomAction [virtual]

Run a custom match‐table action and optionally emit new instructions.

shouldOptForSize

Return true if the current function or block should be optimized for size.

testImmPredicate_APFloat [virtual]

Test an APFloat immediate predicate against Imm.

testImmPredicate_APInt [virtual]

Test an APInt immediate predicate against Imm.

testImmPredicate_I64 [virtual]

Test an I64 immediate predicate against Imm.

testMIPredicate_MI [virtual]

Test a C++ machine‐instruction predicate on MI.

testMOPredicate_MO [virtual]

Test a C++ machine‐operand predicate on MO.

testSimplePredicate [virtual]

Test a simple predicate that takes no match‐table arguments.

Protected Static Member Functions

Name

Description

getRemainingOperands

Return the operands of MI starting at index FirstVarOp.

readBytesAs

Read a value of type Ty from the start of MatchTable.

Derived Classes

Name

Description

Combiner

Combiner implementation. This is per‐function, so passes need to recreate one of these each time they enter a new function.

InstructionSelector

Selects (possibly generic) machine instructions to target‐specific opcodes.

Created with MrDocs