OpenASIP  2.0
Public Member Functions | Public Attributes | List of all members
llvm::TCEPassConfig Class Reference

#include <TCETargetMachine.hh>

Inheritance diagram for llvm::TCEPassConfig:
Inheritance graph
Collaboration diagram for llvm::TCEPassConfig:
Collaboration graph

Public Member Functions

 TCEPassConfig (LLVMTargetMachine *tm, PassManagerBase &pm, TCETargetMachinePlugin *plugin)
 
virtual bool addPreISel ()
 
virtual bool addInstSelector ()
 
virtual void addPreRegAlloc ()
 
virtual void addPreSched2 ()
 

Public Attributes

TCETargetMachinePluginplugin_
 

Detailed Description

Definition at line 81 of file TCETargetMachine.hh.

Constructor & Destructor Documentation

◆ TCEPassConfig()

llvm::TCEPassConfig::TCEPassConfig ( LLVMTargetMachine *  tm,
PassManagerBase &  pm,
TCETargetMachinePlugin plugin 
)
inline

Definition at line 83 of file TCETargetMachine.hh.

86  :
87  TargetPassConfig(*tm, pm),
88 plugin_(plugin) {
89  assert(plugin_ != NULL);
90  }

References assert, and plugin_.

Member Function Documentation

◆ addInstSelector()

bool TCEPassConfig::addInstSelector ( )
virtual

Creates an instruction selector instance.

Definition at line 248 of file TCETargetMachine.cc.

249 {
250  addPass(plugin_->createISelPass(static_cast<TCETargetMachine*>(TM)));
251  return false;
252 }

References addPass, llvm::TCETargetMachinePlugin::createISelPass(), and plugin_.

Here is the call graph for this function:

◆ addPreISel()

bool TCEPassConfig::addPreISel ( )
virtual

Definition at line 266 of file TCETargetMachine.cc.

266  {
269  if (options != NULL && !options->disableHWLoops() &&
270  ((static_cast<TCETargetMachine*>(TM))->ttaMach_)
271  ->hasOperation("hwloop"))
272  addPass(createHardwareLoopsPass());
273 
274  // lower floating point stuff.. maybe could use plugin as param instead machine...
276  *((static_cast<TCETargetMachine*>(TM))->ttaMach_)));
277 
278  if ((static_cast<TCETargetMachine*>(TM))->emulationModule_ != NULL) {
280  *((static_cast<TCETargetMachine*>(TM))->emulationModule_)));
281  }
282 
283  CodeGenOpt::Level OptLevel = getOptLevel();
284 
285  // if llvm-tce opt level is -O2 or -O3
286  if (OptLevel != CodeGenOpt::None) {
287  // get some pass lists from llvm/Support/StandardPasses.h from
288  // createStandardLTOPasses function. (do not add memcpyopt or dce!)
289  addPass(createInternalizePass());
290  }
291 
292  // NOTE: This must be added before Machine function analysis pass..
293  // needed by POMBuilder to prevent writing debug data to data section
294  // might be good to disable when printing out machine function code...
295  // However, it need to comment out to support debug info
296 // PM.add(createStripSymbolsPass(/*bool OnlyDebugInfo=*/true));
297 
298  return false;
299 }

References addPass, Application::cmdLineOptions(), createLinkBitcodePass(), createLowerMissingInstructionsPass(), and options.

Here is the call graph for this function:

◆ addPreRegAlloc()

void TCEPassConfig::addPreRegAlloc ( )
virtual

Some extra passes needed by TCE

Parameters
pmFunction pass manager to add isel pass.
fastNot used.

Definition at line 261 of file TCETargetMachine.cc.

261  {
262 }

◆ addPreSched2()

void TCEPassConfig::addPreSched2 ( )
virtual

Definition at line 452 of file TCETargetMachine.cc.

452  {
453  addPass(&IfConverterID);
454 }

References addPass.

Member Data Documentation

◆ plugin_

TCETargetMachinePlugin* llvm::TCEPassConfig::plugin_

Definition at line 98 of file TCETargetMachine.hh.

Referenced by addInstSelector(), and TCEPassConfig().


The documentation for this class was generated from the following files:
createLowerMissingInstructionsPass
Pass * createLowerMissingInstructionsPass(const TTAMachine::Machine &mach)
Definition: LowerMissingInstructions.cc:147
llvm::TCEPassConfig::plugin_
TCETargetMachinePlugin * plugin_
Definition: TCETargetMachine.hh:98
assert
#define assert(condition)
Definition: Application.hh:86
addPass
#define addPass(P)
Application::cmdLineOptions
static CmdLineOptions * cmdLineOptions()
Definition: Application.cc:397
createLinkBitcodePass
Pass * createLinkBitcodePass(Module &inputCode)
Definition: LinkBitcode.cc:98
LLVMTCECmdLineOptions
Definition: LLVMTCECmdLineOptions.hh:48
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46
llvm::TCETargetMachine
Definition: TCETargetMachine.hh:106
llvm::TCETargetMachinePlugin::createISelPass
virtual FunctionPass * createISelPass(TCETargetMachine *tm)=0