[PATCH] D35142: WIP! [CFG] Create a new removeUnreachable utility that updates the dom in place

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 9 09:43:05 PDT 2017


davide added inline comments.


================
Comment at: lib/Transforms/Utils/Local.cpp:1711
+  for (BasicBlock *BB : RPOT)
+    Live.insert(BB);
+
----------------
dberlin wrote:
> Note that if the dom tree is up to date, it would suffice to do:
> 
> for (auto *BB : nodes(DT))
>   Live.insert(BB->getBlock())
> 
> or whatever
> 
> But IIRC, in your case, the dominator tree is *not* up to date, right?
> 
> 
I guess we could introduce this invariant, if the caller passes a Dom that's always up-to-date? (otherwise, realistically, there's little point in trying to update an already stale dominator).


https://reviews.llvm.org/D35142





More information about the llvm-commits mailing list