From 8eaf41de8adb764b16712485a385afab8b83f1ca Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 20 Nov 2008 19:58:35 +0000 Subject: [PATCH] Treat mid-block labels the same as terminators when building the MachineInstr scheduling DAG, meaning they implicitly depend on all preceding defs. This fixes Benchmarks/Shootout-C++/except and Regression/C++/EH/simple_rethrow in -relocation-model=pic -disable-post-RA-scheduler=false mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59747 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/ScheduleDAGInstrs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index 72008c9c95f..b6bc44e849e 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -97,7 +97,7 @@ void ScheduleDAGInstrs::BuildSchedUnits() { } if (Terminator && SU->Succs.empty()) Terminator->addPred(SU, /*isCtrl=*/false, /*isSpecial=*/false); - if (MI->getDesc().isTerminator()) + if (MI->getDesc().isTerminator() || MI->isLabel()) Terminator = SU; } }