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

#include <TCEStubTargetMachine.hh>

Inheritance diagram for llvm::TCEStubTargetMachine:
Inheritance graph
Collaboration diagram for llvm::TCEStubTargetMachine:
Collaboration graph

Public Member Functions

 TCEStubTargetMachine (const Target &T, const Triple &TT, const llvm::StringRef &CPU, const llvm::StringRef &FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool isLittle)
 
virtual ~TCEStubTargetMachine ()
 
const TCEStubSubTargetgetSubtargetImpl () const
 
const TCEStubSubTargetgetSubtargetImpl (const Function &) const override
 
- Public Member Functions inherited from llvm::TCEBaseTargetMachine
 TCEBaseTargetMachine (const Target &T, const Triple &TT, const llvm::StringRef &CPU, const llvm::StringRef &FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
 
virtual bool isNoopAddrSpaceCast (unsigned SrcAS, unsigned DestAS) const override
 
virtual void setTTAMach (const TTAMachine::Machine *mach)
 

Static Public Member Functions

static void setADFString (std::string adfXML)
 

Static Public Attributes

static std::string adfXML_ = ""
 

Protected Attributes

std::unique_ptr< TargetLoweringObjectFile > TLOF
 
TCEStubSubTargetST
 

Additional Inherited Members

- Public Attributes inherited from llvm::TCEBaseTargetMachine
const TTAMachine::MachinettaMach_
 

Detailed Description

TargetStub for middle end optimizations. (for loopvectorizer initially)

Definition at line 102 of file TCEStubTargetMachine.hh.

Constructor & Destructor Documentation

◆ TCEStubTargetMachine()

TCEStubTargetMachine::TCEStubTargetMachine ( const Target &  T,
const Triple &  TT,
const llvm::StringRef &  CPU,
const llvm::StringRef &  FS,
const TargetOptions &  Options,
Optional< Reloc::Model >  RM,
Optional< CodeModel::Model >  CM,
CodeGenOpt::Level  OL,
bool  isLittle 
)

Definition at line 134 of file TCEStubTargetMachine.cc.

138  :
139  TCEBaseTargetMachine(T, TT, CPU, FS, Options,
140  RM?*RM:Reloc::Model::Static,
141  CM?*CM:CodeModel::Small, OL),
142  // Note: Reloc::Model does not have "Default" named member. "Static" is ok?
143  // Note: CodeModel does not have "Default" named member. "Small" is ok?
144  TLOF(new TargetLoweringObjectFileELF) {
145 // TLOF(new TargetLoweringObjectFile) {
146  ST = new TCEStubSubTarget(TT, CPU, FS, *this);
147 
148  // For autovectorization to work we need to set target machine information:
149  // Load ADF from static adfXML string
150  ADFSerializer serializer;
151  serializer.setSourceString(adfXML_);
152  // Create and set TTAMachine
153  TTAMachine::Machine* targetTTAMachine = serializer.readMachine();
154  setTTAMach(targetTTAMachine);
155 }

References adfXML_, ADFSerializer::readMachine(), XMLSerializer::setSourceString(), llvm::TCEBaseTargetMachine::setTTAMach(), and ST.

Here is the call graph for this function:

◆ ~TCEStubTargetMachine()

TCEStubTargetMachine::~TCEStubTargetMachine ( )
virtual

Definition at line 157 of file TCEStubTargetMachine.cc.

157 {}

Member Function Documentation

◆ getSubtargetImpl() [1/2]

const TCEStubSubTarget* llvm::TCEStubTargetMachine::getSubtargetImpl ( ) const
inline

Definition at line 120 of file TCEStubTargetMachine.hh.

120  {
121  return ST;
122  }

References ST.

◆ getSubtargetImpl() [2/2]

const TCEStubSubTarget* llvm::TCEStubTargetMachine::getSubtargetImpl ( const Function &  ) const
inlineoverride

Definition at line 123 of file TCEStubTargetMachine.hh.

124  {
125  return ST;
126  }

References ST.

◆ setADFString()

void TCEStubTargetMachine::setADFString ( std::string  adfXML)
static

Definition at line 160 of file TCEStubTargetMachine.cc.

160  {
161  adfXML_ = adfXML;
162 }

References adfXML_.

Referenced by TCEPluginInitializer::TCEPluginInitializer().

Member Data Documentation

◆ adfXML_

std::string TCEStubTargetMachine::adfXML_ = ""
static

Definition at line 130 of file TCEStubTargetMachine.hh.

Referenced by setADFString(), and TCEStubTargetMachine().

◆ ST

TCEStubSubTarget* llvm::TCEStubTargetMachine::ST
protected

Definition at line 105 of file TCEStubTargetMachine.hh.

Referenced by getSubtargetImpl(), and TCEStubTargetMachine().

◆ TLOF

std::unique_ptr<TargetLoweringObjectFile> llvm::TCEStubTargetMachine::TLOF
protected

Definition at line 104 of file TCEStubTargetMachine.hh.


The documentation for this class was generated from the following files:
Options
Definition: Options.hh:51
llvm::TCEBaseTargetMachine::setTTAMach
virtual void setTTAMach(const TTAMachine::Machine *mach)
Definition: TCEStubTargetMachine.hh:94
llvm::TCEStubTargetMachine::adfXML_
static std::string adfXML_
Definition: TCEStubTargetMachine.hh:130
llvm::TCEBaseTargetMachine::TCEBaseTargetMachine
TCEBaseTargetMachine(const Target &T, const Triple &TT, const llvm::StringRef &CPU, const llvm::StringRef &FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
Definition: TCEStubTargetMachine.cc:125
ADFSerializer
Definition: ADFSerializer.hh:49
llvm::TCEStubSubTarget
Definition: TCEStubSubTarget.hh:51
llvm::TCEStubTargetMachine::ST
TCEStubSubTarget * ST
Definition: TCEStubTargetMachine.hh:105
ADFSerializer::readMachine
TTAMachine::Machine * readMachine()
Definition: ADFSerializer.cc:275
XMLSerializer::setSourceString
void setSourceString(const std::string &source)
Definition: XMLSerializer.cc:128
TTAMachine::Machine
Definition: Machine.hh:73
llvm::TCEStubTargetMachine::TLOF
std::unique_ptr< TargetLoweringObjectFile > TLOF
Definition: TCEStubTargetMachine.hh:104