llvm-project
dcd58a8f - [Inline] Allow inlining with null_pointer_is_valid mismatch (#190510)

Commit
182 days ago
[Inline] Allow inlining with null_pointer_is_valid mismatch (#190510) If the callee has null_pointer_is_valid but the caller does not, we should still inline and add null_pointer_is_valid to the caller (which is handled by an already existing inline adjustment rule). This does mean that optimizations in the caller may be reduced by unnecessarily preserving null checks, but that's still better than not inlining at all. In particular, this check causes issues with LTO in the Linux kernel, as the C portions are compiled with null_pointer_is_valid, but the Rust portions are not. The test is modified to show that the previous alwaysinline behavior now always holds.
Author
Parents
Loading