LLVM 24.0.0git
llvm::LegalityQuery Struct Reference

The LegalityQuery object bundles together all the information that's needed to decide whether a given operation is legal or not. More...

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

Classes

struct  MemDesc

Public Member Functions

constexpr LegalityQuery (unsigned Opcode, ArrayRef< LLT > Types, ArrayRef< MemDesc > MMODescrs={}, ArrayRef< int64_t > Immediates={})
LLVM_ABI raw_ostreamprint (raw_ostream &OS) const

Public Attributes

unsigned Opcode
ArrayRef< LLTTypes
ArrayRef< MemDescMMODescrs
 Operations which require memory can use this to place requirements on the memory type for each MMO.
ArrayRef< int64_t > Immediates

Detailed Description

The LegalityQuery object bundles together all the information that's needed to decide whether a given operation is legal or not.

For efficiency, it doesn't make a copy of Types so care must be taken not to free it before using the query.

Definition at line 106 of file LegalizerInfo.h.

Constructor & Destructor Documentation

◆ LegalityQuery()

llvm::LegalityQuery::LegalityQuery ( unsigned Opcode,
ArrayRef< LLT > Types,
ArrayRef< MemDesc > MMODescrs = {},
ArrayRef< int64_t > Immediates = {} )
inlineconstexpr

Definition at line 132 of file LegalizerInfo.h.

References MMODescrs, Opcode, and Types.

Member Function Documentation

◆ print()

raw_ostream & LegalityQuery::print ( raw_ostream & OS) const

Definition at line 82 of file LegalizerInfo.cpp.

References Immediates, MMODescrs, Opcode, and Types.

Referenced by llvm::LegalizeRuleSet::apply().

Member Data Documentation

◆ Immediates

ArrayRef<int64_t> llvm::LegalityQuery::Immediates

Definition at line 130 of file LegalizerInfo.h.

Referenced by print().

◆ MMODescrs

ArrayRef<MemDesc> llvm::LegalityQuery::MMODescrs

Operations which require memory can use this to place requirements on the memory type for each MMO.

Definition at line 128 of file LegalizerInfo.h.

Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), CheckTy0Ty1MemSizeAlign(), isLoadStoreSizeLegal(), LegalityQuery(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), print(), shouldWidenLoad(), and llvm::X86LegalizerInfo::X86LegalizerInfo().

◆ Opcode

◆ Types


The documentation for this struct was generated from the following files: