[PATCH] D77508: [RDA] Only store most recent reaching def from predecessors (NFCI)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 09:46:01 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe8b83f7ddc5d: [RDA] Only store most recent reaching def from predecessors (NFCI) (authored by nikic).
Herald added a subscriber: hiraditya.
Changed prior to commit:
https://reviews.llvm.org/D77508?vs=255180&id=255384#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77508/new/
https://reviews.llvm.org/D77508
Files:
llvm/lib/CodeGen/ReachingDefAnalysis.cpp
Index: llvm/lib/CodeGen/ReachingDefAnalysis.cpp
===================================================================
--- llvm/lib/CodeGen/ReachingDefAnalysis.cpp
+++ llvm/lib/CodeGen/ReachingDefAnalysis.cpp
@@ -83,14 +83,16 @@
if (Incoming.empty())
continue;
- for (unsigned Unit = 0; Unit != NumRegUnits; ++Unit) {
- // Use the most recent predecessor def for each register.
+ // Find the most recent reaching definition from a predecessor.
+ for (unsigned Unit = 0; Unit != NumRegUnits; ++Unit)
LiveRegs[Unit] = std::max(LiveRegs[Unit], Incoming[Unit]);
- if ((LiveRegs[Unit] != ReachingDefDefaultVal))
- MBBReachingDefs[MBBNumber][Unit].push_back(LiveRegs[Unit]);
- }
}
+ // Insert the most recent reaching definition we found.
+ for (unsigned Unit = 0; Unit != NumRegUnits; ++Unit)
+ if (LiveRegs[Unit] != ReachingDefDefaultVal)
+ MBBReachingDefs[MBBNumber][Unit].push_back(LiveRegs[Unit]);
+
LLVM_DEBUG(dbgs() << printMBBReference(*MBB)
<< (!TraversedMBB.IsDone ? ": incomplete\n"
: ": all preds known\n"));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77508.255384.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200406/77ce98e2/attachment-0001.bin>
More information about the llvm-commits
mailing list