From fab96f0b69da768bf837c8042e522d93701ccccf Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 2 Jul 2004 05:48:42 +0000 Subject: [PATCH] Fix all of those problems that the PPC backend has running 176.gcc :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14565 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCTargetMachine.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index 04117d3c059..035c31e7de4 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -55,6 +55,9 @@ bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM, PM.add(createLowerConstantExpressionsPass()); + // Make sure that no unreachable blocks are instruction selected. + PM.add(createUnreachableBlockEliminationPass()); + PM.add(createPPCSimpleInstructionSelector(*this)); if (PrintMachineCode) @@ -86,6 +89,9 @@ void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) { PM.add(createLowerConstantExpressionsPass()); + // Make sure that no unreachable blocks are instruction selected. + PM.add(createUnreachableBlockEliminationPass()); + PM.add(createPPCSimpleInstructionSelector(TM)); PM.add(createRegisterAllocator()); PM.add(createPrologEpilogCodeInserter());