-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--emit=asm,link -C opt-level=1 causes "Instruction does not dominate all uses!" #24876
Labels
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Comments
huonw
added
the
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
label
Apr 28, 2015
Closed
Still ICEs with the given compilation command. |
cc @dotdash |
This is due to stack coloring / merging of stack slots. When preparing the asm for output, stack merging eliminates an alloca leading to non-SSA compliant IR, which is fine for this pass, but we're re-using the same IR again, and then the verifier rightfully complains. |
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Oct 27, 2015
The LLVM function to output file types that involve codegen can invalidate the IR while lowering. That means that the second time the IR is fed to those passes, it's invalid and the LLVM verifier complains. To workaround this, we can tell the function to skip the codegen passes the second time around. To do this, we tell it to start adding passes only after it has seen a pass that doesn't exist at all. Quite the hack, I know... Fixes rust-lang#24876
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Dec 18, 2015
LLVM doesn't really support reusing the same module to emit more than one file. One bug this causes is that the IR is invalidated by the stack coloring pass when emitting the first file, and then the IR verifier complains by the time we try to emit the second file. Also, we get different binaries with --emit=asm,link than with just --emit=link. In some cases leading to segfaults. Unfortunately, it seems that at this point in time, the most sensible option to circumvent this problem is to just clone the whole llvm module for the asm output if we need both, asm and obj file output. Fixes rust-lang#24876 Fixes rust-lang#26235
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Dec 18, 2015
LLVM doesn't really support reusing the same module to emit more than one file. One bug this causes is that the IR is invalidated by the stack coloring pass when emitting the first file, and then the IR verifier complains by the time we try to emit the second file. Also, we get different binaries with --emit=asm,link than with just --emit=link. In some cases leading to segfaults. Unfortunately, it seems that at this point in time, the most sensible option to circumvent this problem is to just clone the whole llvm module for the asm output if we need both, asm and obj file output. Fixes rust-lang#24876 Fixes rust-lang#26235
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiling with
rustc --emit=asm,link -C opt-level=1
(with1.1.0-nightly (da623844a 2015-04-25) (built 2015-04-26)
gives:The text was updated successfully, but these errors were encountered: