Only check inlining counter after recusing.
This commit is contained in:
parent
0939ec13d8
commit
9e683442a9
11 changed files with 395 additions and 271 deletions
|
@ -145,13 +145,16 @@ impl<'tcx> Inliner<'tcx> {
|
|||
Ok(new_blocks) => {
|
||||
debug!("inlined {}", callsite.callee);
|
||||
self.changed = true;
|
||||
inlined_count += 1;
|
||||
if inlined_count == inline_limit {
|
||||
return;
|
||||
}
|
||||
|
||||
self.history.push(callsite.callee.def_id());
|
||||
self.process_blocks(caller_body, new_blocks);
|
||||
self.history.pop();
|
||||
|
||||
inlined_count += 1;
|
||||
if inlined_count == inline_limit {
|
||||
debug!("inline count reached");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue