about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-11-19 16:26:35 +0100
committerGitHub <noreply@github.com>2020-11-19 16:26:35 +0100
commit2fdcd245dfdb317b9c78a3850fbea143270429a7 (patch)
tree11ca88671df711256f89ebd6fb345dad207775c0 /compiler/rustc_mir/src/transform/coverage/debug.rs
parent04a4404016c0ce526db5a6a0c45b2014f6653504 (diff)
parent07de70250bd350befde0bf80fcb0e2836cd5d8b9 (diff)
downloadrust-2fdcd245dfdb317b9c78a3850fbea143270429a7.tar.gz
rust-2fdcd245dfdb317b9c78a3850fbea143270429a7.zip
Rollup merge of #79117 - cjkenn:mir-fuel, r=oli-obk
add optimization fuel checks to some mir passes

Fixes #77402

Inserts a bunch of calls to `consider_optimizing`. Note that `consider_optimizing` is the method that actually decrements the fuel count, so the point at which it's called is when the optimization takes place, from a fuel perspective. This means that where we call it has some thought behind it:

1. We probably don't want to decrement the fuel count before other simple checks, otherwise we count an optimization as being performed even if nothing was mutated (ie. it returned early).
2. In cases like `InstCombine`, where we gather optimizations in a pass and then mutate values, we probably would rather skip the gathering pass for performance reasons rather than skip the mutations afterwards.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions