about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-07-21 10:02:52 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2023-07-31 16:21:02 +1000
commita08220bcabe6f5ae3b01596311948a42dafbe4ec (patch)
treebcdaec1b6cb102ea8564400eb926ab8915cac8d0 /compiler/rustc_codegen_llvm/src
parent179bf19813af8b312da2529d3577a98be125c135 (diff)
downloadrust-a08220bcabe6f5ae3b01596311948a42dafbe4ec.tar.gz
rust-a08220bcabe6f5ae3b01596311948a42dafbe4ec.zip
Tweak structure of the message loop.
The main loop has a *very* complex condition, which includes two
mentions of `codegen_state`. The body of the loop then immediately
switches on the `codegen_state`.

I find it easier to understand if it's a `loop` and we check for exit
conditions after switching on `codegen_state`. We end up with a tiny bit
of code duplication, but it's clear that (a) we never exit in the
`Ongoing` case, (b) we exit in the `Completed` state only if several
things are true (and there's interaction with LTO there), and (c) we
exit in the `Aborted` state if a couple of things are true. Also, the
exit conditions are all simple conjunctions.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions