LLVM  16.0.0git
Public Member Functions | List of all members
llvm::TargetInstrInfo::PipelinerLoopInfo Class Referenceabstract

Object returned by analyzeLoopForPipelining. More...

#include "llvm/CodeGen/TargetInstrInfo.h"

Public Member Functions

virtual ~PipelinerLoopInfo ()
 
virtual bool shouldIgnoreForPipelining (const MachineInstr *MI) const =0
 Return true if the given instruction should not be pipelined and should be ignored. More...
 
virtual bool shouldUseSchedule (SwingSchedulerDAG &SSD, SMSchedule &SMS)
 Return true if the proposed schedule should used. More...
 
virtual Optional< bool > createTripCountGreaterCondition (int TC, MachineBasicBlock &MBB, SmallVectorImpl< MachineOperand > &Cond)=0
 Create a condition to determine if the trip count of the loop is greater than TC, where TC is always one more than for the previous prologue or 0 if this is being called for the outermost prologue. More...
 
virtual void adjustTripCount (int TripCountAdjust)=0
 Modify the loop such that the trip count is OriginalTC + TripCountAdjust. More...
 
virtual void setPreheader (MachineBasicBlock *NewPreheader)=0
 Called when the loop's preheader has been modified to NewPreheader. More...
 
virtual void disposed ()=0
 Called when the loop is being removed. More...
 

Detailed Description

Object returned by analyzeLoopForPipelining.

Allows software pipelining implementations to query attributes of the loop being pipelined and to apply target-specific updates to the loop once pipelining is complete.

Definition at line 731 of file TargetInstrInfo.h.

Constructor & Destructor Documentation

◆ ~PipelinerLoopInfo()

TargetInstrInfo::PipelinerLoopInfo::~PipelinerLoopInfo ( )
virtualdefault

Member Function Documentation

◆ adjustTripCount()

virtual void llvm::TargetInstrInfo::PipelinerLoopInfo::adjustTripCount ( int  TripCountAdjust)
pure virtual

Modify the loop such that the trip count is OriginalTC + TripCountAdjust.

◆ createTripCountGreaterCondition()

virtual Optional<bool> llvm::TargetInstrInfo::PipelinerLoopInfo::createTripCountGreaterCondition ( int  TC,
MachineBasicBlock MBB,
SmallVectorImpl< MachineOperand > &  Cond 
)
pure virtual

Create a condition to determine if the trip count of the loop is greater than TC, where TC is always one more than for the previous prologue or 0 if this is being called for the outermost prologue.

If the trip count is statically known to be greater than TC, return true. If the trip count is statically known to be not greater than TC, return false. Otherwise return nullopt and fill out Cond with the test condition.

Note: This hook is guaranteed to be called from the innermost to the outermost prologue of the loop being software pipelined.

◆ disposed()

virtual void llvm::TargetInstrInfo::PipelinerLoopInfo::disposed ( )
pure virtual

Called when the loop is being removed.

Any instructions in the preheader should be removed.

Once this function is called, no other functions on this object are valid; the loop has been removed.

◆ setPreheader()

virtual void llvm::TargetInstrInfo::PipelinerLoopInfo::setPreheader ( MachineBasicBlock NewPreheader)
pure virtual

Called when the loop's preheader has been modified to NewPreheader.

◆ shouldIgnoreForPipelining()

virtual bool llvm::TargetInstrInfo::PipelinerLoopInfo::shouldIgnoreForPipelining ( const MachineInstr MI) const
pure virtual

Return true if the given instruction should not be pipelined and should be ignored.

An example could be a loop comparison, or induction variable update with no users being pipelined.

Referenced by llvm::SMSchedule::computeUnpipelineableNodes().

◆ shouldUseSchedule()

virtual bool llvm::TargetInstrInfo::PipelinerLoopInfo::shouldUseSchedule ( SwingSchedulerDAG SSD,
SMSchedule SMS 
)
inlinevirtual

Return true if the proposed schedule should used.

Otherwise return false to not pipeline the loop. This function should be used to ensure that pipelined loops meet target-specific quality heuristics.

Definition at line 742 of file TargetInstrInfo.h.


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