mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 00:20:25 +00:00
Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include <climits>
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
using namespace llvm;
|
||||
|
||||
STATISTIC(NumBacktracks, "Number of times scheduler backtracked");
|
||||
@@ -1047,6 +1046,7 @@ static unsigned closestSucc(const SUnit *SU) {
|
||||
unsigned MaxHeight = 0;
|
||||
for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
|
||||
I != E; ++I) {
|
||||
if (I->isCtrl()) continue; // ignore chain succs
|
||||
unsigned Height = I->getSUnit()->getHeight();
|
||||
// If there are bunch of CopyToRegs stacked up, they should be considered
|
||||
// to be at the same position.
|
||||
|
||||
Reference in New Issue
Block a user