Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
PPCInstrInfo.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "ppc-instr-info"
#define GET_INSTRMAP_INFO
#define GET_INSTRINFO_CTOR_DTOR
#define InfoArrayIdxFMAInst   0
#define InfoArrayIdxFAddInst   1
#define InfoArrayIdxFMULInst   2
#define InfoArrayIdxAddOpIdx   3
#define InfoArrayIdxMULOpIdx   4
#define InfoArrayIdxFSubInst   5
#define PPC_LNX_DEFINE_OFFSETS
#define PPC_TGT_PARSER_UNDEF_MACROS

Functions

 STATISTIC (NumStoreSPILLVSRRCAsVec, "Number of spillvsrrc spilled to stack as vec")
 STATISTIC (NumStoreSPILLVSRRCAsGpr, "Number of spillvsrrc spilled to stack as gpr")
 STATISTIC (NumGPRtoVSRSpill, "Number of gpr spills to spillvsrrc")
 STATISTIC (CmpIselsConverted, "Number of ISELs that depend on comparison of constants converted")
 STATISTIC (MissedConvertibleImmediateInstrs, "Number of compare-immediate instructions fed by constants")
 STATISTIC (NumRcRotatesConvertedToRcAnd, "Number of record-form rotates converted to record-form andi")
static unsigned getCRBitValue (unsigned CRBit)
static bool MBBDefinesCTR (MachineBasicBlock &MBB)
static bool isLdStSafeToCluster (const MachineInstr &LdSt, const TargetRegisterInfo *TRI)
static bool isClusterableLdStOpcPair (unsigned FirstOpc, unsigned SecondOpc, const PPCSubtarget &Subtarget)
static bool isAnImmediateOperand (const MachineOperand &MO)
static unsigned selectReg (int64_t Imm1, int64_t Imm2, unsigned CompareOpc, unsigned TrueReg, unsigned FalseReg, unsigned CRSubReg)
static void swapMIOperands (MachineInstr &MI, unsigned Op1, unsigned Op2)
static bool isOpZeroOfSubwordPreincLoad (int Opcode)
static bool definedBySignExtendingOp (const unsigned Reg, const MachineRegisterInfo *MRI)
static bool definedByZeroExtendingOp (const unsigned Reg, const MachineRegisterInfo *MRI)

Variables

static cl::opt< boolDisableCTRLoopAnal ("disable-ppc-ctrloop-analysis", cl::Hidden, cl::desc("Disable analysis for CTR loops"))
static cl::opt< boolDisableCmpOpt ("disable-ppc-cmp-opt", cl::desc("Disable compare instruction optimization"), cl::Hidden)
static cl::opt< boolVSXSelfCopyCrash ("crash-on-ppc-vsx-self-copy", cl::desc("Causes the backend to crash instead of generating a nop VSX copy"), cl::Hidden)
static cl::opt< boolUseOldLatencyCalc ("ppc-old-latency-calc", cl::Hidden, cl::desc("Use the old (incorrect) instruction latency calculation"))
static cl::opt< float > FMARPFactor ("ppc-fma-rp-factor", cl::Hidden, cl::init(1.5), cl::desc("register pressure factor for the transformations."))
static cl::opt< boolEnableFMARegPressureReduction ("ppc-fma-rp-reduction", cl::Hidden, cl::init(true), cl::desc("enable register pressure reduce in machine combiner pass."))
static const uint16_t FMAOpIdxInfo [][6]
const unsigned MAX_BINOP_DEPTH = 1

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "ppc-instr-info"

Definition at line 47 of file PPCInstrInfo.cpp.

◆ GET_INSTRINFO_CTOR_DTOR

#define GET_INSTRINFO_CTOR_DTOR

Definition at line 50 of file PPCInstrInfo.cpp.

◆ GET_INSTRMAP_INFO

#define GET_INSTRMAP_INFO

Definition at line 49 of file PPCInstrInfo.cpp.

◆ InfoArrayIdxAddOpIdx

#define InfoArrayIdxAddOpIdx   3

Definition at line 273 of file PPCInstrInfo.cpp.

Referenced by llvm::PPCInstrInfo::getFMAPatterns().

◆ InfoArrayIdxFAddInst

#define InfoArrayIdxFAddInst   1

Definition at line 271 of file PPCInstrInfo.cpp.

Referenced by llvm::PPCInstrInfo::getFMAPatterns().

◆ InfoArrayIdxFMAInst

#define InfoArrayIdxFMAInst   0

Definition at line 270 of file PPCInstrInfo.cpp.

◆ InfoArrayIdxFMULInst

#define InfoArrayIdxFMULInst   2

Definition at line 272 of file PPCInstrInfo.cpp.

◆ InfoArrayIdxFSubInst

#define InfoArrayIdxFSubInst   5

Definition at line 275 of file PPCInstrInfo.cpp.

Referenced by llvm::PPCInstrInfo::getFMAPatterns().

◆ InfoArrayIdxMULOpIdx

#define InfoArrayIdxMULOpIdx   4

◆ PPC_LNX_DEFINE_OFFSETS

#define PPC_LNX_DEFINE_OFFSETS

◆ PPC_TGT_PARSER_UNDEF_MACROS

#define PPC_TGT_PARSER_UNDEF_MACROS

Function Documentation

◆ definedBySignExtendingOp()

bool definedBySignExtendingOp ( const unsigned Reg,
const MachineRegisterInfo * MRI )
static

◆ definedByZeroExtendingOp()

bool definedByZeroExtendingOp ( const unsigned Reg,
const MachineRegisterInfo * MRI )
static

◆ getCRBitValue()

unsigned getCRBitValue ( unsigned CRBit)
static

Definition at line 1650 of file PPCInstrInfo.cpp.

