OpenASIP  2.0
Public Member Functions | Protected Attributes | List of all members
llvm::TCETargetMachinePlugin Class Referenceabstract

#include <TCETargetMachinePlugin.hh>

Inheritance diagram for llvm::TCETargetMachinePlugin:
Inheritance graph
Collaboration diagram for llvm::TCETargetMachinePlugin:
Collaboration graph

Public Member Functions

 TCETargetMachinePlugin ()
 
virtual ~TCETargetMachinePlugin ()
 
virtual const TargetInstrInfo * getInstrInfo () const =0
 
virtual const TargetRegisterInfo * getRegisterInfo () const =0
 
virtual const TargetFrameLowering * getFrameLowering () const =0
 
virtual TargetLowering * getTargetLowering () const =0
 
virtual const TargetSubtargetInfo * getSubtarget () const =0
 
virtual TargetTransformInfo getTargetTransformInfo (const Function &F) const =0
 
virtual FunctionPass * createISelPass (TCETargetMachine *tm)=0
 
virtual std::string rfName (unsigned dwarfRegNum)=0
 Returns name of the physical register file corresponding to a generated register ID. More...
 
virtual unsigned registerIndex (unsigned dwarfRegNum)=0
 Returns name of the physical register index corresponding to a generated register ID. More...
 
virtual unsigned llvmRegisterId (const TCEString &ttaRegister)=0
 
virtual std::string operationName (unsigned opc) const =0
 Returns operation name corresponding to llvm target opcode. More...
 
virtual bool validStackAccessOperation (const std::string &opName) const =0
 Returns true if OSAL operation is valid for stack accesses. More...
 
virtual bool hasOperation (TCEString operationName) const =0
 Returns true in case the target supports the given osal operation. More...
 
virtual unsigned opcode (TCEString operationName) const =0
 Returns the opcode for the given osal operation, undefined if not found. More...
 
virtual unsigned int extractElementLane (const MachineInstr &mi) const =0
 
virtual int getTruePredicateOpcode (unsigned opc) const =0
 
virtual int getFalsePredicateOpcode (unsigned opc) const =0
 
virtual const std::string * adfXML ()=0
 Returns pointer to xml string of the target machine .adf. More...
 
virtual std::string dataASName ()=0
 Returns name of the data address space. More...
 
virtual unsigned raPortDRegNum ()=0
 Returns ID number of the return address register. More...
 
virtual unsigned spDRegNum ()=0
 Returns ID number of the stack pointer register. More...
 
virtual unsigned fpDRegNum ()=0
 Returns ID number of the frame pointer register. More...
 
virtual unsigned rvDRegNum ()=0
 
virtual unsigned rvHighDRegNum ()=0
 
virtual std::vector< unsigned > getParamDRegNums () const =0
 
virtual std::vector< unsigned > getVectorRVDRegNums () const =0
 
virtual bool hasUDIV () const =0
 
virtual bool hasSDIV () const =0
 
virtual bool hasUREM () const =0
 
virtual bool hasSREM () const =0
 
virtual bool hasMUL () const =0
 
virtual bool hasROTL () const =0
 
virtual bool hasROTR () const =0
 
virtual bool hasSXHW () const =0
 
virtual bool hasSXQW () const =0
 
virtual bool hasSQRTF () const =0
 
virtual bool hasSHR () const =0
 
virtual bool hasSHL () const =0
 
virtual bool hasSHRU () const =0
 
virtual bool has8bitLoads () const =0
 
virtual bool has16bitLoads () const =0
 
virtual int maxVectorSize () const =0
 
virtual void registerTargetMachine (TCETargetMachine &tm)=0
 Plugin needs target machine for TragetLowering generation. More...
 
virtual int getMinOpcode (llvm::SDNode *n) const =0
 
virtual int getMaxOpcode (llvm::SDNode *n) const =0
 
virtual int getMinuOpcode (llvm::SDNode *n) const =0
 
virtual int getMaxuOpcode (llvm::SDNode *n) const =0
 
virtual int getLoad (const TargetRegisterClass *rc) const =0
 
virtual int getStore (const TargetRegisterClass *rc) const =0
 
virtual int getLoadOpcode (const llvm::EVT &vt) const =0
 
virtual int getAddOpcode (const llvm::EVT &vt) const =0
 
virtual int getShlOpcode (const llvm::EVT &vt) const =0
 
virtual int getIorOpcode (const llvm::EVT &vt) const =0
 
virtual const llvm::TargetRegisterClass * extrasRegClass (const llvm::TargetRegisterClass *current) const =0
 Clustered-TTA-subtemplate related methods. More...
 
virtual const llvm::TargetRegisterClass * nodeRegClass (unsigned nodeId, const llvm::TargetRegisterClass *current) const =0
 
virtual bool isLittleEndian () const =0
 
virtual bool is64bit () const =0
 
virtual const DataLayout * getDataLayout () const
 
virtual DataLayout * getDataLayout ()
 
virtual TCETargetMachinegetCurrentTargetMachine ()
 
virtual const TCETargetMachinegetCurrentTargetMachine () const
 
virtual bool analyzeCCBranch (llvm::MachineInstr &i, llvm::SmallVectorImpl< llvm::MachineOperand > &cond) const
 
virtual const SelectionDAGTargetInfo * getSelectionDAGInfo () const
 
virtual bool canMaterializeConstant (const ConstantInt &ci) const =0
 
virtual std::tuple< int, int > getPointerAdjustment (int offset) const =0
 
virtual MVT::SimpleValueType getDefaultType () const =0
 

Protected Attributes

TCEInstrInfoinstrInfo_
 Target machine instruction info for the llvm framework. More...
 
TargetLowering * lowering_
 
TargetFrameLowering * frameInfo_
 
TCETargetMachinetm_
 
TCESubtargetsubTarget_
 
DataLayout dl_
 
SelectionDAGTargetInfo tsInfo_
 

Detailed Description

Definition at line 109 of file TCETargetMachinePlugin.hh.

Constructor & Destructor Documentation

◆ TCETargetMachinePlugin()

llvm::TCETargetMachinePlugin::TCETargetMachinePlugin ( )
inline

Definition at line 112 of file TCETargetMachinePlugin.hh.

112  : lowering_(NULL), tm_(NULL),
113  dl_(TCELE64DLString) {};

◆ ~TCETargetMachinePlugin()

virtual llvm::TCETargetMachinePlugin::~TCETargetMachinePlugin ( )
inlinevirtual

Definition at line 116 of file TCETargetMachinePlugin.hh.

116 {};

Member Function Documentation

◆ adfXML()

virtual const std::string* llvm::TCETargetMachinePlugin::adfXML ( )
pure virtual

Returns pointer to xml string of the target machine .adf.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::createMachine().

◆ analyzeCCBranch()

virtual bool llvm::TCETargetMachinePlugin::analyzeCCBranch ( llvm::MachineInstr &  i,
llvm::SmallVectorImpl< llvm::MachineOperand > &  cond 
) const
inlinevirtual

Reimplemented in llvm::GeneratedTCEPlugin.

Definition at line 238 of file TCETargetMachinePlugin.hh.

240  {
241  return true;
242  }

Referenced by llvm::TCEInstrInfo::analyzeBranch().

◆ canMaterializeConstant()

virtual bool llvm::TCETargetMachinePlugin::canMaterializeConstant ( const ConstantInt &  ci) const
pure virtual

◆ createISelPass()

virtual FunctionPass* llvm::TCETargetMachinePlugin::createISelPass ( TCETargetMachine tm)
pure virtual

◆ dataASName()

virtual std::string llvm::TCETargetMachinePlugin::dataASName ( )
pure virtual

Returns name of the data address space.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::dataASName().

◆ extractElementLane()

virtual unsigned int llvm::TCETargetMachinePlugin::extractElementLane ( const MachineInstr &  mi) const
pure virtual

◆ extrasRegClass()

virtual const llvm::TargetRegisterClass* llvm::TCETargetMachinePlugin::extrasRegClass ( const llvm::TargetRegisterClass *  current) const
pure virtual

Clustered-TTA-subtemplate related methods.

Implemented in llvm::GeneratedTCEPlugin.

◆ fpDRegNum()

virtual unsigned llvm::TCETargetMachinePlugin::fpDRegNum ( )
pure virtual

Returns ID number of the frame pointer register.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by LLVMBackend::compile().

◆ getAddOpcode()

virtual int llvm::TCETargetMachinePlugin::getAddOpcode ( const llvm::EVT &  vt) const
pure virtual

◆ getCurrentTargetMachine() [1/2]

virtual TCETargetMachine* llvm::TCETargetMachinePlugin::getCurrentTargetMachine ( )
inlinevirtual

Definition at line 231 of file TCETargetMachinePlugin.hh.

231  {
232  return tm_;
233  }

References tm_.

◆ getCurrentTargetMachine() [2/2]

virtual const TCETargetMachine* llvm::TCETargetMachinePlugin::getCurrentTargetMachine ( ) const
inlinevirtual

Definition at line 234 of file TCETargetMachinePlugin.hh.

234  {
235  return tm_;
236  }

References tm_.

◆ getDataLayout() [1/2]

virtual DataLayout* llvm::TCETargetMachinePlugin::getDataLayout ( )
inlinevirtual

Definition at line 227 of file TCETargetMachinePlugin.hh.

227  {
228  return &dl_;
229  }

References dl_.

◆ getDataLayout() [2/2]

virtual const DataLayout* llvm::TCETargetMachinePlugin::getDataLayout ( ) const
inlinevirtual

Definition at line 223 of file TCETargetMachinePlugin.hh.

223  {
224  return &dl_;
225  }

References dl_.

Referenced by llvm::TCETargetMachine::getDataLayout(), and llvm::TCETargetMachine::setTargetMachinePlugin().

◆ getDefaultType()

virtual MVT::SimpleValueType llvm::TCETargetMachinePlugin::getDefaultType ( ) const
pure virtual

◆ getFalsePredicateOpcode()

virtual int llvm::TCETargetMachinePlugin::getFalsePredicateOpcode ( unsigned  opc) const
pure virtual

◆ getFrameLowering()

virtual const TargetFrameLowering* llvm::TCETargetMachinePlugin::getFrameLowering ( ) const
pure virtual

◆ getInstrInfo()

virtual const TargetInstrInfo* llvm::TCETargetMachinePlugin::getInstrInfo ( ) const
pure virtual

◆ getIorOpcode()

virtual int llvm::TCETargetMachinePlugin::getIorOpcode ( const llvm::EVT &  vt) const
pure virtual

◆ getLoad()

virtual int llvm::TCETargetMachinePlugin::getLoad ( const TargetRegisterClass *  rc) const
pure virtual

◆ getLoadOpcode()

virtual int llvm::TCETargetMachinePlugin::getLoadOpcode ( const llvm::EVT &  vt) const
pure virtual

◆ getMaxOpcode()

virtual int llvm::TCETargetMachinePlugin::getMaxOpcode ( llvm::SDNode *  n) const
pure virtual

◆ getMaxuOpcode()

virtual int llvm::TCETargetMachinePlugin::getMaxuOpcode ( llvm::SDNode *  n) const
pure virtual

◆ getMinOpcode()

virtual int llvm::TCETargetMachinePlugin::getMinOpcode ( llvm::SDNode *  n) const
pure virtual

◆ getMinuOpcode()

virtual int llvm::TCETargetMachinePlugin::getMinuOpcode ( llvm::SDNode *  n) const
pure virtual

◆ getParamDRegNums()

virtual std::vector<unsigned> llvm::TCETargetMachinePlugin::getParamDRegNums ( ) const
pure virtual

Implemented in llvm::GeneratedTCEPlugin.

Referenced by LLVMBackend::compile().

◆ getPointerAdjustment()

virtual std::tuple<int, int> llvm::TCETargetMachinePlugin::getPointerAdjustment ( int  offset) const
pure virtual

◆ getRegisterInfo()

virtual const TargetRegisterInfo* llvm::TCETargetMachinePlugin::getRegisterInfo ( ) const
pure virtual

◆ getSelectionDAGInfo()

virtual const SelectionDAGTargetInfo* llvm::TCETargetMachinePlugin::getSelectionDAGInfo ( ) const
inlinevirtual

Definition at line 244 of file TCETargetMachinePlugin.hh.

244  {
245  return &tsInfo_;
246  }

References tsInfo_.

Referenced by llvm::TCESubtarget::getSelectionDAGInfo().

◆ getShlOpcode()

virtual int llvm::TCETargetMachinePlugin::getShlOpcode ( const llvm::EVT &  vt) const
pure virtual

◆ getStore()

virtual int llvm::TCETargetMachinePlugin::getStore ( const TargetRegisterClass *  rc) const
pure virtual

◆ getSubtarget()

virtual const TargetSubtargetInfo* llvm::TCETargetMachinePlugin::getSubtarget ( ) const
pure virtual

◆ getTargetLowering()

virtual TargetLowering* llvm::TCETargetMachinePlugin::getTargetLowering ( ) const
pure virtual

◆ getTargetTransformInfo()

virtual TargetTransformInfo llvm::TCETargetMachinePlugin::getTargetTransformInfo ( const Function &  F) const
pure virtual

◆ getTruePredicateOpcode()

virtual int llvm::TCETargetMachinePlugin::getTruePredicateOpcode ( unsigned  opc) const
pure virtual

◆ getVectorRVDRegNums()

virtual std::vector<unsigned> llvm::TCETargetMachinePlugin::getVectorRVDRegNums ( ) const
pure virtual

Implemented in llvm::GeneratedTCEPlugin.

Referenced by LLVMBackend::compile().

◆ has16bitLoads()

virtual bool llvm::TCETargetMachinePlugin::has16bitLoads ( ) const
pure virtual

◆ has8bitLoads()

virtual bool llvm::TCETargetMachinePlugin::has8bitLoads ( ) const
pure virtual

◆ hasMUL()

virtual bool llvm::TCETargetMachinePlugin::hasMUL ( ) const
pure virtual

◆ hasOperation()

virtual bool llvm::TCETargetMachinePlugin::hasOperation ( TCEString  operationName) const
pure virtual

Returns true in case the target supports the given osal operation.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::hasOperation().

◆ hasROTL()

virtual bool llvm::TCETargetMachinePlugin::hasROTL ( ) const
pure virtual

◆ hasROTR()

virtual bool llvm::TCETargetMachinePlugin::hasROTR ( ) const
pure virtual

◆ hasSDIV()

virtual bool llvm::TCETargetMachinePlugin::hasSDIV ( ) const
pure virtual

◆ hasSHL()

virtual bool llvm::TCETargetMachinePlugin::hasSHL ( ) const
pure virtual

◆ hasSHR()

virtual bool llvm::TCETargetMachinePlugin::hasSHR ( ) const
pure virtual

◆ hasSHRU()

virtual bool llvm::TCETargetMachinePlugin::hasSHRU ( ) const
pure virtual

◆ hasSQRTF()

virtual bool llvm::TCETargetMachinePlugin::hasSQRTF ( ) const
pure virtual

◆ hasSREM()

virtual bool llvm::TCETargetMachinePlugin::hasSREM ( ) const
pure virtual

◆ hasSXHW()

virtual bool llvm::TCETargetMachinePlugin::hasSXHW ( ) const
pure virtual

◆ hasSXQW()

virtual bool llvm::TCETargetMachinePlugin::hasSXQW ( ) const
pure virtual

◆ hasUDIV()

virtual bool llvm::TCETargetMachinePlugin::hasUDIV ( ) const
pure virtual

◆ hasUREM()

virtual bool llvm::TCETargetMachinePlugin::hasUREM ( ) const
pure virtual

◆ is64bit()

virtual bool llvm::TCETargetMachinePlugin::is64bit ( ) const
pure virtual

◆ isLittleEndian()

virtual bool llvm::TCETargetMachinePlugin::isLittleEndian ( ) const
pure virtual

◆ llvmRegisterId()

virtual unsigned llvm::TCETargetMachinePlugin::llvmRegisterId ( const TCEString ttaRegister)
pure virtual

Returns LLVM register ID corresponding to TTA register name.

Parameters
ttaRegisterThe name of the TTA register. For example "RF.5".
Returns
The register number if it exists in the target. Otherwise, returns TCE::NoRegister.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::llvmRegisterId().

◆ maxVectorSize()

virtual int llvm::TCETargetMachinePlugin::maxVectorSize ( ) const
pure virtual

Implemented in llvm::GeneratedTCEPlugin.

◆ nodeRegClass()

virtual const llvm::TargetRegisterClass* llvm::TCETargetMachinePlugin::nodeRegClass ( unsigned  nodeId,
const llvm::TargetRegisterClass *  current 
) const
pure virtual

Implemented in llvm::GeneratedTCEPlugin.

◆ opcode()

virtual unsigned llvm::TCETargetMachinePlugin::opcode ( TCEString  operationName) const
pure virtual

Returns the opcode for the given osal operation, undefined if not found.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::opcode(), and ConstantTransformer::runOnMachineFunction().

◆ operationName()

virtual std::string llvm::TCETargetMachinePlugin::operationName ( unsigned  opc) const
pure virtual

Returns operation name corresponding to llvm target opcode.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCEInstrInfo::isPredicated(), and llvm::TCETargetMachine::operationName().

◆ raPortDRegNum()

virtual unsigned llvm::TCETargetMachinePlugin::raPortDRegNum ( )
pure virtual

Returns ID number of the return address register.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::raPortDRegNum().

◆ registerIndex()

virtual unsigned llvm::TCETargetMachinePlugin::registerIndex ( unsigned  dwarfRegNum)
pure virtual

Returns name of the physical register index corresponding to a generated register ID.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by LLVMBackend::compile(), and llvm::TCETargetMachine::registerIndex().

◆ registerTargetMachine()

virtual void llvm::TCETargetMachinePlugin::registerTargetMachine ( TCETargetMachine tm)
pure virtual

Plugin needs target machine for TragetLowering generation.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::setTargetMachinePlugin().

◆ rfName()

virtual std::string llvm::TCETargetMachinePlugin::rfName ( unsigned  dwarfRegNum)
pure virtual

Returns name of the physical register file corresponding to a generated register ID.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by LLVMBackend::compile(), and llvm::TCETargetMachine::rfName().

◆ rvDRegNum()

virtual unsigned llvm::TCETargetMachinePlugin::rvDRegNum ( )
pure virtual

Implemented in llvm::GeneratedTCEPlugin.

Referenced by LLVMBackend::compile().

◆ rvHighDRegNum()

virtual unsigned llvm::TCETargetMachinePlugin::rvHighDRegNum ( )
pure virtual

◆ spDRegNum()

virtual unsigned llvm::TCETargetMachinePlugin::spDRegNum ( )
pure virtual

Returns ID number of the stack pointer register.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by LLVMBackend::compile(), and llvm::TCETargetMachine::spDRegNum().

◆ validStackAccessOperation()

virtual bool llvm::TCETargetMachinePlugin::validStackAccessOperation ( const std::string &  opName) const
pure virtual

Returns true if OSAL operation is valid for stack accesses.

Implemented in llvm::GeneratedTCEPlugin.

Referenced by llvm::TCETargetMachine::validStackAccessOperation().

Member Data Documentation

◆ dl_

DataLayout llvm::TCETargetMachinePlugin::dl_
protected

Definition at line 262 of file TCETargetMachinePlugin.hh.

Referenced by getDataLayout().

◆ frameInfo_

TargetFrameLowering* llvm::TCETargetMachinePlugin::frameInfo_
protected

◆ instrInfo_

TCEInstrInfo* llvm::TCETargetMachinePlugin::instrInfo_
protected

◆ lowering_

TargetLowering* llvm::TCETargetMachinePlugin::lowering_
protected

◆ subTarget_

TCESubtarget* llvm::TCETargetMachinePlugin::subTarget_
protected

◆ tm_

TCETargetMachine* llvm::TCETargetMachinePlugin::tm_
protected

◆ tsInfo_

SelectionDAGTargetInfo llvm::TCETargetMachinePlugin::tsInfo_
protected

Definition at line 263 of file TCETargetMachinePlugin.hh.

Referenced by getSelectionDAGInfo().


The documentation for this class was generated from the following file:
llvm::TCETargetMachinePlugin::tm_
TCETargetMachine * tm_
Definition: TCETargetMachinePlugin.hh:260
TCELE64DLString
#define TCELE64DLString
Definition: TCETargetMachinePlugin.hh:40
llvm::TCETargetMachinePlugin::dl_
DataLayout dl_
Definition: TCETargetMachinePlugin.hh:262
llvm::TCETargetMachinePlugin::tsInfo_
SelectionDAGTargetInfo tsInfo_
Definition: TCETargetMachinePlugin.hh:263
llvm::TCETargetMachinePlugin::lowering_
TargetLowering * lowering_
Definition: TCETargetMachinePlugin.hh:258