[PATCH] D99205: Add jump-threading optimization for deterministic finite automata

Alexey Zhikhartsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 09:32:12 PDT 2021


alexey.zhikhar added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp:32
+//
+//===----------------------------------------------------------------------===//
+
----------------
SjoerdMeijer wrote:
> Just curious, is this algorithm described in literature? Can we include a reference?
This is the algorithm that we came up with so we cannot provide a reference. "Codasip" has a [whitepaper](https://news.codasip.com/whitepaper-llvm-jump-threading) with a more general algorithm for jump threading that covers DFA as well. Justin @jkreiner [compared our approach with the one by Codasip](https://reviews.llvm.org/D88307), and found that we can cover all cases that Codasip can (for DFA) with one exception: currently our implementation is limited to cases in which the state variable of a switch is always predictable, but it can be extended to cover the case where the state variable is only sometimes predictable.

Thank you very much for your comments, I'm working on updating the diff, will submit it shortly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99205/new/

https://reviews.llvm.org/D99205



More information about the llvm-commits mailing list