diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-10-17 08:29:40 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-11-16 15:46:39 +1100 |
| commit | 54082dd21695373b770bd11e042e564396598c2a (patch) | |
| tree | 9570a6265d93a4b6d7b147600b9a8ecc8fa38073 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 68194aa8d5c513fad53147e46144684f14f99463 (diff) | |
| download | rust-54082dd21695373b770bd11e042e564396598c2a.tar.gz rust-54082dd21695373b770bd11e042e564396598c2a.zip | |
Merge basic blocks where possible when generating LLVM IR.
In `codegen_assert_terminator` we decide if a BB's successor is a candidate for merging, which requires that it be the only successor, and that it only have one predecessor. That result then gets passed down, and if it reaches `funclet_br` with the appropriate BB characteristics, then no `br` instruction is issued, a `MergingSucc::True` result is passed back, and the merging proceeds in `codegen_block`. The commit also adds `CachedLlbb`, a new type to help keep track of each BB that has been merged into its predecessor.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
