diff options
| author | bors <bors@rust-lang.org> | 2022-04-12 03:26:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-04-12 03:26:53 +0000 |
| commit | b8f4cb6231dc7d4ff9afe62de798af0dc18ae835 (patch) | |
| tree | af029baa132b3891b8a66efafafffb7a62fd7e7c /compiler/rustc_codegen_gcc | |
| parent | 36f4ded69eb50c080991d624b7cd7f40466cea25 (diff) | |
| parent | 84fb481bf51ed69e5cf0780319ba72ead5420732 (diff) | |
| download | rust-b8f4cb6231dc7d4ff9afe62de798af0dc18ae835.tar.gz rust-b8f4cb6231dc7d4ff9afe62de798af0dc18ae835.zip | |
Auto merge of #95893 - luqmana:no-prepopulate-passes-tweaks, r=nikic
Respect -Z verify-llvm-ir and other flags that add extra passes when combined with -C no-prepopulate-passes in the new LLVM Pass Manager. As part of the switch to the new LLVM Pass Manager the behaviour of flags such as `-Z verify-llvm-ir` (e.g. sanitizer, instrumentation) was modified when combined with `-C no-prepopulate-passes`. With the old PM, rustc was the one manually constructing the pipeline and respected those flags but in the new pass manager, those flags are used to build a list of callbacks that get invoked at certain extension points in the pipeline. Unfortunately, `-C no-prepopulate-passes` would skip building the pipeline altogether meaning we'd never add the corresponding passes. The fix here is to just manually invoke those callbacks as needed. Fixes #95874 Demonstrating the current vs fixed behaviour using the bug in #95864 ```console $ rustc +nightly asm-miscompile.rs --edition 2021 --emit=llvm-ir -C no-prepopulate-passes -Z verify-llvm-ir $ echo $? 0 $ rustc +stage1 asm-miscompile.rs --edition 2021 --emit=llvm-ir -C no-prepopulate-passes -Z verify-llvm-ir Basic Block in function '_ZN14asm_miscompile3foo28_$u7b$$u7b$closure$u7d$$u7d$17h360e2f7eee1275c5E' does not have terminator! label %bb1 LLVM ERROR: Broken module found, compilation aborted! ```
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions
