[PATCH] D32740: [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch pass.

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 11:47:08 PDT 2017


davide requested changes to this revision.
davide added a comment.

The algorithm you have, I think, it's correct to start (although as pointed out by Sanjoy doesn't really compute the dominance frontier).
Have you considered computing the iterated dominance frontier every time instead? If there are technical difficulties (or it's just slower) I'd add a comment to the code explaining why we can't use it.



================
Comment at: lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:112
+  // dominator frontier to see if it additionally should move up the dominator
+  // tree. This lambda appends the dominator frontier for a node onte the worklist.
+  // FIXME: This uses a naive algorithm for computing the dominator frontier.
----------------
s/onte/on/ or am I wrong?


https://reviews.llvm.org/D32740





More information about the llvm-commits mailing list