[PATCH] D56079: Fix invalid test in Guard Widening
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 03:04:43 PST 2019
mkazantsev added a comment.
Sorry, I do not understand your objection's meaning. The test's comment states that
; With guards in loops, we're okay hoisting out the guard into the
; containing loop.
There is no containing loop in this test. So the claims of this test are wrong to start with.
In `GenericDomTreeConstruction.h`, there is a comment:
// Find the furthest away we can get by following successors, then
// follow them in reverse. This gives us some reasonable answer about
// the post-dom tree inside any infinite loop. In particular, it
// guarantees we get to the farthest away point along *some*
// path. This also matches the GCC's behavior.
// If we really wanted a totally complete picture of dominance inside
// this infinite loop, we could do it with SCC-like algorithms to find
// the lowest and highest points in the infinite loop. In theory, it
// would be nice to give the canonical backedge for the loop, but it's
// expensive and does not always lead to a minimal set of roots.
So when we are trying to construct PDT for infinite loop, we choose *some* block
as its non-trivial root. No guarantee is given that this block is going to be block `outer`.
I don't remember what was this situation, but there was a case where `inner` was chosen
a root, and therefore no post-dominance between them was inserted.
Could you please elaborate what exactly are you disagree with?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56079/new/
https://reviews.llvm.org/D56079
More information about the llvm-commits
mailing list