Make instance an option in CostChecker.

This commit is contained in:
Camille GILLOT 2023-02-03 16:47:11 +00:00
parent 8252ad02c4
commit 3cb0c2e385
2 changed files with 15 additions and 10 deletions

View file

@ -475,7 +475,8 @@ impl<'tcx> Inliner<'tcx> {
// FIXME: Give a bonus to functions with only a single caller
let mut checker = CostChecker::new(self.tcx, self.param_env, callsite.callee, callee_body);
let mut checker =
CostChecker::new(self.tcx, self.param_env, Some(callsite.callee), callee_body);
// Traverse the MIR manually so we can account for the effects of inlining on the CFG.
let mut work_list = vec![START_BLOCK];