OpenASIP  2.0
TCETargetMachine.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2015 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file TCETargetMachine.h
26  *
27  * Declaration of TCETargetMachine class.
28  *
29  * @author Veli-Pekka J��skel�inen 2007 (vjaaskel-no.spam-cs.tut.fi)
30  * @author Mikael Lepist� 2009 (mikael.lepisto-no.spam-tut.fi)
31  */
32 
33 #ifndef TCE_TARGET_MACHINE_H
34 #define TCE_TARGET_MACHINE_H
35 
36 #include <set>
37 
38 #include "tce_config.h"
39 #include "CompilerWarnings.hh"
40 
41 IGNORE_COMPILER_WARNING("-Wunused-parameter")
42 
43 #include "llvm/CodeGen/TargetLowering.h"
44 #include "llvm/CodeGen/TargetFrameLowering.h"
45 #include "llvm/Analysis/TargetTransformInfo.h"
46 #include "llvm/Target/TargetMachine.h"
47 #include "llvm/CodeGen/SelectionDAGTargetInfo.h"
48 
49 #include "llvm/IR/PassManager.h"
50 //#include "TCESubtarget.hh"
51 
52 #include "TCEStubTargetMachine.hh"
54 // tce_config.h defines these. this undef to avoid warning.
55 // TODO: how to do this in tce_config.h???
56 #ifdef LLVM_LIBDIR
57 #undef LLVM_LIBDIR
58 #endif
59 
60 
61 #include "llvm/CodeGen/Passes.h"
62 #include "llvm/IR/DataLayout.h"
63 
64 #include "llvm/CodeGen/TargetPassConfig.h"
65 
67 
68 namespace TTAMachine {
69  class Machine;
70 }
71 
72 class PipelineableLoopFinder;
73 
74 class PluginTools;
75 
76 
77 // just to be able to manually register tce target if needed.
78 extern "C" void LLVMInitializeTCETarget();
79 
80 namespace llvm {
81  class TCEPassConfig : public TargetPassConfig {
82  public:
84  LLVMTargetMachine* tm,
85  PassManagerBase& pm,
86  TCETargetMachinePlugin* plugin) :
87  TargetPassConfig(*tm, pm),
88 plugin_(plugin) {
89  assert(plugin_ != NULL);
90  }
91 
92  virtual bool addPreISel();
93  virtual bool addInstSelector();
94 
95  virtual void addPreRegAlloc();
96  virtual void addPreSched2();
97 
99  };
100 
101  class Module;
102 
103  /**
104  * TCE Universal machine target description.
105  */
107 
108  public:
110  const Target &T, const Triple& TTriple,
111  const llvm::StringRef& CPU, const llvm::StringRef& FS,
112  const TargetOptions &Options,
113  Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
114  CodeGenOpt::Level OL, bool isLittle);
115 
116  virtual ~TCETargetMachine();
117 
118  virtual void setTargetMachinePlugin(
120  virtual TCETargetMachinePlugin& targetPlugin() const { return *plugin_; }
121 
122  /**
123  * These two parameter passing should be rethought... maybe TTAMach can be avoided
124  * by changing pass to use plugin_ instead.
125  */
127  virtual void setEmulationModule(Module* mod) {
128  emulationModule_ = mod;
129  }
130 
131  virtual void setTTAMach(
132  const TTAMachine::Machine* mach) override {
135  }
136 
137  virtual const TTAMachine::Machine& ttaMachine() const {
138  return *ttaMach_;
139  }
140 
141 
142  // This method is only in llvm < 3.7, but keep this here to
143  // allow calling this ourselves.
144  virtual const TCESubtarget* getSubtargetImpl() const {
145  // compiler does not know it's derived without the plugin,
146  // but this class cannow include the plugin.
147  return reinterpret_cast<const TCESubtarget*>(plugin_->getSubtarget());
148  }
149 
150  virtual const TargetSubtargetInfo* getSubtargetImpl(const Function&) const override {
151  return plugin_->getSubtarget();
152  }
153 
154  virtual const TargetInstrInfo* getInstrInfo() const {
155  return plugin_->getInstrInfo();
156  }
157 
158  virtual const TargetRegisterInfo* getRegisterInfo() const {
159  return plugin_->getRegisterInfo();
160  }
161 
162  virtual const DataLayout* getDataLayout() const {
163  return plugin_->getDataLayout();
164  }
165 
166  virtual const TargetFrameLowering* getFrameLowering() const {
167  return plugin_->getFrameLowering();
168  }
169  virtual TargetLowering* getTargetLowering() const {
170  return plugin_->getTargetLowering();
171  }
172 
173  virtual TargetPassConfig *createPassConfig(
174  PassManagerBase &PM) override;
175 
176  #ifdef LLVM_OLDER_THAN_15
177  TargetTransformInfo
178  getTargetTransformInfo(const Function& F) override {
179  return plugin_->getTargetTransformInfo(F);
180  }
181  #else
182  TargetTransformInfo
183  getTargetTransformInfo(const Function& F) const override {
184  return plugin_->getTargetTransformInfo(F);
185  }
186  #endif
187 
188  std::string operationName(unsigned opc) const {
189  return plugin_->operationName(opc);
190  }
191 
192  /**
193  * Returns true if LLVM opcode if valid for stack variable accesses.
194  *
195  */
196  bool validStackAccessOperation(const std::string& opName) const {
197  return plugin_->validStackAccessOperation(opName);
198  }
199 
202  }
203 
204  std::string rfName(unsigned dwarfRegNum) const {
205  return plugin_->rfName(dwarfRegNum);
206  }
207 
208  unsigned registerIndex(unsigned dwarfRegNum) const {
209  return plugin_->registerIndex(dwarfRegNum);
210  }
211 
212  /**
213  * Returns full name of the register.
214  *
215  */
216  std::string registerName(unsigned dwarfRegNum) const {
217  return rfName(dwarfRegNum) + "."
218  + std::to_string(registerIndex(dwarfRegNum));
219  }
220 
221  unsigned llvmRegisterId(const TCEString& ttaRegister) {
222  return plugin_->llvmRegisterId(ttaRegister);
223  }
224 
226 
227  std::string dataASName() {
228  return plugin_->dataASName();
229  }
230 
231  unsigned raPortDRegNum() const {
232  return plugin_->raPortDRegNum();
233  }
234 
235  void loadPlugin();
236 
237  unsigned spDRegNum() const {
238  return plugin_->spDRegNum();
239  }
240 
241  unsigned opcode(TCEString operationName) const {
242  return plugin_->opcode(operationName);
243  }
244 
245  int getMinOpcode(llvm::SDNode* n) {
246  return plugin_->getMinOpcode(n);
247  }
248 
249  int getMinuOpcode(llvm::SDNode* n) {
250  return plugin_->getMinuOpcode(n);
251  }
252 
253  int getMaxOpcode(llvm::SDNode* n) {
254  return plugin_->getMaxOpcode(n);
255  }
256 
257  int getMaxuOpcode(llvm::SDNode* n) {
258  return plugin_->getMaxuOpcode(n);
259  }
260 
261  int getAddOpcode(const llvm::EVT& vt) const {
262  return plugin_->getAddOpcode(vt);
263  }
264 
265  int getShlOpcode(const llvm::EVT& vt) const {
266  return plugin_->getShlOpcode(vt);
267  }
268 
269  int getIorOpcode(const llvm::EVT& vt) const {
270  return plugin_->getIorOpcode(vt);
271  }
272 
273  void setStackAlignment(unsigned align) {
274  stackAlignment_ = align;
275  }
276 
277  unsigned stackAlignment() const {
278  if (stackAlignment_ == 0) {
279  std::cerr << "ZERO STACK ALIGN\n";
280  abort();
281  }
282  assert(stackAlignment_ > 0);
283  return stackAlignment_;
284  }
285 
286  bool has8bitLoads() const {
287  return plugin_->has8bitLoads();
288  }
289 
290  bool has16bitLoads() const {
291  return plugin_->has16bitLoads();
292  }
293 
294  int bitness() const {
295  return plugin_->is64bit() ? 64 : 32;
296  }
297 
298  const std::set<
299  std::pair<unsigned,
300  llvm::MVT::SimpleValueType> >* missingOperations();
301 
302  const std::set<
303  std::pair<unsigned,
304  llvm::MVT::SimpleValueType> >* promotedOperations();
305 
306  const std::set<
307  std::pair<unsigned,
308  llvm::MVT::SimpleValueType> >* customLegalizedOperations();
309 
310  int64_t smallestImmValue() const {
311  assert(ttaMach_ && "setTargetMachinePlugin() was not called");
312  return smallestImm_;
313  }
314  uint64_t largestImmValue() const {
315  assert(ttaMach_ && "setTargetMachinePlugin() was not called");
316  return largestImm_;
317  }
318  bool canEncodeAsMOVI(const llvm::MVT& vt, int64_t val) const;
319  bool canEncodeAsMOVF(const llvm::APFloat& fp) const;
320 
321  bool canMaterializeConstant(const ConstantInt& ci) const {
322  return plugin_->canMaterializeConstant(ci);
323  }
324 
325  int getLoadOpcode(int asid, int align, const llvm::EVT& vt) const;
326 
327  private:
328  /* more or less llvm naming convention to make it easier to track llvm changes */
329 
332  /// llvm::ISD opcode list of operations that have to be expanded.
333  std::set<std::pair<unsigned, llvm::MVT::SimpleValueType> > missingOps_;
334  std::set<std::pair<unsigned, llvm::MVT::SimpleValueType> > promotedOps_;
335  std::set<std::pair<unsigned, llvm::MVT::SimpleValueType> > customLegalizedOps_;
336 
338 
339  int64_t smallestImm_ = std::numeric_limits<int64_t>::max();
340  uint64_t largestImm_ = std::numeric_limits<int64_t>::min();
341  int SupportedFPImmWidth_ = std::numeric_limits<int>::min();
342  // The stack alignment. Note: this should be overridden per
343  // generated Module if the Module requires a larger one.
344  unsigned stackAlignment_;
345  };
346 }
347 
348 #endif
llvm::TCETargetMachinePlugin::registerIndex
virtual unsigned registerIndex(unsigned dwarfRegNum)=0
Returns name of the physical register index corresponding to a generated register ID.
llvm::TCETargetMachine::getMinuOpcode
int getMinuOpcode(llvm::SDNode *n)
Definition: TCETargetMachine.hh:249
llvm::TCETargetMachine::rfName
std::string rfName(unsigned dwarfRegNum) const
Definition: TCETargetMachine.hh:204
llvm::TCEPassConfig
Definition: TCETargetMachine.hh:81
llvm::TCETargetMachine::canEncodeAsMOVF
bool canEncodeAsMOVF(const llvm::APFloat &fp) const
Definition: TCETargetMachine.cc:382
llvm::TCETargetMachinePlugin::getMaxuOpcode
virtual int getMaxuOpcode(llvm::SDNode *n) const =0
llvm
Definition: InlineAsmParser.hh:49
Options
Definition: Options.hh:51
LLVMInitializeTCETarget
void LLVMInitializeTCETarget()
Definition: TCETargetMachine.cc:117
llvm::TCETargetMachine::customLegalizedOperations
const std::set< std::pair< unsigned, llvm::MVT::SimpleValueType > > * customLegalizedOperations()
Definition: TCETargetMachine.cc:340
llvm::TCETargetMachine::llvmRegisterId
unsigned llvmRegisterId(const TCEString &ttaRegister)
Definition: TCETargetMachine.hh:221
llvm::TCETargetMachine::getShlOpcode
int getShlOpcode(const llvm::EVT &vt) const
Definition: TCETargetMachine.hh:265
llvm::TCETargetMachine::getMaxOpcode
int getMaxOpcode(llvm::SDNode *n)
Definition: TCETargetMachine.hh:253
llvm::TCETargetMachine::getInstrInfo
virtual const TargetInstrInfo * getInstrInfo() const
Definition: TCETargetMachine.hh:154
llvm::TCEPassConfig::addInstSelector
virtual bool addInstSelector()
Definition: TCETargetMachine.cc:248
TCETargetMachinePlugin.hh
llvm::TCEPassConfig::plugin_
TCETargetMachinePlugin * plugin_
Definition: TCETargetMachine.hh:98
llvm::TCETargetMachinePlugin::getMinuOpcode
virtual int getMinuOpcode(llvm::SDNode *n) const =0
llvm::TCETargetMachinePlugin::has8bitLoads
virtual bool has8bitLoads() const =0
llvm::TCETargetMachine::canMaterializeConstant
bool canMaterializeConstant(const ConstantInt &ci) const
Definition: TCETargetMachine.hh:321
llvm::TCETargetMachinePlugin::has16bitLoads
virtual bool has16bitLoads() const =0
PluginTools
Definition: PluginTools.hh:53
llvm::TCETargetMachinePlugin::getFrameLowering
virtual const TargetFrameLowering * getFrameLowering() const =0
llvm::TCETargetMachine::dataASName
std::string dataASName()
Definition: TCETargetMachine.hh:227
llvm::TCESubtarget
Definition: TCESubtarget.hh:56
llvm::TCETargetMachine::validStackAccessOperation
bool validStackAccessOperation(const std::string &opName) const
Definition: TCETargetMachine.hh:196
llvm::TCETargetMachinePlugin::getMinOpcode
virtual int getMinOpcode(llvm::SDNode *n) const =0
llvm::TCETargetMachine::emulationModule_
Module * emulationModule_
Definition: TCETargetMachine.hh:126
llvm::TCETargetMachinePlugin::validStackAccessOperation
virtual bool validStackAccessOperation(const std::string &opName) const =0
Returns true if OSAL operation is valid for stack accesses.
llvm::TCETargetMachinePlugin::getIorOpcode
virtual int getIorOpcode(const llvm::EVT &vt) const =0
llvm::TCEBaseTargetMachine::setTTAMach
virtual void setTTAMach(const TTAMachine::Machine *mach)
Definition: TCEStubTargetMachine.hh:94
llvm::TCETargetMachinePlugin::getMaxOpcode
virtual int getMaxOpcode(llvm::SDNode *n) const =0
llvm::TCETargetMachine::spDRegNum
unsigned spDRegNum() const
Definition: TCETargetMachine.hh:237
llvm::TCETargetMachinePlugin::getTargetTransformInfo
virtual TargetTransformInfo getTargetTransformInfo(const Function &F) const =0
llvm::TCETargetMachine::getDataLayout
virtual const DataLayout * getDataLayout() const
Definition: TCETargetMachine.hh:162
llvm::TCETargetMachine::getRegisterInfo
virtual const TargetRegisterInfo * getRegisterInfo() const
Definition: TCETargetMachine.hh:158
llvm::TCETargetMachinePlugin::getSubtarget
virtual const TargetSubtargetInfo * getSubtarget() const =0
llvm::TCETargetMachine::raPortDRegNum
unsigned raPortDRegNum() const
Definition: TCETargetMachine.hh:231
llvm::TCETargetMachine::setTargetMachinePlugin
virtual void setTargetMachinePlugin(TCETargetMachinePlugin &plugin, TTAMachine::Machine &target)
Definition: TCETargetMachine.cc:167
llvm::TCETargetMachinePlugin::getInstrInfo
virtual const TargetInstrInfo * getInstrInfo() const =0
llvm::TCETargetMachine::getMaxuOpcode
int getMaxuOpcode(llvm::SDNode *n)
Definition: TCETargetMachine.hh:257
llvm::TCETargetMachine::has8bitLoads
bool has8bitLoads() const
Definition: TCETargetMachine.hh:286
llvm::TCETargetMachinePlugin::getTargetLowering
virtual TargetLowering * getTargetLowering() const =0
llvm::TCETargetMachine::setStackAlignment
void setStackAlignment(unsigned align)
Definition: TCETargetMachine.hh:273
llvm::TCETargetMachine::hasOperation
bool hasOperation(TCEString operationName) const
Definition: TCETargetMachine.hh:200
llvm::TCETargetMachine::setTTAMach
virtual void setTTAMach(const TTAMachine::Machine *mach) override
Definition: TCETargetMachine.hh:131
assert
#define assert(condition)
Definition: Application.hh:86
llvm::TCETargetMachine::customLegalizedOps_
std::set< std::pair< unsigned, llvm::MVT::SimpleValueType > > customLegalizedOps_
Definition: TCETargetMachine.hh:335
llvm::TCETargetMachinePlugin::spDRegNum
virtual unsigned spDRegNum()=0
Returns ID number of the stack pointer register.
llvm::TCETargetMachinePlugin::raPortDRegNum
virtual unsigned raPortDRegNum()=0
Returns ID number of the return address register.
llvm::TCETargetMachine::TCETargetMachine
TCETargetMachine(const Target &T, const Triple &TTriple, 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: TCETargetMachine.cc:144
llvm::TCETargetMachinePlugin::is64bit
virtual bool is64bit() const =0
llvm::TCETargetMachine::registerName
std::string registerName(unsigned dwarfRegNum) const
Definition: TCETargetMachine.hh:216
llvm::TCETargetMachine::getSubtargetImpl
virtual const TargetSubtargetInfo * getSubtargetImpl(const Function &) const override
Definition: TCETargetMachine.hh:150
llvm::TCETargetMachine::stackAlignment_
unsigned stackAlignment_
Definition: TCETargetMachine.hh:344
llvm::TCETargetMachinePlugin::opcode
virtual unsigned opcode(TCEString operationName) const =0
Returns the opcode for the given osal operation, undefined if not found.
llvm::TCETargetMachine::missingOperations
const std::set< std::pair< unsigned, llvm::MVT::SimpleValueType > > * missingOperations()
Definition: TCETargetMachine.cc:319
llvm::TCETargetMachine::loadPlugin
void loadPlugin()
llvm::TCETargetMachine::getLoadOpcode
int getLoadOpcode(int asid, int align, const llvm::EVT &vt) const
Definition: TCETargetMachine.cc:456
llvm::TCETargetMachine::pluginTool_
PluginTools * pluginTool_
Definition: TCETargetMachine.hh:331
llvm::TCETargetMachine::plugin_
TCETargetMachinePlugin * plugin_
Definition: TCETargetMachine.hh:330
llvm::TCETargetMachine::missingOps_
std::set< std::pair< unsigned, llvm::MVT::SimpleValueType > > missingOps_
llvm::ISD opcode list of operations that have to be expanded.
Definition: TCETargetMachine.hh:333
llvm::TCETargetMachinePlugin::getAddOpcode
virtual int getAddOpcode(const llvm::EVT &vt) const =0
llvm::TCETargetMachine::createPassConfig
virtual TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Definition: TCETargetMachine.cc:345
llvm::TCETargetMachine::~TCETargetMachine
virtual ~TCETargetMachine()
Definition: TCETargetMachine.cc:159
llvm::TCEPassConfig::TCEPassConfig
TCEPassConfig(LLVMTargetMachine *tm, PassManagerBase &pm, TCETargetMachinePlugin *plugin)
Definition: TCETargetMachine.hh:83
llvm::TCETargetMachine::getSubtargetImpl
virtual const TCESubtarget * getSubtargetImpl() const
Definition: TCETargetMachine.hh:144
llvm::TCETargetMachinePlugin::rfName
virtual std::string rfName(unsigned dwarfRegNum)=0
Returns name of the physical register file corresponding to a generated register ID.
llvm::TCETargetMachinePlugin::hasOperation
virtual bool hasOperation(TCEString operationName) const =0
Returns true in case the target supports the given osal operation.
llvm::TCEPassConfig::addPreRegAlloc
virtual void addPreRegAlloc()
Definition: TCETargetMachine.cc:261
llvm::TCEPassConfig::addPreISel
virtual bool addPreISel()
Definition: TCETargetMachine.cc:266
llvm::TCETargetMachine::getTargetLowering
virtual TargetLowering * getTargetLowering() const
Definition: TCETargetMachine.hh:169
llvm::TCETargetMachine::smallestImm_
int64_t smallestImm_
Definition: TCETargetMachine.hh:339
llvm::TCETargetMachinePlugin
Definition: TCETargetMachinePlugin.hh:109
llvm::TCETargetMachinePlugin::getDataLayout
virtual const DataLayout * getDataLayout() const
Definition: TCETargetMachinePlugin.hh:223
IGNORE_COMPILER_WARNING
#define IGNORE_COMPILER_WARNING(X)
Definition: CompilerWarnings.hh:51
llvm::TCEBaseTargetMachine
Definition: TCEStubTargetMachine.hh:82
llvm::TCETargetMachine::calculateSupportedImmediates
void calculateSupportedImmediates()
Definition: TCETargetMachine.cc:389
llvm::TCETargetMachine::promotedOps_
std::set< std::pair< unsigned, llvm::MVT::SimpleValueType > > promotedOps_
Definition: TCETargetMachine.hh:334
llvm::TCETargetMachinePlugin::canMaterializeConstant
virtual bool canMaterializeConstant(const ConstantInt &ci) const =0
llvm::TCETargetMachine::canEncodeAsMOVI
bool canEncodeAsMOVI(const llvm::MVT &vt, int64_t val) const
Definition: TCETargetMachine.cc:359
llvm::TCETargetMachinePlugin::getShlOpcode
virtual int getShlOpcode(const llvm::EVT &vt) const =0
TCEStubTargetMachine.hh
llvm::TCETargetMachine::bitness
int bitness() const
Definition: TCETargetMachine.hh:294
llvm::TCEBaseTargetMachine::ttaMach_
const TTAMachine::Machine * ttaMach_
Definition: TCEStubTargetMachine.hh:92
TCEString
Definition: TCEString.hh:53
llvm::TCETargetMachine::registerIndex
unsigned registerIndex(unsigned dwarfRegNum) const
Definition: TCETargetMachine.hh:208
llvm::TCETargetMachine::createMachine
TTAMachine::Machine * createMachine()
Definition: TCETargetMachine.cc:305
llvm::TCETargetMachine::getAddOpcode
int getAddOpcode(const llvm::EVT &vt) const
Definition: TCETargetMachine.hh:261
POP_COMPILER_DIAGS
#define POP_COMPILER_DIAGS
Definition: CompilerWarnings.hh:68
llvm::TCETargetMachine::ttaMachine
virtual const TTAMachine::Machine & ttaMachine() const
Definition: TCETargetMachine.hh:137
llvm::TCEPassConfig::addPreSched2
virtual void addPreSched2()
Definition: TCETargetMachine.cc:452
llvm::TCETargetMachine
Definition: TCETargetMachine.hh:106
llvm::TCETargetMachine::stackAlignment
unsigned stackAlignment() const
Definition: TCETargetMachine.hh:277
llvm::TCETargetMachine::smallestImmValue
int64_t smallestImmValue() const
Definition: TCETargetMachine.hh:310
llvm::TCETargetMachine::opcode
unsigned opcode(TCEString operationName) const
Definition: TCETargetMachine.hh:241
TTAMachine
Definition: Assembler.hh:48
llvm::TCETargetMachine::promotedOperations
const std::set< std::pair< unsigned, llvm::MVT::SimpleValueType > > * promotedOperations()
Definition: TCETargetMachine.cc:331
llvm::TCETargetMachine::operationName
std::string operationName(unsigned opc) const
Definition: TCETargetMachine.hh:188
llvm::TCETargetMachinePlugin::operationName
virtual std::string operationName(unsigned opc) const =0
Returns operation name corresponding to llvm target opcode.
llvm::TCETargetMachine::setEmulationModule
virtual void setEmulationModule(Module *mod)
Definition: TCETargetMachine.hh:127
llvm::TCETargetMachine::has16bitLoads
bool has16bitLoads() const
Definition: TCETargetMachine.hh:290
llvm::TCETargetMachine::getMinOpcode
int getMinOpcode(llvm::SDNode *n)
Definition: TCETargetMachine.hh:245
llvm::TCETargetMachine::SupportedFPImmWidth_
int SupportedFPImmWidth_
Definition: TCETargetMachine.hh:341
llvm::TCETargetMachine::getIorOpcode
int getIorOpcode(const llvm::EVT &vt) const
Definition: TCETargetMachine.hh:269
llvm::TCETargetMachine::getTargetTransformInfo
TargetTransformInfo getTargetTransformInfo(const Function &F) const override
Definition: TCETargetMachine.hh:183
llvm::TCETargetMachinePlugin::dataASName
virtual std::string dataASName()=0
Returns name of the data address space.
CompilerWarnings.hh
llvm::TCETargetMachinePlugin::getRegisterInfo
virtual const TargetRegisterInfo * getRegisterInfo() const =0
llvm::TCETargetMachine::largestImmValue
uint64_t largestImmValue() const
Definition: TCETargetMachine.hh:314
TTAMachine::Machine
Definition: Machine.hh:73
llvm::TCETargetMachine::largestImm_
uint64_t largestImm_
Definition: TCETargetMachine.hh:340
llvm::TCETargetMachine::targetPlugin
virtual TCETargetMachinePlugin & targetPlugin() const
Definition: TCETargetMachine.hh:120
llvm::TCETargetMachine::getFrameLowering
virtual const TargetFrameLowering * getFrameLowering() const
Definition: TCETargetMachine.hh:166
llvm::TCETargetMachinePlugin::llvmRegisterId
virtual unsigned llvmRegisterId(const TCEString &ttaRegister)=0