Go to the documentation of this file.
34 #ifndef LLVM_TCE_IR_BUILDER_H
35 #define LLVM_TCE_IR_BUILDER_H
37 #include <llvm/CodeGen/MachineFunctionPass.h>
38 #include <llvm/Analysis/AliasAnalysis.h>
67 bool functionAtATime=
false,
bool modifyMF=
false);
81 return "TCE: build TCE scheduler IR from MachineFunctions";
115 const MachineOperand&)
const {
121 const MachineOperand& mo);
128 std::shared_ptr<TTAProgram::Move> m,
129 bool isDestination)
override;
136 MachineBasicBlock::const_iterator i,
137 const MachineBasicBlock& mbb);
141 llvm::MachineFunction& mf);
155 llvm::MachineFunction& mf,
158 llvm::MachineFunction& mf,
168 std::map<const MachineBasicBlock*,BasicBlockNode*>
bbMapping_;
void getAnalysisUsage(AnalysisUsage &AU) const
virtual int registerIndex(unsigned llvmRegNum) const
virtual bool doFinalization(Module &m)
virtual TTAProgram::Terminal * createMBBReference(const MachineOperand &mo)
std::map< const MachineBasicBlock *, BasicBlockNode * > bbMapping_
bool isHotFunction(llvm::MachineFunction &mf) const
bool hasRealInstructions(MachineBasicBlock::const_iterator i, const MachineBasicBlock &mbb)
virtual TTAProgram::Terminal * createFUTerminal(const MachineOperand &) const
FunctionPass * createLLVMTCECFGBuilderPass(TCETargetMachine &tm, TTAMachine::Machine *mach, InterPassData &ipd)
CopyingDelaySlotFiller & delaySlotFiller()
void fixJumpTableDestinations(llvm::MachineFunction &mf, ControlFlowGraph &cfg)
std::shared_ptr< ProgramOperation > ProgramOperationPtr
LLVMTCEIRBuilder(const TargetMachine &tm, TTAMachine::Machine *mach, InterPassData &ipd, AliasAnalysis *AA, bool functionAtATime=false, bool modifyMF=false)
virtual TTAProgram::Terminal * createSymbolReference(const TCEString &symbolName)
std::set< TCEString > allParamRegs_
BBSchedulerController & scheduler()
#define abortWithError(message)
virtual unsigned raPortDRegNum() const
void compileOptimized(ControlFlowGraph &cfg, llvm::AliasAnalysis *llvmAA)
DataDependenceGraphBuilder ddgBuilder_
bool isRealInstruction(const MachineInstr &instr) const
std::vector< std::vector< BasicBlockNode * > > jumpTableRecord_
void markJumpTableDestinations(llvm::MachineFunction &mf, ControlFlowGraph &cfg)
virtual void emitSPInitialization()
virtual void createMoveNode(ProgramOperationPtr &po, std::shared_ptr< TTAProgram::Move > m, bool isDestination) override
void compileFast(ControlFlowGraph &cfg)
void setInnerLoopFinder(InnerLoopFinder *loopFinder)
CycleLookBackSoftwareBypasser * bypasser_
bool writeMachineFunction(MachineFunction &mf)
CopyingDelaySlotFiller * dsf_
void convertProcedureToMachineFunction(const TTAProgram::Procedure &proc, llvm::MachineFunction &mf)
bool isExplicitReturn(const llvm::MachineInstr &mi) const
virtual unsigned spDRegNum() const
std::map< const MachineBasicBlock *, BasicBlockNode * > skippedBBs_
BBSchedulerController * scheduler_
virtual bool doInitialization(Module &m)
InnerLoopFinder * loopFinder_
virtual TCEString operationName(const MachineInstr &mi) const
virtual TCEString registerFileName(unsigned llvmRegNum) const
const TargetMachine & targetMachine() const
virtual StringRef getPassName() const
virtual ~LLVMTCEIRBuilder()
ControlFlowGraph * buildTCECFG(llvm::MachineFunction &mf)
virtual bool isTTATarget() const