]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #104121 - Lokathor:mir-opt-when-instruction-set-missing-on-callee...
authorMatthias Krüger <matthias.krueger@famsik.de>
Sat, 26 Nov 2022 09:39:10 +0000 (10:39 +0100)
committerGitHub <noreply@github.com>
Sat, 26 Nov 2022 09:39:10 +0000 (10:39 +0100)
Refine `instruction_set` MIR inline rules

Previously an exact match of the `instruction_set` attribute was required for an MIR inline to be considered. This change checks for an exact match *only* if the callee sets an `instruction_set` in the first place. When the callee does not declare an instruction set then it is considered to be platform agnostic code and it's allowed to be inline'd into the caller.

cc ``@oli-obk``

[Edit] Zulip Context: https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/What.20exactly.20does.20the.20MIR.20optimizer.20do.3F

1  2 
compiler/rustc_mir_transform/src/inline.rs