OpenASIP
2.0
|
#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) const |
virtual void | storeRegToStackSlot (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, Register srcReg, bool isKill, int frameIndex, const TargetRegisterClass *rc, const TargetRegisterInfo *) const override |
virtual void | loadRegFromStackSlot (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, unsigned destReg, int frameIndex, const TargetRegisterClass *rc) const |
virtual void | loadRegFromStackSlot (MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, Register destReg, int frameIndex, const TargetRegisterClass *rc, const TargetRegisterInfo *) 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. More... | |
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 449 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::analyzeCCBranch(), assert, and plugin_.
|
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 554 of file TCEInstrInfo.cc.
|
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 |
|
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 256 of file TCEInstrInfo.cc.
References assert, and copyPhysVectorReg().
|
private |
Referenced by copyPhysReg().
|
overridevirtual |
|
inline |
Definition at line 63 of file TCEInstrInfo.hh.
References InstrItins.
|
private |
Definition at line 669 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 721 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::getPointerAdjustment(), and plugin_.
Referenced by llvm::TCEFrameLowering::eliminateCallFramePseudoInstr(), llvm::TCERegisterInfo::eliminateFrameIndex(), and llvm::TCEFrameLowering::emitPrologue().
|
inlinevirtual |
|
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 576 of file TCEInstrInfo.cc.
References getMatchingCondBranchOpcode(), and isPredicated().
Referenced by PredicateInstruction().
|
overridevirtual |
Definition at line 559 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::operationName(), and plugin_.
Referenced by isPredicable().
|
overridevirtual |
Definition at line 699 of file TCEInstrInfo.cc.
|
overridevirtual |
Definition at line 709 of file TCEInstrInfo.cc.
|
inlineoverridevirtual |
Definition at line 108 of file TCEInstrInfo.hh.
References loadRegFromStackSlot().
|
virtual |
Definition at line 229 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::getLoad(), and plugin_.
Referenced by loadRegFromStackSlot().
|
overridevirtual |
Definition at line 612 of file TCEInstrInfo.cc.
References assert, getMatchingCondBranchOpcode(), and isPredicable().
|
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 |
|
inlineoverridevirtual |
Definition at line 91 of file TCEInstrInfo.hh.
References storeRegToStackSlot().
|
virtual |
Definition at line 209 of file TCEInstrInfo.cc.
References llvm::TCETargetMachinePlugin::getStore(), and plugin_.
Referenced by storeRegToStackSlot().
|
inlineoverridevirtual |
Definition at line 151 of file TCEInstrInfo.hh.
|
private |
Definition at line 188 of file TCEInstrInfo.hh.
Referenced by getInstrItineraryData().
|
private |
Definition at line 193 of file TCEInstrInfo.hh.
Referenced by analyzeBranch(), getMatchingCondBranchOpcode(), getPointerAdjustment(), isPredicated(), loadRegFromStackSlot(), and storeRegToStackSlot().
|
private |
Definition at line 192 of file TCEInstrInfo.hh.
Referenced by ClobbersPredicate(), and getRegisterInfo().