LLVM 20.0.0git
Public Member Functions | Protected Member Functions | List of all members
llvm::InlineAsmLowering Class Reference

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

Inheritance diagram for llvm::InlineAsmLowering:
Inheritance graph
[legend]

Public Member Functions

bool lowerInlineAsm (MachineIRBuilder &MIRBuilder, const CallBase &CB, std::function< ArrayRef< Register >(const Value &Val)> GetOrCreateVRegs) const
 Lower the given inline asm call instruction GetOrCreateVRegs is a callback to materialize a register for the input and output operands of the inline asm.
 
virtual bool lowerAsmOperandForConstraint (Value *Val, StringRef Constraint, std::vector< MachineOperand > &Ops, MachineIRBuilder &MIRBuilder) const
 Lower the specified operand into the Ops vector.
 
 InlineAsmLowering (const TargetLowering *TLI)
 
virtual ~InlineAsmLowering ()=default
 

Protected Member Functions

const TargetLoweringgetTLI () const
 Getter for generic TargetLowering class.
 
template<class XXXTargetLowering >
const XXXTargetLowering * getTLI () const
 Getter for target specific TargetLowering class.
 

Detailed Description

Definition at line 28 of file InlineAsmLowering.h.

Constructor & Destructor Documentation

◆ InlineAsmLowering()

llvm::InlineAsmLowering::InlineAsmLowering ( const TargetLowering TLI)
inline

Definition at line 61 of file InlineAsmLowering.h.

◆ ~InlineAsmLowering()

virtual llvm::InlineAsmLowering::~InlineAsmLowering ( )
virtualdefault

Member Function Documentation

◆ getTLI() [1/2]

const TargetLowering * llvm::InlineAsmLowering::getTLI ( ) const
inlineprotected

Getter for generic TargetLowering class.

Definition at line 53 of file InlineAsmLowering.h.

◆ getTLI() [2/2]

template<class XXXTargetLowering >
const XXXTargetLowering * llvm::InlineAsmLowering::getTLI ( ) const
inlineprotected

Getter for target specific TargetLowering class.

Definition at line 56 of file InlineAsmLowering.h.

◆ lowerAsmOperandForConstraint()

bool InlineAsmLowering::lowerAsmOperandForConstraint ( Value Val,
StringRef  Constraint,
std::vector< MachineOperand > &  Ops,
MachineIRBuilder MIRBuilder 
) const
virtual

Lower the specified operand into the Ops vector.

Val is the IR input value to be lowered Constraint is the user supplied constraint string Ops is the vector to be filled with the lowered operands

Returns
True if the lowering succeeds, false otherwise.

Reimplemented in llvm::SPIRVInlineAsmLowering.

Definition at line 623 of file InlineAsmLowering.cpp.

References assert(), llvm::MachineOperand::CreateImm(), and llvm::StringRef::size().

Referenced by llvm::SPIRVInlineAsmLowering::lowerAsmOperandForConstraint(), and lowerInlineAsm().

◆ lowerInlineAsm()

bool InlineAsmLowering::lowerInlineAsm ( MachineIRBuilder MIRBuilder,
const CallBase CB,
std::function< ArrayRef< Register >(const Value &Val)>  GetOrCreateVRegs 
) const

Lower the given inline asm call instruction GetOrCreateVRegs is a callback to materialize a register for the input and output operands of the inline asm.

Returns
True if the lowering succeeds, false otherwise.

ConstraintOperands - Information about all of the constraints.

Definition at line 215 of file InlineAsmLowering.cpp.

References llvm::MachineInstrBuilder::addExternalSymbol(), llvm::MachineInstrBuilder::addImm(), assert(), buildAnyextOrCopy(), llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::MachineIRBuilder::buildTrunc(), llvm::TargetLowering::C_Address, llvm::TargetLowering::C_Immediate, llvm::TargetLowering::C_Memory, llvm::TargetLowering::C_Other, llvm::TargetLowering::C_Register, llvm::TargetLowering::C_RegisterClass, llvm::TargetLowering::C_Unknown, llvm::TargetLowering::AsmOperandInfo::CallOperandVal, llvm::InlineAsm::Clobber, computeConstraintToUse(), llvm::TargetLowering::AsmOperandInfo::ConstraintCode, llvm::TargetLowering::AsmOperandInfo::ConstraintType, llvm::dbgs(), llvm::RegState::Define, DL, llvm::RegState::EarlyClobber, F, llvm::TargetLoweringBase::getAsmOperandValueType(), llvm::MachineFunction::getFunction(), llvm::TargetRegisterClass::getID(), llvm::getImplRegState(), llvm::TargetLowering::getInlineAsmMemConstraint(), llvm::TargetLowering::AsmOperandInfo::getMatchedOperand(), llvm::MachineIRBuilder::getMF(), llvm::MachineIRBuilder::getMRI(), llvm::MachineInstr::getNumOperands(), getNumOpRegs(), llvm::TargetSubtargetInfo::getRegisterInfo(), getRegistersForValue(), llvm::TargetLowering::getRoundingControlRegisters(), llvm::TargetLoweringBase::getSimpleValueType(), llvm::EVT::getSimpleVT(), llvm::LLT::getSizeInBits(), llvm::MachineFunction::getSubtarget(), llvm::Function::hasFnAttribute(), llvm::InlineAsm::Imm, llvm::RegState::Implicit, llvm::RegState::ImplicitDefine, llvm::MachineIRBuilder::insertInstr(), llvm::InlineAsm::isClobber, llvm::InlineAsm::ConstraintInfo::isEarlyClobber, llvm::InlineAsm::ConstraintInfo::isIndirect, llvm::InlineAsm::isInput, llvm::InlineAsm::isLabel, llvm::TargetLowering::AsmOperandInfo::isMatchingInputConstraint(), llvm::InlineAsm::Flag::isMemKind(), llvm::InlineAsm::isOutput, llvm::InlineAsm::Flag::isRegDefEarlyClobberKind(), llvm::InlineAsm::Flag::isRegDefKind(), llvm::LLT::isScalar(), llvm::Type::isSingleValueType(), LLVM_DEBUG, lowerAsmOperandForConstraint(), llvm::InlineAsm::Mem, MRI, llvm::LLVMContext::OB_convergencectrl, llvm::TargetLowering::ParseConstraints(), llvm::InlineAsm::RegDef, llvm::InlineAsm::RegDefEarlyClobber, llvm::InlineAsm::RegUse, llvm::LLT::scalar(), llvm::InlineAsm::Flag::setMatchingOp(), llvm::InlineAsm::Flag::setMemConstraint(), llvm::ArrayRef< T >::size(), TRI, llvm::InlineAsm::ConstraintInfo::Type, and llvm::InlineAsm::Unknown.


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