setOperationAction(ISD::BIT_CONVERT, MVT::f32, Expand);
setOperationAction(ISD::BIT_CONVERT, MVT::i32, Expand);
- if (X86DAGIsel) {
+ if (!X86PatIsel) {
setOperationAction(ISD::BRCOND , MVT::Other, Custom);
}
setOperationAction(ISD::BRCONDTWOWAY , MVT::Other, Expand);
setOperationAction(ISD::CTLZ , MVT::i32 , Expand);
setOperationAction(ISD::READCYCLECOUNTER , MVT::i64 , Custom);
- if (!X86DAGIsel) {
+ if (X86PatIsel) {
setOperationAction(ISD::BSWAP , MVT::i32 , Expand);
setOperationAction(ISD::ROTL , MVT::i8 , Expand);
setOperationAction(ISD::ROTR , MVT::i8 , Expand);
// These should be promoted to a larger select which is supported.
setOperationAction(ISD::SELECT , MVT::i1 , Promote);
setOperationAction(ISD::SELECT , MVT::i8 , Promote);
- if (X86DAGIsel) {
+ if (!X86PatIsel) {
// X86 wants to expand cmov itself.
setOperationAction(ISD::SELECT , MVT::i16 , Custom);
setOperationAction(ISD::SELECT , MVT::i32 , Custom);
// Set up the FP register classes.
addRegisterClass(MVT::f64, X86::RFPRegisterClass);
- if (X86DAGIsel) {
+ if (!X86PatIsel) {
setOperationAction(ISD::SINT_TO_FP, MVT::i16, Custom);
setOperationAction(ISD::SINT_TO_FP, MVT::i32, Custom);
}
break;
}
- if (X86DAGIsel) {
+ if (!X86PatIsel) {
std::vector<MVT::ValueType> NodeTys;
NodeTys.push_back(MVT::Other); // Returns a chain
NodeTys.push_back(MVT::Flag); // Returns a flag for retval copy to use.
break;
}
- if (X86DAGIsel) {
+ if (!X86PatIsel) {
// Build a sequence of copy-to-reg nodes chained together with token chain
// and flag operands which copy the outgoing args into registers.
SDOperand InFlag;
#include <iostream>
using namespace llvm;
-bool llvm::X86DAGIsel = false;
+bool llvm::X86PatIsel = true;
/// X86TargetMachineModule - Note that this is used on hosts that cannot link
/// in a library unless there are references into the library. In particular,
cl::opt<bool> DisableOutput("disable-x86-llc-output", cl::Hidden,
cl::desc("Disable the X86 asm printer, for use "
"when profiling the code generator."));
- cl::opt<bool, true> EnableX86DAGDAG("enable-x86-dag-isel", cl::Hidden,
- cl::desc("Enable DAG-to-DAG isel for X86"),
- cl::location(X86DAGIsel),
+ cl::opt<bool, true> EnableX86PatISel("enable-x86-pattern-isel", cl::Hidden,
+ cl::desc("Enable the pattern based isel for X86"),
+ cl::location(X86PatIsel),
cl::init(false));
// Register the target.
PM.add(createUnreachableBlockEliminationPass());
// Install an instruction selector.
- if (X86DAGIsel)
- PM.add(createX86ISelDag(*this));
- else
+ if (X86PatIsel)
PM.add(createX86ISelPattern(*this));
+ else
+ PM.add(createX86ISelDag(*this));
// Print the instruction selected machine code...
if (PrintMachineCode)
PM.add(createUnreachableBlockEliminationPass());
// Install an instruction selector.
- if (X86DAGIsel)
- PM.add(createX86ISelDag(TM));
- else
+ if (X86PatIsel)
PM.add(createX86ISelPattern(TM));
+ else
+ PM.add(createX86ISelDag(TM));
// FIXME: Add SSA based peephole optimizer here.