LLVM 23.0.0git
llvm::PhiLoweringHelper Class Referenceabstract

#include "Target/AMDGPU/SILowerI1Copies.h"

Public Member Functions

 PhiLoweringHelper (MachineFunction *MF, MachineDominatorTree *DT, MachinePostDominatorTree *PDT)
virtual ~PhiLoweringHelper ()=default
bool lowerPhis ()
bool isConstantLaneMask (Register Reg, bool &Val) const
MachineBasicBlock::iterator getSaluInsertionAtEnd (MachineBasicBlock &MBB) const
 Return a point at the end of the given MBB to insert SALU instructions for lane mask calculation.
void initializeLaneMaskRegisterAttributes (Register LaneMask)
void initializeLaneMaskRegisterAttributes (MachineRegisterInfo::VRegAttrs Attrs)
bool isLaneMaskReg (Register Reg) const
virtual void markAsLaneMask (Register DstReg) const =0
virtual void getCandidatesForLowering (SmallVectorImpl< MachineInstr * > &Vreg1Phis) const =0
virtual void collectIncomingValuesFromPhi (const MachineInstr *MI, SmallVectorImpl< Incoming > &Incomings) const =0
virtual void replaceDstReg (Register NewReg, Register OldReg, MachineBasicBlock *MBB)=0
virtual void buildMergeLaneMasks (MachineBasicBlock &MBB, MachineBasicBlock::iterator I, const DebugLoc &DL, Register DstReg, Register PrevReg, Register CurReg)=0
virtual void constrainAsLaneMask (Incoming &In)=0

Protected Attributes

bool IsWave32 = false
MachineFunctionMF = nullptr
MachineDominatorTreeDT = nullptr
MachinePostDominatorTreePDT = nullptr
MachineRegisterInfoMRI = nullptr
const GCNSubtargetST = nullptr
const SIInstrInfoTII = nullptr
MachineRegisterInfo::VRegAttrs LaneMaskRegAttrs
const AMDGPU::LaneMaskConstantsLMC = nullptr
DenseSet< RegisterPhiRegisters

Detailed Description

Definition at line 39 of file SILowerI1Copies.h.

Constructor & Destructor Documentation

◆ PhiLoweringHelper()

PhiLoweringHelper::PhiLoweringHelper ( MachineFunction * MF,
MachineDominatorTree * DT,
MachinePostDominatorTree * PDT )

Definition at line 442 of file SILowerI1Copies.cpp.

References DT, llvm::get(), LMC, MF, MRI, PDT, ST, and TII.

◆ ~PhiLoweringHelper()

virtual llvm::PhiLoweringHelper::~PhiLoweringHelper ( )
virtualdefault

Member Function Documentation

◆ buildMergeLaneMasks()

virtual void llvm::PhiLoweringHelper::buildMergeLaneMasks ( MachineBasicBlock & MBB,
MachineBasicBlock::iterator I,
const DebugLoc & DL,
Register DstReg,
Register PrevReg,
Register CurReg )
pure virtual

References DL, I, and MBB.

Referenced by lowerPhis().

◆ collectIncomingValuesFromPhi()

virtual void llvm::PhiLoweringHelper::collectIncomingValuesFromPhi ( const MachineInstr * MI,
SmallVectorImpl< Incoming > & Incomings ) const
pure virtual

References MI.

Referenced by lowerPhis().

◆ constrainAsLaneMask()

virtual void llvm::PhiLoweringHelper::constrainAsLaneMask ( Incoming & In)
pure virtual

Referenced by lowerPhis().

◆ getCandidatesForLowering()

virtual void llvm::PhiLoweringHelper::getCandidatesForLowering ( SmallVectorImpl< MachineInstr * > & Vreg1Phis) const
pure virtual

Referenced by lowerPhis().

◆ getSaluInsertionAtEnd()

MachineBasicBlock::iterator PhiLoweringHelper::getSaluInsertionAtEnd ( MachineBasicBlock & MBB) const

