LLVM  8.0.1
Public Types | Public Member Functions | List of all members
llvm::AntiDepBreaker Class Referenceabstract

This class works in conjunction with the post-RA scheduler to rename registers to break register anti-dependencies (WAR hazards). More...

#include "CodeGen/AntiDepBreaker.h"

Inheritance diagram for llvm::AntiDepBreaker:
Inheritance graph
[legend]

Public Types

using DbgValueVector = std::vector< std::pair< MachineInstr *, MachineInstr * > >
 

Public Member Functions

virtual ~AntiDepBreaker ()
 
virtual void StartBlock (MachineBasicBlock *BB)=0
 Initialize anti-dep breaking for a new basic block. More...
 
virtual unsigned BreakAntiDependencies (const std::vector< SUnit > &SUnits, MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned InsertPosIndex, DbgValueVector &DbgValues)=0
 Identifiy anti-dependencies within a basic-block region and break them by renaming registers. More...
 
virtual void Observe (MachineInstr &MI, unsigned Count, unsigned InsertPosIndex)=0
 Update liveness information to account for the current instruction, which will not be scheduled. More...
 
virtual void FinishBlock ()=0
 Finish anti-dep breaking for a basic block. More...
 
void UpdateDbgValue (MachineInstr &MI, unsigned OldReg, unsigned NewReg)
 Update DBG_VALUE if dependency breaker is updating other machine instruction to use NewReg. More...
 
void UpdateDbgValues (const DbgValueVector &DbgValues, MachineInstr *ParentMI, unsigned OldReg, unsigned NewReg)
 Update all DBG_VALUE instructions that may be affected by the dependency breaker's update of ParentMI to use NewReg. More...
 

Detailed Description

This class works in conjunction with the post-RA scheduler to rename registers to break register anti-dependencies (WAR hazards).

Definition at line 32 of file AntiDepBreaker.h.

Member Typedef Documentation

◆ DbgValueVector

using llvm::AntiDepBreaker::DbgValueVector = std::vector<std::pair<MachineInstr *, MachineInstr *> >

Definition at line 35 of file AntiDepBreaker.h.

Constructor & Destructor Documentation

◆ ~AntiDepBreaker()

AntiDepBreaker::~AntiDepBreaker ( )
virtual

Member Function Documentation

◆ BreakAntiDependencies()

virtual unsigned llvm::AntiDepBreaker::BreakAntiDependencies ( const std::vector< SUnit > &  SUnits,
MachineBasicBlock::iterator  Begin,
MachineBasicBlock::iterator  End,
unsigned  InsertPosIndex,
DbgValueVector DbgValues 
)
pure virtual

Identifiy anti-dependencies within a basic-block region and break them by renaming registers.

Return the number of anti-dependencies broken.

Implemented in llvm::AggressiveAntiDepBreaker, and llvm::CriticalAntiDepBreaker.

◆ FinishBlock()

virtual void llvm::AntiDepBreaker::FinishBlock ( )
pure virtual

Finish anti-dep breaking for a basic block.

Implemented in llvm::AggressiveAntiDepBreaker, and llvm::CriticalAntiDepBreaker.

◆ Observe()

virtual void llvm::AntiDepBreaker::Observe ( MachineInstr MI,
unsigned  Count,
unsigned  InsertPosIndex 
)
pure virtual

Update liveness information to account for the current instruction, which will not be scheduled.

Implemented in llvm::AggressiveAntiDepBreaker, and llvm::CriticalAntiDepBreaker.

Referenced by ~AntiDepBreaker().

◆ StartBlock()

virtual void llvm::AntiDepBreaker::StartBlock ( MachineBasicBlock BB)
pure virtual

Initialize anti-dep breaking for a new basic block.

Implemented in llvm::AggressiveAntiDepBreaker, and llvm::CriticalAntiDepBreaker.

◆ UpdateDbgValue()

void llvm::AntiDepBreaker::UpdateDbgValue ( MachineInstr MI,
unsigned  OldReg,
unsigned  NewReg 
)
inline

Update DBG_VALUE if dependency breaker is updating other machine instruction to use NewReg.

Definition at line 60 of file AntiDepBreaker.h.

References assert(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm::MachineInstr::isDebugValue(), llvm::MachineOperand::isReg(), and llvm::MachineOperand::setReg().

◆ UpdateDbgValues()

void llvm::AntiDepBreaker::UpdateDbgValues ( const DbgValueVector DbgValues,
MachineInstr ParentMI,
unsigned  OldReg,
unsigned  NewReg 
)
inline

Update all DBG_VALUE instructions that may be affected by the dependency breaker's update of ParentMI to use NewReg.

Definition at line 68 of file AntiDepBreaker.h.

References llvm::make_range().


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