LLVM 22.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
DenseSet< RegisterPhiRegisters
Register ExecReg
unsigned MovOp
unsigned AndOp
unsigned OrOp
unsigned XorOp
unsigned AndN2Op
unsigned OrN2Op

Detailed Description

Definition at line 38 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 AndN2Op, AndOp, DT, ExecReg, IsWave32, MF, MovOp, MRI, OrN2Op, OrOp, PDT, ST, TII, and XorOp.

◆ ~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 716 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 77 of file SILowerI1Copies.h.

References LaneMaskRegAttrs.

◆ initializeLaneMaskRegisterAttributes() [2/2]

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

Definition at line 72 of file SILowerI1Copies.h.

References LaneMaskRegAttrs, and MRI.

Referenced by lowerPhis().

◆ isConstantLaneMask()

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

Definition at line 663 of file SILowerI1Copies.cpp.

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

◆ isLaneMaskReg()

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

Definition at line 81 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

◆ AndN2Op

unsigned llvm::PhiLoweringHelper::AndN2Op
protected

Definition at line 63 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ AndOp

unsigned llvm::PhiLoweringHelper::AndOp
protected

Definition at line 60 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ DT

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

Definition at line 47 of file SILowerI1Copies.h.

Referenced by lowerPhis(), and PhiLoweringHelper().

◆ ExecReg

Register llvm::PhiLoweringHelper::ExecReg
protected

Definition at line 58 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ IsWave32

bool llvm::PhiLoweringHelper::IsWave32 = false
protected

Definition at line 45 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ LaneMaskRegAttrs

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

◆ MF

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

Definition at line 46 of file SILowerI1Copies.h.

Referenced by lowerPhis(), and PhiLoweringHelper().

◆ MovOp

unsigned llvm::PhiLoweringHelper::MovOp
protected

Definition at line 59 of file SILowerI1Copies.h.

Referenced by isConstantLaneMask(), and PhiLoweringHelper().

◆ MRI

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

◆ OrN2Op

unsigned llvm::PhiLoweringHelper::OrN2Op
protected

Definition at line 64 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ OrOp

unsigned llvm::PhiLoweringHelper::OrOp
protected

Definition at line 61 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ PDT

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

Definition at line 48 of file SILowerI1Copies.h.

Referenced by lowerPhis(), and PhiLoweringHelper().

◆ PhiRegisters

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

Definition at line 55 of file SILowerI1Copies.h.

Referenced by lowerPhis().

◆ ST

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

Definition at line 50 of file SILowerI1Copies.h.

Referenced by isLaneMaskReg(), and PhiLoweringHelper().

◆ TII

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

Definition at line 51 of file SILowerI1Copies.h.

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

◆ XorOp

unsigned llvm::PhiLoweringHelper::XorOp
protected

Definition at line 62 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().


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