Use optional values for inlining thresholds
Turn inlining threshold into optional values to make it possible to configure different defaults depending on the current mir-opt-level.
This commit is contained in:
parent
f895f1c35a
commit
500aeccc5b
3 changed files with 6 additions and 6 deletions
|
@ -349,9 +349,9 @@ impl Inliner<'tcx> {
|
|||
let tcx = self.tcx;
|
||||
|
||||
let mut threshold = if callee_attrs.requests_inline() {
|
||||
self.tcx.sess.opts.debugging_opts.inline_mir_hint_threshold
|
||||
self.tcx.sess.opts.debugging_opts.inline_mir_hint_threshold.unwrap_or(100)
|
||||
} else {
|
||||
self.tcx.sess.opts.debugging_opts.inline_mir_threshold
|
||||
self.tcx.sess.opts.debugging_opts.inline_mir_threshold.unwrap_or(50)
|
||||
};
|
||||
|
||||
// Give a bonus functions with a small number of blocks,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue