Go to the documentation of this file.
33 #ifndef TCE_INSTR_INFO_H
34 #define TCE_INSTR_INFO_H
36 #include <llvm/Support/ErrorHandling.h>
37 #include "tce_config.h"
38 #include <llvm/CodeGen/TargetInstrInfo.h>
41 #define GET_INSTRINFO_HEADER
42 #include "TCEGenInstrInfo.inc"
46 class TCETargetMachine;
47 class TCETargetMachinePlugin;
62 const InstrItineraryData *
72 MachineBasicBlock &MBB, MachineBasicBlock *TBB,
73 MachineBasicBlock *FBB,
74 ArrayRef<MachineOperand> Cond,
76 ,
int *BytesAdded =
nullptr)
const override;
78 MachineBasicBlock &mbb,
79 int *BytesRemoved =
nullptr)
const override;
82 const MachineBasicBlock &MBB)
const;
85 MachineBasicBlock& mbb,
86 MachineBasicBlock::iterator mbbi,
87 unsigned srcReg,
bool isKill,
int frameIndex,
88 const TargetRegisterClass* rc)
const;
92 MachineBasicBlock& mbb,
93 MachineBasicBlock::iterator mbbi,
94 Register srcReg,
bool isKill,
int frameIndex,
95 const TargetRegisterClass* rc,
const TargetRegisterInfo*)
const override {
102 MachineBasicBlock& mbb,
103 MachineBasicBlock::iterator mbbi,
104 unsigned destReg,
int frameIndex,
105 const TargetRegisterClass* rc)
const;
109 MachineBasicBlock& mbb,
110 MachineBasicBlock::iterator mbbi,
111 Register destReg,
int frameIndex,
112 const TargetRegisterClass* rc,
const TargetRegisterInfo*)
const override {
117 MachineBasicBlock& mbb,
118 MachineBasicBlock::iterator mbbi,
120 MCRegister destReg, MCRegister srcReg,
121 bool KillSrc)
const override;
124 llvm::SmallVectorImpl<llvm::MachineOperand>& cond)
const override;
127 MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
128 MachineBasicBlock *&FBB,
129 llvm::SmallVectorImpl<llvm::MachineOperand>& cond,
130 bool allowModify =
false)
137 MachineBasicBlock *LoopBB)
const override;
139 virtual bool isPredicated(
const MachineInstr& MI)
const override;
140 virtual bool isPredicable(
const MachineInstr& MI)
const override;
144 ArrayRef<MachineOperand> cond)
const override;
147 MachineInstr& MI, std::vector<MachineOperand>& Pred,
148 bool SkipDead)
const override;
152 ArrayRef<MachineOperand> Pred1,
153 ArrayRef<MachineOperand> Pred2)
const override {
158 MachineBasicBlock& mbb,
159 MachineBasicBlock& tbb,
160 ArrayRef<MachineOperand> cond,
161 const DebugLoc& dl)
const;
164 unsigned ExtraPredCycles,
165 BranchProbability Probability)
const override;
168 unsigned NumTCycles,
unsigned ExtraTCycles,
169 MachineBasicBlock &FMBB,
170 unsigned NumFCycles,
unsigned ExtraFCycles,
171 BranchProbability Probability)
const override;
185 const TargetSubtargetInfo &)
const override;
197 MachineBasicBlock& mbb,
198 MachineBasicBlock::iterator mbbi,
200 MCRegister destReg, MCRegister srcReg,
virtual bool isPredicated(const MachineInstr &MI) const override
virtual void loadRegFromStackSlot(MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, unsigned destReg, int frameIndex, const TargetRegisterClass *rc) const
TCEInstrInfo(const TCETargetMachinePlugin *plugin)
virtual bool isPredicable(const MachineInstr &MI) const override
virtual bool PredicateInstruction(MachineInstr &mi, ArrayRef< MachineOperand > cond) const override
virtual void loadRegFromStackSlot(MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, Register destReg, int frameIndex, const TargetRegisterClass *rc, const TargetRegisterInfo *) const override
virtual void storeRegToStackSlot(MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, Register srcReg, bool isKill, int frameIndex, const TargetRegisterClass *rc, const TargetRegisterInfo *) const override
virtual bool isProfitableToIfCvt(MachineBasicBlock &MBB, unsigned NumCycles, unsigned ExtraPredCycles, BranchProbability Probability) const override
virtual DFAPacketizer * CreateTargetScheduleState(const TargetSubtargetInfo &) const override
virtual void copyPhysReg(MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, const DebugLoc &DL, MCRegister destReg, MCRegister srcReg, bool KillSrc) const override
virtual void insertCCBranch(MachineBasicBlock &mbb, MachineBasicBlock &tbb, ArrayRef< MachineOperand > cond, const DebugLoc &dl) const
const TCETargetMachinePlugin * plugin_
virtual bool SubsumesPredicate(ArrayRef< MachineOperand > Pred1, ArrayRef< MachineOperand > Pred2) const override
virtual bool analyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB, MachineBasicBlock *&FBB, llvm::SmallVectorImpl< llvm::MachineOperand > &cond, bool allowModify=false) const override
virtual const TargetRegisterInfo & getRegisterInfo() const
const InstrItineraryData * getInstrItineraryData() const
virtual unsigned insertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB, MachineBasicBlock *FBB, ArrayRef< MachineOperand > Cond, const DebugLoc &DL, int *BytesAdded=nullptr) const override
virtual void storeRegToStackSlot(MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, unsigned srcReg, bool isKill, int frameIndex, const TargetRegisterClass *rc) const
bool copyPhysVectorReg(MachineBasicBlock &mbb, MachineBasicBlock::iterator mbbi, const DebugLoc &DL, MCRegister destReg, MCRegister srcReg, bool killSrc) const
int getMatchingCondBranchOpcode(int Opc, bool inverted) const
InstrItineraryData InstrItins
unsigned removeBranch(MachineBasicBlock &mbb, int *BytesRemoved=nullptr) 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 enou...
std::tuple< int, int > getPointerAdjustment(int offset) const
const TCERegisterInfo ri_
virtual bool reverseBranchCondition(llvm::SmallVectorImpl< llvm::MachineOperand > &cond) const override
virtual bool ClobbersPredicate(MachineInstr &MI, std::vector< MachineOperand > &Pred, bool SkipDead) const override
virtual bool BlockHasNoFallThrough(const MachineBasicBlock &MBB) const