[PATCH] D88307: [DON'T MERGE] Jump-threading for finite state automata
Evgeny Astigeevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 5 01:55:48 PDT 2020
eastig added a comment.
In D88307#2310500 <https://reviews.llvm.org/D88307#2310500>, @amehsan wrote:
> @alexey.zhikhar and I had a look at your patch. Some findings that might be interesting:
>
> 1- The IR from your patch is shorter than ours. We haven't checked carefully where the difference is, but there is a gap of about 10% (of the size of `core_state_transition`)
> 2- Our code from our current implementation is about 2%-3% faster on our platform.
> 3- While the main idea is exactly the same our implementation looks at all the control flow paths in the loop first and perform the analysis. Then we have a code gen process. Your approach is closer to the existing jump threading in that you make one change at a time.
> 4- As I said, we are making some significant changes in our implementation to improve the code quality (among other things), etc. So our new code that we will be able to share is not ready yet.
>
> Thanks for sharing your code.
Hi Ehsan,
Thank you for your feedback.
The code was written in early 2015 before LLVM got improvements in DominatorTree and SSAUpdater. The biggest part of the code is to restore SSA form which is not perfect. Some sophisticated CFGs can cause issues.
The code has not been optimised for performance. I think it has opportunities for improvements.
The original idea I had was to support both SwitchInst and BranchInst. However, for BranchInst the implementation was very unstable. As the target was to optimize SwitchInst, support of BranchInst was dropped.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88307/new/
https://reviews.llvm.org/D88307
More information about the llvm-commits
mailing list