mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-15 14:28:25 +00:00
Have SPU backend use the external TCE scheduler, if the library is loaded as a
module. Patch by Pekka Jääskeläinen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e004d941ec
commit
67a9b1fcc7
@ -17,6 +17,7 @@
|
||||
#include "llvm/CodeGen/RegAllocRegistry.h"
|
||||
#include "llvm/CodeGen/SchedulerRegistry.h"
|
||||
#include "llvm/Target/TargetRegistry.h"
|
||||
#include "llvm/Support/DynamicLibrary.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
@ -59,6 +60,16 @@ bool SPUTargetMachine::addInstSelector(PassManagerBase &PM,
|
||||
bool SPUTargetMachine::
|
||||
addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel)
|
||||
{
|
||||
|
||||
// load the TCE instruction scheduler, if available via
|
||||
// loaded plugins
|
||||
typedef llvm::FunctionPass* (*BuilderFunc)(const char*);
|
||||
BuilderFunc schedulerCreator =
|
||||
(BuilderFunc)llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(
|
||||
"createTCESchedulerPass");
|
||||
if (schedulerCreator != NULL)
|
||||
PM.add(schedulerCreator("cellspu"));
|
||||
|
||||
//align instructions with nops/lnops for dual issue
|
||||
PM.add(createSPUNopFillerPass(*this));
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user