forked from OSchip/llvm-project
add a beta option for turning on dag->dag isel
llvm-svn: 22837
This commit is contained in:
parent
43ff01e2e6
commit
c6aa80668e
|
@ -30,7 +30,10 @@
|
|||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
const std::string PPC32ID = "PowerPC/32bit";
|
||||
const char *PPC32ID = "PowerPC/32bit";
|
||||
|
||||
static cl::opt<bool> EnablePPCDAGDAG("enable-ppc-dag-isel", cl::Hidden,
|
||||
cl::desc("Enable DAG-to-DAG isel for PPC (beta)"));
|
||||
|
||||
// Register the targets
|
||||
RegisterTarget<PPC32TargetMachine>
|
||||
|
@ -81,8 +84,11 @@ bool PowerPCTargetMachine::addPassesToEmitFile(PassManager &PM,
|
|||
// Make sure that no unreachable blocks are instruction selected.
|
||||
PM.add(createUnreachableBlockEliminationPass());
|
||||
|
||||
// Default to pattern ISel
|
||||
if (PatternISelTriState == 0) {
|
||||
// Install an instruction selector.
|
||||
if (EnablePPCDAGDAG) {
|
||||
PM.add(createPPC32ISelDag(*this));
|
||||
|
||||
} else if (PatternISelTriState == 0) {
|
||||
PM.add(createLowerConstantExpressionsPass());
|
||||
PM.add(createPPC32ISelSimple(*this));
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue