Use a latency value of 0 for the artificial edges inserted by
authorDan Gohman <gohman@apple.com>
Tue, 6 Jan 2009 01:19:04 +0000 (01:19 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 6 Jan 2009 01:19:04 +0000 (01:19 +0000)
AddPseudoTwoAddrDeps. This lets the scheduling infrastructure
avoid recalculating node heights. In very large testcases this
was a major bottleneck. Thanks to Roman Levenstein for finding
this!

As a side effect, fold-pcmpeqd-0.ll is now scheduled better
and it no longer requires spilling on x86-32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61778 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
test/CodeGen/X86/fold-pcmpeqd-0.ll

index 436056c64456dc300fb7b8c400f5bb49784580b1..676a69bd633afc9cfa70760f9f8ed36b70926bdc 100644 (file)
@@ -1252,7 +1252,7 @@ void RegReductionPriorityQueue<SF>::AddPseudoTwoAddrDeps() {
             !scheduleDAG->IsReachable(SuccSU, SU)) {
           DOUT << "Adding a pseudo-two-addr edge from SU # " << SU->NodeNum
                << " to SU #" << SuccSU->NodeNum << "\n";
-          scheduleDAG->AddPred(SU, SDep(SuccSU, SDep::Order, /*Latency=*/1,
+          scheduleDAG->AddPred(SU, SDep(SuccSU, SDep::Order, /*Latency=*/0,
                                         /*Reg=*/0, /*isMustAlias=*/false,
                                         /*isArtificial=*/true));
         }
index a529f91598f4c93a14271215eee4a4818ed7766a..152c12215dcbca58c6b0e4d32790e03c27766afe 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin   | not grep pcmpeqd
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin   | grep pcmpeqd | count 1
 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | grep pcmpeqd | count 1
 
 ; This testcase shouldn't need to spill the -1 value,