Return a point at the end of the given MBB to insert SALU instructions for lane mask calculation.

Take terminators and SCC into account.

Definition at line 697 of file SILowerI1Copies.cpp.

References I, instrDefsUsesSCC(), llvm_unreachable, and MBB.

Referenced by lowerPhis().

◆ initializeLaneMaskRegisterAttributes() [1/2]

void llvm::PhiLoweringHelper::initializeLaneMaskRegisterAttributes ( MachineRegisterInfo::VRegAttrs Attrs)
inline

Definition at line 71 of file SILowerI1Copies.h.

References LaneMaskRegAttrs.

◆ initializeLaneMaskRegisterAttributes() [2/2]

void llvm::PhiLoweringHelper::initializeLaneMaskRegisterAttributes ( Register LaneMask)
inline

Definition at line 66 of file SILowerI1Copies.h.

References LaneMaskRegAttrs, and MRI.

Referenced by lowerPhis().

◆ isConstantLaneMask()

bool PhiLoweringHelper::isConstantLaneMask ( Register Reg,
bool & Val ) const

Definition at line 644 of file SILowerI1Copies.cpp.

References isLaneMaskReg(), LMC, MI, and MRI.

◆ isLaneMaskReg()

bool llvm::PhiLoweringHelper::isLaneMaskReg ( Register Reg) const
inline

Definition at line 75 of file SILowerI1Copies.h.

References MRI, Reg, ST, and TII.

Referenced by isConstantLaneMask().

◆ lowerPhis()

◆ markAsLaneMask()

virtual void llvm::PhiLoweringHelper::markAsLaneMask ( Register DstReg) const
pure virtual

Referenced by lowerPhis().

◆ replaceDstReg()

virtual void llvm::PhiLoweringHelper::replaceDstReg ( Register NewReg,
Register OldReg,
MachineBasicBlock * MBB )
pure virtual

References MBB.

Referenced by lowerPhis().

Member Data Documentation

◆ DT

MachineDominatorTree* llvm::PhiLoweringHelper::DT = nullptr
protected

Definition at line 48 of file SILowerI1Copies.h.

Referenced by lowerPhis(), and PhiLoweringHelper().

◆ IsWave32

bool llvm::PhiLoweringHelper::IsWave32 = false
protected

Definition at line 46 of file SILowerI1Copies.h.

◆ LaneMaskRegAttrs

MachineRegisterInfo::VRegAttrs llvm::PhiLoweringHelper::LaneMaskRegAttrs
protected

◆ LMC

const AMDGPU::LaneMaskConstants* llvm::PhiLoweringHelper::LMC = nullptr
protected

Definition at line 54 of file SILowerI1Copies.h.

Referenced by isConstantLaneMask(), and PhiLoweringHelper().

◆ MF

MachineFunction* llvm::PhiLoweringHelper::MF = nullptr
protected

Definition at line 47 of file SILowerI1Copies.h.

Referenced by lowerPhis(), and PhiLoweringHelper().

◆ MRI

MachineRegisterInfo* llvm::PhiLoweringHelper::MRI = nullptr
protected

◆ PDT

MachinePostDominatorTree* llvm::PhiLoweringHelper::PDT = nullptr
protected

Definition at line 49 of file SILowerI1Copies.h.

Referenced by lowerPhis(), and PhiLoweringHelper().

◆ PhiRegisters

DenseSet<Register> llvm::PhiLoweringHelper::PhiRegisters
protected

Definition at line 57 of file SILowerI1Copies.h.

Referenced by lowerPhis().

◆ ST

const GCNSubtarget* llvm::PhiLoweringHelper::ST = nullptr
protected

Definition at line 51 of file SILowerI1Copies.h.

Referenced by isLaneMaskReg(), and PhiLoweringHelper().

◆ TII

const SIInstrInfo* llvm::PhiLoweringHelper::TII = nullptr
protected

Definition at line 52 of file SILowerI1Copies.h.

Referenced by isLaneMaskReg(), lowerPhis(), and PhiLoweringHelper().


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