LLVM 19.0.0git
Public Member Functions | Protected Attributes | List of all members
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)
 
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 37 of file SILowerI1Copies.h.

Constructor & Destructor Documentation

◆ PhiLoweringHelper()

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

◆ ~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

Referenced by lowerPhis().

◆ collectIncomingValuesFromPhi()

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

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 784 of file SILowerI1Copies.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstTerminator(), I, instrDefsUsesSCC(), llvm_unreachable, and MBB.

Referenced by lowerPhis().

◆ initializeLaneMaskRegisterAttributes()

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

Definition at line 71 of file SILowerI1Copies.h.

References llvm::MachineRegisterInfo::getVRegAttrs(), LaneMaskRegAttrs, and MRI.

Referenced by lowerPhis().

◆ isConstantLaneMask()

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

◆ isLaneMaskReg()

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

◆ lowerPhis()

bool PhiLoweringHelper::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

Referenced by lowerPhis().

Member Data Documentation

◆ AndN2Op

unsigned llvm::PhiLoweringHelper::AndN2Op
protected

Definition at line 62 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ AndOp

unsigned llvm::PhiLoweringHelper::AndOp
protected

Definition at line 59 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ DT

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

Definition at line 46 of file SILowerI1Copies.h.

Referenced by lowerPhis().

◆ ExecReg

Register llvm::PhiLoweringHelper::ExecReg
protected

Definition at line 57 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ IsWave32

bool llvm::PhiLoweringHelper::IsWave32 = false
protected

Definition at line 44 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ LaneMaskRegAttrs

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

Definition at line 51 of file SILowerI1Copies.h.

Referenced by initializeLaneMaskRegisterAttributes(), and lowerPhis().

◆ MF

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

Definition at line 45 of file SILowerI1Copies.h.

Referenced by lowerPhis(), and PhiLoweringHelper().

◆ MovOp

unsigned llvm::PhiLoweringHelper::MovOp
protected

Definition at line 58 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 63 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ OrOp

unsigned llvm::PhiLoweringHelper::OrOp
protected

Definition at line 60 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().

◆ PDT

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

Definition at line 47 of file SILowerI1Copies.h.

Referenced by lowerPhis().

◆ PhiRegisters

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

Definition at line 54 of file SILowerI1Copies.h.

Referenced by lowerPhis().

◆ ST

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

Definition at line 49 of file SILowerI1Copies.h.

Referenced by isLaneMaskReg(), and PhiLoweringHelper().

◆ TII

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

Definition at line 50 of file SILowerI1Copies.h.

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

◆ XorOp

unsigned llvm::PhiLoweringHelper::XorOp
protected

Definition at line 61 of file SILowerI1Copies.h.

Referenced by PhiLoweringHelper().


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