[PATCH] D35851: [Dominators] Include infinite loops in PostDominatorTree

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 18:14:10 PDT 2017


kuhar added inline comments.


================
Comment at: lib/Transforms/Scalar/ADCE.cpp:265
+    if (isa<ReturnInst>(Info.Terminator)) {
+      DEBUG(dbgs() << "post-dom root child is not a return: " << BB->getName()
                    << '\n';);
----------------
kuhar wrote:
> dberlin wrote:
> > kuhar wrote:
> > > @dberlin: shouldn't this be:
> > > > post-dom root child *is* a return
> > > 
> > > ?
> > > 
> > > 
> > yes, it should be.
> Followup: why do we only check for ReturnInst here? I mean, shouldn't we treat UnreachableInst the same way and not mark it as live? 
I checked and continuing also on UnreachableInst doesn't seem to cause any regressions.


https://reviews.llvm.org/D35851





More information about the llvm-commits mailing list