From 2e2f3e26baadb013c211b263694aeda17101d8ed Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Fri, 10 Dec 2004 08:39:30 +0000 Subject: [PATCH] Move -lowerselect later in the chain; some select instructions were slipping through into the instruction selector, which can't deal with them yet. llvm-svn: 18758 --- llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp b/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp index 324fc5b1c95f..065dc2dfac5f 100644 --- a/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp +++ b/llvm/lib/Target/SparcV8/SparcV8TargetMachine.cpp @@ -65,9 +65,6 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM, // Replace malloc and free instructions with library calls. PM.add(createLowerAllocationsPass()); - // FIXME: implement the select instruction in the instruction selector. - PM.add(createLowerSelectPass()); - // FIXME: implement the switch instruction in the instruction selector. PM.add(createLowerSwitchPass()); @@ -79,6 +76,9 @@ bool SparcV8TargetMachine::addPassesToEmitAssembly(PassManager &PM, // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); + // FIXME: implement the select instruction in the instruction selector. + PM.add(createLowerSelectPass()); + PM.add(createSparcV8SimpleInstructionSelector(*this)); // Print machine instructions as they were initially generated. @@ -118,9 +118,6 @@ void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // Replace malloc and free instructions with library calls. PM.add(createLowerAllocationsPass()); - // FIXME: implement the select instruction in the instruction selector. - PM.add(createLowerSelectPass()); - // FIXME: implement the switch instruction in the instruction selector. PM.add(createLowerSwitchPass()); @@ -132,6 +129,9 @@ void SparcV8JITInfo::addPassesToJITCompile(FunctionPassManager &PM) { // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); + // FIXME: implement the select instruction in the instruction selector. + PM.add(createLowerSelectPass()); + PM.add(createSparcV8SimpleInstructionSelector(TM)); // Print machine instructions as they were initially generated.