[Coroutines] Improve profile information for the entry block of Coroutines
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
In Transforms/Coroutines it is possible to make sure the branch weight probabilities for the `resume` entry block, where
```
entry.resume:
...
switch i2 %index, label %unreachable [
i2 0, label %CoroSave1
i2 1, label %AfterCoroSuspend3
i2 -2, label %AfterCoroSuspend7
i2 -1, label %cleanup
]
```
* The case `i2 0` represents the initial creation and first resume of the coroutine,
* cases `i2 1` and `i2 -2` represent the steady-state resume cycles, and
* the cleanup case `i2 -1` is a terminal state.
Because we could not predict the branch weights without the actual profile so, for now, we intend to label it as unknown and revisit it later. Creating this issue to track this case.
Contributor guide
Assessment
This issue has not been assessed yet.