From: Andrew Trick Date: Fri, 16 Mar 2012 05:04:25 +0000 (+0000) Subject: misched: add DAG edges from vreg defs to ExitSU. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d3a7486ef351697450cfe87b6cce82a3eb906874;p=oota-llvm.git misched: add DAG edges from vreg defs to ExitSU. These edges are not really necessary, but it is consistent with the way we currently create physreg edges. Scheduler heuristics that expect a DAG edge to the block terminator could benefit from this change. Although in the future I hope we have a better mechanism for modeling latency across scheduling regions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152895 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index 54828e28d1d..1c455b95ab0 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -201,8 +201,10 @@ void ScheduleDAGInstrs::addSchedBarrierDeps() { if (TRI->isPhysicalRegister(Reg)) Uses[Reg].push_back(&ExitSU); - else + else { assert(!IsPostRA && "Virtual register encountered after regalloc."); + addVRegUseDeps(&ExitSU, i); + } } } else { // For others, e.g. fallthrough, conditional branch, assume the exit