OpenASIP  2.0
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
llvm::LLVMPOMBuilder Class Reference

#include <LLVMPOMBuilder.hh>

Inheritance diagram for llvm::LLVMPOMBuilder:
Inheritance graph
Collaboration diagram for llvm::LLVMPOMBuilder:
Collaboration graph

Public Member Functions

 LLVMPOMBuilder (char &ID)
 
bool doFinalization (Module &m)
 
 LLVMPOMBuilder (TCETargetMachine &tm, TTAMachine::Machine *mach)
 
virtual ~LLVMPOMBuilder ()
 
- Public Member Functions inherited from llvm::LLVMTCEBuilder
 LLVMTCEBuilder (char &ID)
 
 LLVMTCEBuilder (const TargetMachine &tm, TTAMachine::Machine *mach, char &ID, bool functionAtATime=false)
 
virtual ~LLVMTCEBuilder ()
 
TTAProgram::Programresult ()
 
TTAProgram::InstructionfirstInstructionOfBasicBlock (const llvm::BasicBlock *bb)
 
bool isProgramUsingRestrictedPointers () const
 
virtual void getAnalysisUsage (AnalysisUsage &AU) const
 
virtual bool isTTATarget () const
 
void deleteDeadProcedures ()
 
void setInitialStackPointerValue (unsigned value)
 

Static Public Attributes

static char ID = 0
 
- Static Public Attributes inherited from llvm::LLVMTCEBuilder
static char ID = 0
 

Protected Member Functions

virtual unsigned spDRegNum () const
 
virtual unsigned raPortDRegNum () const
 
virtual TCEString registerFileName (unsigned llvmRegNum) const
 
virtual int registerIndex (unsigned llvmRegNum) const
 
virtual TCEString operationName (const MachineInstr &mi) const
 
virtual TTAProgram::TerminalcreateFUTerminal (const MachineOperand &) const
 
- Protected Member Functions inherited from llvm::LLVMTCEBuilder
bool doInitialization (Module &M)
 
bool runOnMachineFunction (MachineFunction &MF)
 
bool doFinalization (Module &M)
 
bool hasAmbiguousASpaceRefs (const TTAProgram::Instruction &instr) const
 
virtual bool writeMachineFunction (MachineFunction &MF)
 
void initDataSections ()
 
std::shared_ptr< TTAProgram::MovecreateMove (const MachineOperand &src, const MachineOperand &dst, TTAProgram::MoveGuard *guard)
 
const TargetMachine & targetMachine () const
 
TCEString registerName (unsigned llvmRegNum) const
 
std::string mbbName (const MachineBasicBlock &mbb)
 
const TTAMachine::HWOperationgetHWOperation (std::string opName)
 
TTAProgram::TerminalRegistercreateTerminalRegister (const std::string &rfName, int index)
 
TTAProgram::TerminalcreateTerminal (const MachineOperand &mo, int bitLimit=0)
 
std::shared_ptr< TTAProgram::MovecreateMove (TTAProgram::Terminal *src, TTAProgram::Terminal *dst, const TTAMachine::Bus &bus, TTAProgram::MoveGuard *guard=NULL)
 
void emitConstantPool (const llvm::MachineConstantPool &cp)
 
virtual TTAProgram::TerminalcreateMBBReference (const MachineOperand &mo)
 
virtual TTAProgram::TerminalcreateSymbolReference (const MachineOperand &mo)
 
virtual TTAProgram::TerminalcreateProgramOperationReference (const MachineOperand &mo)
 
virtual TTAProgram::TerminalcreateSymbolReference (const TCEString &symbolName)
 
TTAProgram::InstructionemitInstruction (const MachineInstr *mi, TTAProgram::CodeSnippet *proc)
 
virtual TTAProgram::InstructionemitMove (const MachineInstr *mi, TTAProgram::CodeSnippet *proc, bool conditional=false, bool trueGuard=true)
 
TTAProgram::InstructionemitInlineAsm (const MachineFunction &mf, const MachineInstr *mi, TTAProgram::BasicBlock *bb, TTAProgram::InstructionReferenceManager &irm)
 
void fixProgramOperationReferences ()
 
void addLabelForProgramOperation (TCEString label, ProgramOperationPtr po)
 
virtual void emitSPInitialization ()
 
void emitSPInitialization (TTAProgram::CodeSnippet &target)
 
void clearFunctionBookkeeping ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from llvm::LLVMTCEBuilder
static bool isInlineAsm (const MachineInstr &instr)
 
- Protected Attributes inherited from llvm::LLVMTCEBuilder
std::map< std::string, TTAProgram::Instruction * > codeLabels_
 Code labels. More...
 
TTAMachine::Machinemach_
 Machine for building the program. More...
 
const llvm::TargetMachine * tm_
 Target machine description. More...
 
llvm::Mangler * mang_
 Mangler for mangling label strings. More...
 
TTAProgram::Programprog_
 Current program being built. More...
 
std::set< std::string > opset_
 The operations supported by the current target machine. More...
 
bool functionAtATime_
 
PRegionMarkerAnalyzerpregions_
 
int spillMoveCount_
 
unsigned initialStackPointerValue_
 
MachineFrameInfo * curFrameInfo_
 
LLVMTCECmdLineOptionsoptions_ = nullptr
 The compiler options. More...
 

Detailed Description

Implements building unscheduled TCE POM from RISC-style sequential input from LLVM codegen.

The resulting POM has the registers allocated but the FUs and the buses unassigned.

