]> git.lizzy.rs Git - rust.git/commit
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)
commit4733312e09c04fec3626ea27083da615d1a1df4d
tree9a8f2196f26457972c8c84f77c7f13ce39c98d2b
parentf8a2e491ebec34113563cf8683f6fec2646cebb1
parentea4794321224964060b931d962a9a6ee7e59ac7c
Rollup merge of #104121 - Lokathor:mir-opt-when-instruction-set-missing-on-callee, r=tmiasko

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
compiler/rustc_mir_transform/src/inline.rs