[PATCH] D99205: Add jump-threading optimization for deterministic finite automata
Ehsan Amiri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 08:35:15 PDT 2021
amehsan added a comment.
A couple of comments/clarifications about irreducible CFG that came up in earlier comments: This pass does not generate irreducible CFG for coremark. It does generate irreducible CFG for std::merge. We also checked gcc and it seems that gcc also generate irreducible CFG for std::merge.
The following observation could be helpful: CFG of the output of this pass, (if we collapse some nodes of CFG into one node) will be the same as the structure of the DFA graph represented by the code. I have not thought about it, but I suspect this is generalizable to cases where we partially jump thread a switch statement. This observation can be used to detect irreducible CFG in the analysis step and potentially disable the transformation or convert the code to reducible CFG using known techniques (cost analysis will be needed).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99205/new/
https://reviews.llvm.org/D99205
More information about the llvm-commits
mailing list