LLVM 24.0.0git
SystemZPostRewrite.cpp File Reference

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "systemz-post-rewrite"

Functions

 STATISTIC (MemFoldCopies, "Number of copies inserted before folded mem ops.")
 STATISTIC (LOCRMuxJumps, "Number of LOCRMux jump-sequences (lower is better)")
 INITIALIZE_PASS (SystemZPostRewriteLegacy, "systemz-post-rewrite", "SystemZ Post Rewrite pass", false, false) FunctionPass *llvm
 Returns an instance of the Post Rewrite pass.
static bool expandCondMove (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI, const TargetInstrInfo *TII)
static void selectLOCRMux (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI, unsigned LowOpcode, unsigned HighOpcode, const TargetInstrInfo *TII)
static void selectSELRMux (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI, unsigned LowOpcode, unsigned HighOpcode, const TargetInstrInfo *TII)
static bool selectMI (MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineBasicBlock::iterator &NextMBBI, const TargetInstrInfo *TII)
 If MBBI references a pseudo instruction that should be selected here, do it and return true.
static bool selectMBB (MachineBasicBlock &MBB, const TargetInstrInfo *TII)
 Iterate over the instructions in basic block MBB and select any pseudo instructions.
static bool runPostRewriteOnMF (MachineFunction &MF)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "systemz-post-rewrite"

Definition at line 30 of file SystemZPostRewrite.cpp.

Function Documentation

◆ expandCondMove()

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( SystemZPostRewriteLegacy ,
"systemz-post-rewrite" ,
"SystemZ Post Rewrite pass" ,
false ,
false  )

Returns an instance of the Post Rewrite pass.

Definition at line 48 of file SystemZPostRewrite.cpp.

References llvm::createSystemZPostRewriteLegacyPass().

◆ runPostRewriteOnMF()

bool runPostRewriteOnMF ( MachineFunction & MF)
static

◆ selectLOCRMux()

void selectLOCRMux ( MachineBasicBlock & MBB,
MachineBasicBlock::iterator MBBI,
MachineBasicBlock::iterator & NextMBBI,
unsigned LowOpcode,
unsigned HighOpcode,
const TargetInstrInfo * TII )
static

Definition at line 123 of file SystemZPostRewrite.cpp.

References expandCondMove(), llvm::SystemZ::isHighReg(), MBB, MBBI, and TII.

Referenced by selectMI().

◆ selectMBB()

bool selectMBB ( MachineBasicBlock & MBB,
const TargetInstrInfo * TII )
static

Iterate over the instructions in basic block MBB and select any pseudo instructions.

Return true if anything was modified.

Definition at line 254 of file SystemZPostRewrite.cpp.

References E(), MBB, MBBI, Modified, selectMI(), and TII.

Referenced by runPostRewriteOnMF().

◆ selectMI()

If MBBI references a pseudo instruction that should be selected here, do it and return true.

Otherwise return false.

Definition at line 216 of file SystemZPostRewrite.cpp.

References llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineOperand::getReg(), llvm::SystemZ::getTargetMemOpcode(), MBB, MBBI, MI, selectLOCRMux(), selectSELRMux(), llvm::MachineOperand::setReg(), and TII.

Referenced by selectMBB().

◆ selectSELRMux()

◆ STATISTIC() [1/2]

STATISTIC ( LOCRMuxJumps ,
"Number of LOCRMux jump-sequences (lower is better)"  )

◆ STATISTIC() [2/2]

STATISTIC ( MemFoldCopies ,
"Number of copies inserted before folded mem ops."  )