OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | 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, std::optional< Reloc::Model > RM, std::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)
 

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,
std::optional< Reloc::Model >  RM,
std::optional< CodeModel::Model >  CM,
CodeGenOpt::Level  OL,
bool  isLittle 
)

Definition at line 134 of file TCEStubTargetMachine.cc.

142 :
143 TCEBaseTargetMachine(T, TT, CPU, FS, Options,
144 RM?*RM:Reloc::Model::Static,
145 CM?*CM:CodeModel::Small, OL),
146 // Note: Reloc::Model does not have "Default" named member. "Static" is ok?
147 // Note: CodeModel does not have "Default" named member. "Small" is ok?
148 TLOF(new TargetLoweringObjectFileELF) {
149// TLOF(new TargetLoweringObjectFile) {
150 ST = new TCEStubSubTarget(TT, CPU, FS, *this);
151
152 // For autovectorization to work we need to set target machine information:
153 auto* option = static_cast<llvm::cl::opt<std::string>*>(
154 llvm::cl::getRegisteredOptions().lookup("adf"));
155 const std::string adfName = option->getValue();
156
157 ADFSerializer serializer;
158 if (adfName == "") {
159 const std::string msg = "ADF not passed to opt,"
160 "make sure it is included in oacc";
161 throw CompileError(__FILE__, __LINE__, __func__, msg);
162 }
163
164 serializer.setSourceFile(adfName);
165 // Create and set TTAMachine
166 TTAMachine::Machine* targetTTAMachine = serializer.readMachine();
167 setTTAMach(targetTTAMachine);
168}
#define __func__
TTAMachine::Machine * readMachine()
Definition Model.hh:50
void setSourceFile(const std::string &fileName)
virtual void setTTAMach(const TTAMachine::Machine *mach)
std::unique_ptr< TargetLoweringObjectFile > TLOF

References __func__, ADFSerializer::readMachine(), XMLSerializer::setSourceFile(), llvm::TCEBaseTargetMachine::setTTAMach(), and ST.

Here is the call graph for this function:

◆ ~TCEStubTargetMachine()

TCEStubTargetMachine::~TCEStubTargetMachine ( )
virtual

Definition at line 170 of file TCEStubTargetMachine.cc.

170{}

Member Function Documentation

◆ getSubtargetImpl() [1/2]

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

Definition at line 124 of file TCEStubTargetMachine.hh.

124 {
125 return ST;
126 }

References ST.

◆ getSubtargetImpl() [2/2]

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

Definition at line 127 of file TCEStubTargetMachine.hh.

128 {
129 return ST;
130 }

References ST.

Member Data Documentation

◆ ST

TCEStubSubTarget* llvm::TCEStubTargetMachine::ST
protected

◆ 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: