summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-13 23:24:17 +0000
committerDan Gohman <gohman@apple.com>2008-11-13 23:24:17 +0000
commit072734ebd6d96f778dad2c6f86c2644e1f8fe987 (patch)
tree137e79bb6a7993b866070964661378d6e9225283 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
parent62efa23518f80f5723310cc11c88a8be04b4541c (diff)
downloadbcm5719-llvm-072734ebd6d96f778dad2c6f86c2644e1f8fe987.tar.gz
bcm5719-llvm-072734ebd6d96f778dad2c6f86c2644e1f8fe987.zip
Remove the FlaggedNodes member from SUnit. Instead of requiring each SUnit
to carry a SmallVector of flagged nodes, just calculate the flagged nodes dynamically when they are needed. The local-liveness change is due to a trivial scheduling change where the scheduler arbitrary decision differently. llvm-svn: 59273
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
index 8921545e1ab..14042ed602a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
@@ -205,9 +205,11 @@ void ScheduleDAGList::ListScheduleTopDown() {
// If this is a pseudo op, like copyfromreg, look to see if there is a
// real target node flagged to it. If so, use the target node.
- for (unsigned i = 0, e = CurSUnit->FlaggedNodes.size();
- !FoundNode->isMachineOpcode() && i != e; ++i)
- FoundNode = CurSUnit->FlaggedNodes[i];
+ while (!FoundNode->isMachineOpcode()) {
+ SDNode *N = FoundNode->getFlaggedNode();
+ if (!N) break;
+ FoundNode = N;
+ }
HazardRecognizer::HazardType HT = HazardRec->getHazardType(FoundNode);
if (HT == HazardRecognizer::NoHazard) {
OpenPOWER on IntegriCloud