Definition at line 62 of file LLVMPOMBuilder.hh.

Constructor & Destructor Documentation

◆ LLVMPOMBuilder() [1/2]

llvm::LLVMPOMBuilder::LLVMPOMBuilder ( char &  ID)

Definition at line 45 of file LLVMPOMBuilder.cc.

45  : LLVMTCEBuilder(ID) {
46 }

◆ LLVMPOMBuilder() [2/2]

llvm::LLVMPOMBuilder::LLVMPOMBuilder ( TCETargetMachine tm,
TTAMachine::Machine mach 
)

Definition at line 39 of file LLVMPOMBuilder.cc.

41  :
42  LLVMTCEBuilder(tm, mach, ID) {
43 }

◆ ~LLVMPOMBuilder()

virtual llvm::LLVMPOMBuilder::~LLVMPOMBuilder ( )
inlinevirtual

Definition at line 74 of file LLVMPOMBuilder.hh.

74 {}

Member Function Documentation

◆ createFUTerminal()

virtual TTAProgram::Terminal* llvm::LLVMPOMBuilder::createFUTerminal ( const MachineOperand &  ) const
inlineprotectedvirtual

Reimplemented from llvm::LLVMTCEBuilder.

Definition at line 107 of file LLVMPOMBuilder.hh.

108  {
109  // no FU terminals in the RISC-style backend, always through GPRs
110  return NULL;
111  }

◆ doFinalization()

bool llvm::LLVMPOMBuilder::doFinalization ( Module &  m)

Definition at line 49 of file LLVMPOMBuilder.cc.

49  {
50 
52  return false;
53 }

References llvm::LLVMTCEBuilder::doFinalization().

Here is the call graph for this function:

◆ operationName()

virtual TCEString llvm::LLVMPOMBuilder::operationName ( const MachineInstr &  mi) const
inlineprotectedvirtual

Implements llvm::LLVMTCEBuilder.

Definition at line 102 of file LLVMPOMBuilder.hh.

102  {
103  return dynamic_cast<const TCETargetMachine&>(
104  targetMachine()).operationName(mi.getDesc().getOpcode());
105  }

References llvm::LLVMTCEBuilder::targetMachine().

Here is the call graph for this function:

◆ raPortDRegNum()

virtual unsigned llvm::LLVMPOMBuilder::raPortDRegNum ( ) const
inlineprotectedvirtual

Implements llvm::LLVMTCEBuilder.

Definition at line 84 of file LLVMPOMBuilder.hh.

84  {
85  return dynamic_cast<const TCETargetMachine&>(
87  }

References llvm::LLVMTCEBuilder::targetMachine().

Here is the call graph for this function:

◆ registerFileName()

virtual TCEString llvm::LLVMPOMBuilder::registerFileName ( unsigned  llvmRegNum) const
inlineprotectedvirtual

Implements llvm::LLVMTCEBuilder.

Definition at line 90 of file LLVMPOMBuilder.hh.

90  {
91  return dynamic_cast<const TCETargetMachine&>(
92  targetMachine()).rfName(llvmRegNum);
93  }

References llvm::LLVMTCEBuilder::targetMachine().

Here is the call graph for this function:

◆ registerIndex()

virtual int llvm::LLVMPOMBuilder::registerIndex ( unsigned  llvmRegNum) const
inlineprotectedvirtual

Implements llvm::LLVMTCEBuilder.

Definition at line 96 of file LLVMPOMBuilder.hh.

96  {
97  return dynamic_cast<const TCETargetMachine&>(
98  targetMachine()).registerIndex(llvmRegNum);
99  }

References llvm::LLVMTCEBuilder::targetMachine().

Here is the call graph for this function:

◆ spDRegNum()

virtual unsigned llvm::LLVMPOMBuilder::spDRegNum ( ) const
inlineprotectedvirtual

Implements llvm::LLVMTCEBuilder.

Definition at line 78 of file LLVMPOMBuilder.hh.

78  {
79  return dynamic_cast<const TCETargetMachine&>(
81  }

References llvm::LLVMTCEBuilder::targetMachine().

Here is the call graph for this function:

Member Data Documentation

◆ ID

char llvm::LLVMPOMBuilder::ID = 0
static

Definition at line 64 of file LLVMPOMBuilder.hh.


The documentation for this class was generated from the following files:
llvm::LLVMTCEBuilder::doFinalization
bool doFinalization(Module &M)
Definition: LLVMTCEBuilder.cc:1090
llvm::LLVMTCEBuilder::LLVMTCEBuilder
LLVMTCEBuilder(char &ID)
Definition: LLVMTCEBuilder.cc:167
llvm::LLVMPOMBuilder::spDRegNum
virtual unsigned spDRegNum() const
Definition: LLVMPOMBuilder.hh:78
llvm::LLVMPOMBuilder::raPortDRegNum
virtual unsigned raPortDRegNum() const
Definition: LLVMPOMBuilder.hh:84
llvm::LLVMPOMBuilder::operationName
virtual TCEString operationName(const MachineInstr &mi) const
Definition: LLVMPOMBuilder.hh:102
llvm::LLVMPOMBuilder::registerIndex
virtual int registerIndex(unsigned llvmRegNum) const
Definition: LLVMPOMBuilder.hh:96
llvm::LLVMPOMBuilder::ID
static char ID
Definition: LLVMPOMBuilder.hh:64
llvm::LLVMTCEBuilder::targetMachine
const TargetMachine & targetMachine() const
Definition: LLVMTCEBuilder.hh:157