LLVM
8.0.1
|
An individual sequence of instructions to be replaced with a call to an outlined function. More...
#include "llvm/CodeGen/MachineOutliner.h"
Public Member Functions | |
unsigned | getLength () const |
Return the number of instructions in this Candidate. More... | |
unsigned | getStartIdx () const |
Return the start index of this candidate. More... | |
unsigned | getEndIdx () const |
Return the end index of this candidate. More... | |
void | setCallInfo (unsigned CID, unsigned CO) |
Set the CallConstructionID and CallOverhead of this candidate to CID and CO respectively. More... | |
unsigned | getCallOverhead () const |
Returns the call overhead of this candidate if it is in the list. More... | |
MachineBasicBlock::iterator & | front () |
MachineBasicBlock::iterator & | back () |
MachineFunction * | getMF () const |
MachineBasicBlock * | getMBB () const |
Candidate (unsigned StartIdx, unsigned Len, MachineBasicBlock::iterator &FirstInst, MachineBasicBlock::iterator &LastInst, MachineBasicBlock *MBB, unsigned FunctionIdx, unsigned Flags) | |
Candidate () | |
bool | operator< (const Candidate &RHS) const |
Used to ensure that Candidates are outlined in an order that preserves the start and end indices of other Candidates . More... | |
void | initLRU (const TargetRegisterInfo &TRI) |
Compute the registers that are live across this Candidate. More... | |
Public Attributes | |
unsigned | FunctionIdx |
The index of this Candidate's OutlinedFunction in the list of OutlinedFunctions . More... | |
unsigned | CallConstructionID |
Identifier denoting the instructions to emit to call an outlined function from this point. More... | |
LiveRegUnits | LRU |
Contains physical register liveness information for the MBB containing this Candidate . More... | |
LiveRegUnits | UsedInSequence |
Contains the accumulated register liveness information for the instructions in this Candidate . More... | |
unsigned | Flags = 0x0 |
Target-specific flags for this Candidate's MBB. More... | |
bool | LRUWasSet = false |
True if initLRU has been called on this Candidate. More... | |
unsigned | Benefit = 0 |
The number of instructions that would be saved by outlining every candidate of this type. More... | |
An individual sequence of instructions to be replaced with a call to an outlined function.
Definition at line 38 of file MachineOutliner.h.
|
inline |
Definition at line 121 of file MachineOutliner.h.
|
inline |
Definition at line 127 of file MachineOutliner.h.
|
inline |
Definition at line 108 of file MachineOutliner.h.
Referenced by llvm::AArch64InstrInfo::getOutliningCandidateInfo(), and initLRU().
|
inline |
Definition at line 107 of file MachineOutliner.h.
Referenced by llvm::AArch64InstrInfo::getOutliningCandidateInfo(), and initLRU().
|
inline |
Returns the call overhead of this candidate if it is in the list.
Definition at line 105 of file MachineOutliner.h.
|
inline |
Return the end index of this candidate.
Definition at line 95 of file MachineOutliner.h.
|
inline |
Return the number of instructions in this Candidate.
Definition at line 89 of file MachineOutliner.h.
|
inline |
Definition at line 110 of file MachineOutliner.h.
|
inline |
Definition at line 109 of file MachineOutliner.h.
References llvm::MachineBasicBlock::getParent().
Referenced by llvm::AArch64InstrInfo::getOutliningCandidateInfo().
|
inline |
Return the start index of this candidate.
Definition at line 92 of file MachineOutliner.h.
Referenced by operator<().
|
inline |
Compute the registers that are live across this Candidate.
Used by targets that need this information for cost model calculation. If a target does not need this information, then this should not be called.
Definition at line 139 of file MachineOutliner.h.
References llvm::LiveRegUnits::accumulate(), llvm::LiveRegUnits::addLiveOuts(), assert(), back(), llvm::for_each(), front(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::LiveRegUnits::init(), MI, llvm::MachineBasicBlock::rbegin(), llvm::LiveRegUnits::stepBackward(), and llvm::MachineRegisterInfo::tracksLiveness().
Referenced by llvm::AArch64InstrInfo::getOutliningCandidateInfo().
Used to ensure that Candidates
are outlined in an order that preserves the start and end indices of other Candidates
.
Definition at line 131 of file MachineOutliner.h.
References getStartIdx().
Set the CallConstructionID and CallOverhead of this candidate to CID and CO respectively.
Definition at line 99 of file MachineOutliner.h.
Referenced by llvm::AArch64InstrInfo::getOutliningCandidateInfo().
unsigned llvm::outliner::Candidate::Benefit = 0 |
The number of instructions that would be saved by outlining every candidate of this type.
This is a fixed value which is not updated during the candidate pruning process. It is only used for deciding which candidate to keep if two candidates overlap. The true benefit is stored in the OutlinedFunction for some given candidate.
Definition at line 119 of file MachineOutliner.h.
unsigned llvm::outliner::Candidate::CallConstructionID |
Identifier denoting the instructions to emit to call an outlined function from this point.
Defined by the target.
Definition at line 66 of file MachineOutliner.h.
Referenced by llvm::AArch64InstrInfo::insertOutlinedCall(), and llvm::X86InstrInfo::insertOutlinedCall().
unsigned llvm::outliner::Candidate::Flags = 0x0 |
Target-specific flags for this Candidate's MBB.
Definition at line 83 of file MachineOutliner.h.
unsigned llvm::outliner::Candidate::FunctionIdx |
The index of this Candidate's
OutlinedFunction
in the list of OutlinedFunctions
.
Definition at line 62 of file MachineOutliner.h.
LiveRegUnits llvm::outliner::Candidate::LRU |
Contains physical register liveness information for the MBB containing this Candidate
.
This is optionally used by the target to calculate more fine-grained cost model information.
Definition at line 73 of file MachineOutliner.h.
Referenced by llvm::AArch64InstrInfo::getOutliningCandidateInfo().
True if initLRU has been called on this Candidate.
Definition at line 86 of file MachineOutliner.h.
LiveRegUnits llvm::outliner::Candidate::UsedInSequence |
Contains the accumulated register liveness information for the instructions in this Candidate
.
This is optionally used by the target to determine which registers have been used across the sequence.
Definition at line 80 of file MachineOutliner.h.
Referenced by llvm::AArch64InstrInfo::getOutliningCandidateInfo().