From 957e1674e797c8880114fb27a3aa1c32f9967329 Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Sat, 8 Apr 2006 19:46:55 +0000 Subject: [PATCH] Disable switch lowering for targets based on the selection dag isel, letting the code generator handle them directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27539 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Alpha/AlphaTargetMachine.cpp | 6 ------ lib/Target/IA64/IA64TargetMachine.cpp | 3 --- lib/Target/PowerPC/PPCTargetMachine.cpp | 6 ------ lib/Target/Sparc/SparcTargetMachine.cpp | 3 --- lib/Target/X86/X86TargetMachine.cpp | 10 ---------- 5 files changed, 28 deletions(-) diff --git a/lib/Target/Alpha/AlphaTargetMachine.cpp b/lib/Target/Alpha/AlphaTargetMachine.cpp index 2daaab2d6dc..709669ffd72 100644 --- a/lib/Target/Alpha/AlphaTargetMachine.cpp +++ b/lib/Target/Alpha/AlphaTargetMachine.cpp @@ -81,9 +81,6 @@ bool AlphaTargetMachine::addPassesToEmitFile(PassManager &PM, // FIXME: Implement the invoke/unwind instructions! PM.add(createLowerInvokePass()); - // FIXME: Implement the switch instruction in the instruction selector! - PM.add(createLowerSwitchPass()); - // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); @@ -119,9 +116,6 @@ void AlphaJITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // FIXME: Implement the invoke/unwind instructions! PM.add(createLowerInvokePass()); - // FIXME: Implement the switch instruction in the instruction selector! - PM.add(createLowerSwitchPass()); - // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); diff --git a/lib/Target/IA64/IA64TargetMachine.cpp b/lib/Target/IA64/IA64TargetMachine.cpp index 4c7af414791..a03bda7e091 100644 --- a/lib/Target/IA64/IA64TargetMachine.cpp +++ b/lib/Target/IA64/IA64TargetMachine.cpp @@ -96,9 +96,6 @@ bool IA64TargetMachine::addPassesToEmitFile(PassManager &PM, PM.add(createLowerInvokePass(704, 16)); // on ia64 linux, jmpbufs are 704 // bytes and must be 16byte aligned - // FIXME: Implement the switch instruction in the instruction selector! - PM.add(createLowerSwitchPass()); - // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 60829560a32..94136a45696 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -93,9 +93,6 @@ bool PPCTargetMachine::addPassesToEmitFile(PassManager &PM, // Clean up after other passes, e.g. merging critical edges. if (!Fast) PM.add(createCFGSimplificationPass()); - // FIXME: Implement the switch instruction in the instruction selector! - PM.add(createLowerSwitchPass()); - // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); @@ -147,9 +144,6 @@ void PPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // Clean up after other passes, e.g. merging critical edges. PM.add(createCFGSimplificationPass()); - // FIXME: Implement the switch instruction in the instruction selector! - PM.add(createLowerSwitchPass()); - // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); diff --git a/lib/Target/Sparc/SparcTargetMachine.cpp b/lib/Target/Sparc/SparcTargetMachine.cpp index 565ccb9bc14..2b56be2cb9a 100644 --- a/lib/Target/Sparc/SparcTargetMachine.cpp +++ b/lib/Target/Sparc/SparcTargetMachine.cpp @@ -72,9 +72,6 @@ bool SparcTargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, // FIXME: implement the invoke/unwind instructions! PM.add(createLowerInvokePass()); - // FIXME: implement the switch instruction in the instruction selector. - PM.add(createLowerSwitchPass()); - // Print LLVM code input to instruction selector: if (PrintMachineCode) PM.add(new PrintFunctionPass()); diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 44877d9b4d1..b9dea3bcf30 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -36,8 +36,6 @@ namespace { cl::opt DisableOutput("disable-x86-llc-output", cl::Hidden, cl::desc("Disable the X86 asm printer, for use " "when profiling the code generator.")); - cl::opt DisableLowerSwitch("disable-lower-switch", cl::Hidden, - cl::desc("Disable the LowerSwitch pass")); // Register the target. RegisterTarget X("x86", " IA-32 (Pentium and above)"); } @@ -100,10 +98,6 @@ bool X86TargetMachine::addPassesToEmitFile(PassManager &PM, std::ostream &Out, // FIXME: Implement the invoke/unwind instructions! PM.add(createLowerInvokePass()); - // FIXME: Implement the switch instruction in the instruction selector! - if (!DisableLowerSwitch) - PM.add(createLowerSwitchPass()); - // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); @@ -169,10 +163,6 @@ void X86JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // FIXME: Implement the invoke/unwind instructions! PM.add(createLowerInvokePass()); - // FIXME: Implement the switch instruction in the instruction selector! - if (!DisableLowerSwitch) - PM.add(createLowerSwitchPass()); - // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass());