[llvm] [DomTree] Fix root attachment in runDFS() (PR #73148)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 24 09:27:59 PST 2023


================
@@ -552,7 +553,7 @@ struct SemiNCAInfo {
 
     addVirtualRoot();
     unsigned Num = 1;
-    for (const NodePtr Root : DT.Roots) Num = runDFS(Root, Num, DC, 0);
+    for (const NodePtr Root : DT.Roots) Num = runDFS(Root, Num, DC, 1);
----------------
kuhar wrote:

Maybe we can pass `Num` here to make it clear that we consider is to be the last one used *and* the node for attachment?

https://github.com/llvm/llvm-project/pull/73148


More information about the llvm-commits mailing list