[PATCH] D123231: [StructurizeCFG] Improve basic block ordering
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 11 02:03:06 PDT 2022
sameerds added a comment.
Needs more reviewers ... I would suggest authors of previous non-trivial changes to the structurizer, and their reviewers.
================
Comment at: llvm/lib/Transforms/Scalar/StructurizeCFG.cpp:449-451
+ if (Pred && Visited.count(Pred) && Succ && !Visited.count(Succ)) {
+ if (MoveTo.count(Pred))
+ Moved.reset(MoveTo[Pred]);
----------------
Lots of questions because the structurizer itself is so under-specified:
# Seems like a block can be moved multiple times until it "floats" to its final place. Is this movement monotonic?
# Can you please add a comment explaining the criterion in terms of the "Visited" state of the Structurizer itself?
# Are there invariants about MoveTo and Moved that we could assert in each of the two for loops?
# What happens when MoveTo[X] == MoveTo[Y]?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123231/new/
https://reviews.llvm.org/D123231
More information about the llvm-commits
mailing list