File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,10 @@ current level using `tcx.sess.opts.debugging_opts.mir_opt_level`.
65
65
66
66
Optimization fuel is a compiler option (` -Z fuel=<crate>=<value> ` ) that allows for fine grained
67
67
control over which optimizations can be applied during compilation: each optimization reduces
68
- fuel by 1, and when fuel reaches 0 no more optimizations are applied. This can help with debugging
69
- and identifying problems with optimizations.
68
+ fuel by 1, and when fuel reaches 0 no more optimizations are applied. The primary use of fuel
69
+ is debugging optimizations that may be incorrect or misapplied. By changing the fuel
70
+ value, you can bisect a compilation session down to the exact incorrect optimization
71
+ (this behaves like a kind of binary search through the optimizations).
70
72
71
73
MIR optimizations respect fuel, and in general each pass should check fuel by calling
72
74
[ ` tcx.consider_optimizing ` ] [ consideroptimizing ] and skipping the optimization if fuel
You can’t perform that action at this time.
0 commit comments