[PATCH] D30890: Post-dom fix - connect virtual edges to last reverse-reachable BB
Tobias Grosser via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 06:51:22 PDT 2017
grosser added a comment.
Here an example that illustrates the difference between the original patch Daniel proposed in https://reviews.llvm.org/D29705 and the slightly modified one we prose her:
Daniel's patch
==============
Inorder PostDominator Tree:
[1] <<exit node>> {0,19}
[2] %"4" {1,4}
[3] %"3" {2,3}
[2] %"1" {5,8}
[3] %"0" {6,7}
[2] %"6" {9,18}
[3] %"12" {10,11}
[3] %"5" {12,15}
[4] %"2" {13,14}
[3] %"11" {16,17}
F3141733: infinite_loop_2-with-daniels-patch.png <https://reviews.llvm.org/F3141733>
This patch
==========
[1] <<exit node>> {0,19}
[2] %"4" {1,18}
[3] %"3" {2,17}
[4] %"1" {3,16}
[5] %"0" {4,5}
[5] %"6" {6,15}
[6] %"12" {7,8}
[6] %"5" {9,12}
[7] %"2" {10,11}
[6] %"11" {13,14}
F3141735: infinite_loop_2-with-patch.png <https://reviews.llvm.org/F3141735>
The main difference is that %1 still post-dominates %2 and all the other basic blocks in the reverse-unreachable region. This behavior only requires
https://reviews.llvm.org/D30890
More information about the llvm-commits
mailing list