References assert().

Referenced by llvm::PPCInstrInfo::copyPhysReg().

◆ isAnImmediateOperand()

◆ isClusterableLdStOpcPair()

bool isClusterableLdStOpcPair ( unsigned FirstOpc,
unsigned SecondOpc,
const PPCSubtarget & Subtarget )
static

Definition at line 2925 of file PPCInstrInfo.cpp.

Referenced by llvm::PPCInstrInfo::shouldClusterMemOps().

◆ isLdStSafeToCluster()

◆ isOpZeroOfSubwordPreincLoad()

bool isOpZeroOfSubwordPreincLoad ( int Opcode)
static

Definition at line 5183 of file PPCInstrInfo.cpp.

Referenced by definedBySignExtendingOp(), and definedByZeroExtendingOp().

◆ MBBDefinesCTR()

bool MBBDefinesCTR ( MachineBasicBlock & MBB)
static

Definition at line 2182 of file PPCInstrInfo.cpp.

References MBB, and MI.

Referenced by llvm::PPCInstrInfo::isProfitableToIfCvt().

◆ selectReg()

unsigned selectReg ( int64_t Imm1,
int64_t Imm2,
unsigned CompareOpc,
unsigned TrueReg,
unsigned FalseReg,
unsigned CRSubReg )
static

Definition at line 3317 of file PPCInstrInfo.cpp.

References llvm_unreachable.

◆ STATISTIC() [1/6]

STATISTIC ( CmpIselsConverted ,
"Number of ISELs that depend on comparison of constants converted"  )

◆ STATISTIC() [2/6]

STATISTIC ( MissedConvertibleImmediateInstrs ,
"Number of compare-immediate instructions fed by constants"  )

◆ STATISTIC() [3/6]

STATISTIC ( NumGPRtoVSRSpill ,
"Number of gpr spills to spillvsrrc"  )

◆ STATISTIC() [4/6]

STATISTIC ( NumRcRotatesConvertedToRcAnd ,
"Number of record-form rotates converted to record-form andi"  )

◆ STATISTIC() [5/6]

STATISTIC ( NumStoreSPILLVSRRCAsGpr ,
"Number of spillvsrrc spilled to stack as gpr"  )

◆ STATISTIC() [6/6]

STATISTIC ( NumStoreSPILLVSRRCAsVec ,
"Number of spillvsrrc spilled to stack as vec"  )

◆ swapMIOperands()

Variable Documentation

◆ DisableCmpOpt

cl::opt< bool > DisableCmpOpt("disable-ppc-cmp-opt", cl::desc("Disable compare instruction optimization"), cl::Hidden) ( "disable-ppc-cmp-opt" ,
cl::desc("Disable compare instruction optimization") ,
cl::Hidden  )
static

◆ DisableCTRLoopAnal

cl::opt< bool > DisableCTRLoopAnal("disable-ppc-ctrloop-analysis", cl::Hidden, cl::desc("Disable analysis for CTR loops")) ( "disable-ppc-ctrloop-analysis" ,
cl::Hidden ,
cl::desc("Disable analysis for CTR loops")  )
static

◆ EnableFMARegPressureReduction

cl::opt< bool > EnableFMARegPressureReduction("ppc-fma-rp-reduction", cl::Hidden, cl::init(true), cl::desc("enable register pressure reduce in machine combiner pass.")) ( "ppc-fma-rp-reduction" ,
cl::Hidden ,
cl::init(true) ,
cl::desc("enable register pressure reduce in machine combiner pass.")  )
static

◆ FMAOpIdxInfo

const uint16_t FMAOpIdxInfo[][6]
static
Initial value:
= {
{PPC::XSMADDADP, PPC::XSADDDP, PPC::XSMULDP, 1, 2, PPC::XSSUBDP},
{PPC::XSMADDASP, PPC::XSADDSP, PPC::XSMULSP, 1, 2, PPC::XSSUBSP},
{PPC::XVMADDADP, PPC::XVADDDP, PPC::XVMULDP, 1, 2, PPC::XVSUBDP},
{PPC::XVMADDASP, PPC::XVADDSP, PPC::XVMULSP, 1, 2, PPC::XVSUBSP},
{PPC::FMADD, PPC::FADD, PPC::FMUL, 3, 1, PPC::FSUB},
{PPC::FMADDS, PPC::FADDS, PPC::FMULS, 3, 1, PPC::FSUBS}}

Definition at line 284 of file PPCInstrInfo.cpp.

Referenced by llvm::PPCInstrInfo::finalizeInsInstrs(), and llvm::PPCInstrInfo::getFMAPatterns().

◆ FMARPFactor

cl::opt< float > FMARPFactor("ppc-fma-rp-factor", cl::Hidden, cl::init(1.5), cl::desc("register pressure factor for the transformations.")) ( "ppc-fma-rp-factor" ,
cl::Hidden ,
cl::init(1.5) ,
cl::desc("register pressure factor for the transformations.")  )
static

◆ MAX_BINOP_DEPTH

◆ UseOldLatencyCalc

cl::opt< bool > UseOldLatencyCalc("ppc-old-latency-calc", cl::Hidden, cl::desc("Use the old (incorrect) instruction latency calculation")) ( "ppc-old-latency-calc" ,
cl::Hidden ,
cl::desc("Use the old (incorrect) instruction latency calculation")  )
static

◆ VSXSelfCopyCrash

cl::opt< bool > VSXSelfCopyCrash("crash-on-ppc-vsx-self-copy", cl::desc("Causes the backend to crash instead of generating a nop VSX copy"), cl::Hidden) ( "crash-on-ppc-vsx-self-copy" ,
cl::desc("Causes the backend to crash instead of generating a nop VSX copy") ,
cl::Hidden  )
static