OpenASIP 2.2
|
#include <TCEInstrInfo.hh>
Public Member Functions | |
TCEInstrInfo (const TCETargetMachinePlugin *plugin) | |
virtual | ~TCEInstrInfo () |
const InstrItineraryData * | getInstrItineraryData () const |
virtual const TargetRegisterInfo & | getRegisterInfo () const |
virtual unsigned | insertBranch (MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override |
unsigned | removeBranch (MachineBasicBlock &mbb, int *BytesRemoved=nullptr) const override |
virtual bool | BlockHasNoFallThrough (const MachineBasicBlock &MBB) const |
virtual void | storeRegToStackSlot (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, unsigned srcReg, bool isKill, int frameIndex, const TargetRegisterClass *rc, Register vReg) const |
virtual void | storeRegToStackSlot (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, Register srcReg, bool isKill, int frameIndex, const TargetRegisterClass *rc, const TargetRegisterInfo *, Register vReg) const override |
virtual void | loadRegFromStackSlot (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, unsigned destReg, int frameIndex, const TargetRegisterClass *rc, Register vReg) const |
virtual void | loadRegFromStackSlot (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, Register destReg, int frameIndex, const TargetRegisterClass *rc, const TargetRegisterInfo *, Register vReg) const override |
virtual void | copyPhysReg (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, const DebugLoc &DL, MCRegister destReg, MCRegister srcReg, bool KillSrc) const override |
virtual bool | reverseBranchCondition (llvm::SmallVectorImpl< llvm::MachineOperand > &cond) const override |
virtual bool | analyzeBranch (MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, llvm::SmallVectorImpl< llvm::MachineOperand > &cond, bool allowModify=false) const override |
std::unique_ptr< PipelinerLoopInfo > | analyzeLoopForPipelining (MachineBasicBlock *LoopBB) const override |
Analyze loop L, which must be a single-basic-block loop, and if the conditions can be understood enough produce a PipelinerLoopInfo object. | |
virtual bool | isPredicated (const MachineInstr &MI) const override |
virtual bool | isPredicable (const MachineInstr &MI) const override |
virtual bool | PredicateInstruction (MachineInstr &mi, ArrayRef< MachineOperand > cond) const override |
virtual bool | ClobbersPredicate (MachineInstr &MI, std::vector< MachineOperand > &Pred, bool SkipDead) const override |
virtual bool | SubsumesPredicate (ArrayRef< MachineOperand > Pred1, ArrayRef< MachineOperand > Pred2) const override |
virtual void | insertCCBranch (MachineBasicBlock &mbb, MachineBasicBlock &tbb, ArrayRef< MachineOperand > cond, const DebugLoc &dl) const |
virtual bool | isProfitableToIfCvt (MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, BranchProbability Probability) const override |
virtual bool | isProfitableToIfCvt (MachineBasicBlock &TMBB, unsigned NumTCycles, unsigned ExtraTCycles, MachineBasicBlock &FMBB, unsigned NumFCycles, unsigned ExtraFCycles, BranchProbability Probability) const override |
std::tuple< int, int > | getPointerAdjustment (int offset) const |
virtual DFAPacketizer * | CreateTargetScheduleState (const TargetSubtargetInfo &) const override |
Private Member Functions | |
int | getMatchingCondBranchOpcode (int Opc, bool inverted) const |
bool | copyPhysVectorReg (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, const DebugLoc &DL, MCRegister destReg, MCRegister srcReg, bool killSrc) const |
Private Attributes | |
InstrItineraryData | InstrItins |
const TCERegisterInfo | ri_ |
const TCETargetMachinePlugin * | plugin_ |
!! Important !! ************* ON EVERY LLVM UPDATE CHECK THESE INTERFACES VERY CAREFULLY FROM include/llvm/Target/TargetInstrInfo.h
Compiler doesn warn or give error if parameter lists are changed. Many times also base class implementation works, but does not do very good job.
Definition at line 57 of file TCEInstrInfo.hh.
TCEInstrInfo::TCEInstrInfo | ( | const TCETargetMachinePlugin * | plugin | ) |
Constructor.
Definition at line 73 of file TCEInstrInfo.cc.
|
virtual |
|
overridevirtual |
Analyzes branches of MBB.
mbb | MBB to analyze |
tbb | Puts the jump target or condition true target MBB here |
fbb | Puts the condition false target here, if not fall-thru |
cond | puts the condition data (predcate reg and T/F) here |
Definition at line 457 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::analyzeCCBranch(), assert, and plugin_.
Referenced by loadRegFromStackSlot().
|
override |
Analyze loop L, which must be a single-basic-block loop, and if the conditions can be understood enough produce a PipelinerLoopInfo object.
Definition at line 565 of file TCEInstrInfo.cc.
Referenced by loadRegFromStackSlot().
|
virtual |
Returns true if program control can't fall through the last instruction in the basic block, false otherwise.
Definition at line 196 of file TCEInstrInfo.cc.
|
overridevirtual |
Definition at line 691 of file TCEInstrInfo.cc.
References ri_.
Referenced by loadRegFromStackSlot().
|
overridevirtual |
Creates instruction for copying value from a register to another.
mbb | Basic block where the copy is done. |
mbbi | Iterator to the place where the copy instruction is added. |
srcReg | Register where the value is copied from. |
destReg | Register where the value is copied to. |
rc | Class of the register to copy. |
Definition at line 264 of file TCEInstrInfo.cc.
References assert, and copyPhysVectorReg().
Referenced by loadRegFromStackSlot().
|
private |
Referenced by copyPhysReg().
|
overridevirtual |
Definition at line 737 of file TCEInstrInfo.cc.
References assert.
|
inline |
|
private |
Definition at line 680 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::getFalsePredicateOpcode(), llvm::TCETargetMachinePlugin::getTruePredicateOpcode(), and plugin_.
Referenced by isPredicable(), and PredicateInstruction().
std::tuple< int, int > TCEInstrInfo::getPointerAdjustment | ( | int | offset | ) | const |
Return opcode for pointer adjustment and new offset.
Returns opcode available or suitable for pointer adjustment with constant offset value.
offset | The offset for the pointer. |
Definition at line 732 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::getPointerAdjustment(), and plugin_.
Referenced by llvm::TCEFrameLowering::eliminateCallFramePseudoInstr(), llvm::TCERegisterInfo::eliminateFrameIndex(), and llvm::TCEFrameLowering::emitPrologue().
|
inlinevirtual |
Definition at line 67 of file TCEInstrInfo.hh.
References ri_.
Referenced by llvm::GeneratedTCEPlugin::getRegisterInfo().
|
overridevirtual |
Inserts a branch instruction or brach instructions into llvm MBB.
If the MBB already has an unconditional branch at end, does nothing.
mbb | where to insert the branch instructions. |
tbb | jump target basic block |
fbb | false condition jump target, if insertin 2 branches |
Definition at line 97 of file TCEInstrInfo.cc.
References assert, and insertCCBranch().
|
virtual |
Referenced by insertBranch().
|
overridevirtual |
Definition at line 587 of file TCEInstrInfo.cc.
References getMatchingCondBranchOpcode(), and isPredicated().
Referenced by loadRegFromStackSlot(), and PredicateInstruction().
|
overridevirtual |
Definition at line 570 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::operationName(), and plugin_.
Referenced by isPredicable(), and loadRegFromStackSlot().
|
overridevirtual |
Definition at line 709 of file TCEInstrInfo.cc.
|
overridevirtual |
Definition at line 719 of file TCEInstrInfo.cc.
|
inlineoverridevirtual |
Definition at line 122 of file TCEInstrInfo.hh.
References analyzeBranch(), analyzeLoopForPipelining(), ClobbersPredicate(), copyPhysReg(), isPredicable(), isPredicated(), loadRegFromStackSlot(), PredicateInstruction(), and reverseBranchCondition().
|
virtual |
Definition at line 232 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::getLoad(), and plugin_.
Referenced by loadRegFromStackSlot(), and storeRegToStackSlot().
|
overridevirtual |
Definition at line 623 of file TCEInstrInfo.cc.
References assert, getMatchingCondBranchOpcode(), and isPredicable().
Referenced by loadRegFromStackSlot().
|
override |
Removes branch or branches form end of llvm MachineBasicBlock
mbb | where to remove the branches from |
Definition at line 174 of file TCEInstrInfo.cc.
|
overridevirtual |
Definition at line 339 of file TCEInstrInfo.cc.
References assert.
Referenced by loadRegFromStackSlot().
|
inlineoverridevirtual |
Definition at line 95 of file TCEInstrInfo.hh.
References loadRegFromStackSlot(), and storeRegToStackSlot().
|
virtual |
Definition at line 208 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::getStore(), and plugin_.
Referenced by storeRegToStackSlot().
|
inlineoverridevirtual |
Definition at line 171 of file TCEInstrInfo.hh.
|
private |
Definition at line 208 of file TCEInstrInfo.hh.
Referenced by getInstrItineraryData().
|
private |
Definition at line 213 of file TCEInstrInfo.hh.
Referenced by analyzeBranch(), getMatchingCondBranchOpcode(), getPointerAdjustment(), isPredicated(), loadRegFromStackSlot(), and storeRegToStackSlot().
|
private |
Definition at line 212 of file TCEInstrInfo.hh.
Referenced by ClobbersPredicate(), and getRegisterInfo().