[all-commits] [llvm/llvm-project] 424780: [NFC] [Coroutines] Add a fastpath when computing t...
Chuanqi Xu via All-commits
all-commits at lists.llvm.org
Fri May 5 02:01:44 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4247806690801cba0699552b711dbfdb943d05d2
https://github.com/llvm/llvm-project/commit/4247806690801cba0699552b711dbfdb943d05d2
Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
Date: 2023-05-05 (Fri, 05 May 2023)
Changed paths:
M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
Log Message:
-----------
[NFC] [Coroutines] Add a fastpath when computing the cross suspend point information
Mitigate https://github.com/llvm/llvm-project/issues/62348
The root cause for the above issue is that we used a textbook dataflow
analysis for the cross suspend point information. The analysis is
powerful but not scaling.
It is not easy to improve the current algorithm and the patch tries to
prune some branches to mitigate the problems.
Before the patch:
```
n: 20000
real 0m11.081s
user 0m10.597s
sys 0m0.320s
n: 40000
real 0m32.927s
user 0m31.403s
sys 0m1.043s
n: 60000
real 1m2.145s
user 0m58.903s
sys 0m2.268s
n: 80000
real 1m47.143s
user 1m41.630s
sys 0m3.857s
n: 100000
real 2m34.758s
user 2m26.587s
sys 0m5.922s
```
After the patch:
```
n: 20000
real 0m10.418s
user 0m9.945s
sys 0m0.311s
n: 40000
real 0m27.884s
user 0m26.430s
sys 0m1.036s
n: 60000
real 0m52.420s
user 0m49.321s
sys 0m2.267s
n: 80000
real 1m25.389s
user 1m20.247s
sys 0m3.856s
n: 100000
real 2m4.275s
user 1m56.405s
sys 0m5.975s
```
This patch intended to be a NFC patch.
More information about the All-commits
mailing list