Uh oh!
There was an error while loading. Please reload this page.
Add support for storing code model to LLVM module IR - #74002
Conversation
This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323.
rust-highfive
commented
Jul 3, 2020
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| fn to_llvm_code_model(code_model: Option<CodeModel>) -> llvm::CodeModel { | ||
| pub fn to_llvm_code_model(code_model: Option<CodeModel>) -> llvm::CodeModel { |
| // Linking object files with different code models is undefined behavior | ||
| // because the compiler would have to generate additional code (to span | ||
| // longer jumps) if a larger code model is used with a smaller one. | ||
| // Therefore we will treat attempts to mix code models as an error. |
There was a problem hiding this comment.
This last sentence is super interesting, but it is not super clear where the "error" comes from. Does it happen at LTO time? Quick skim of the linked differentials does not answer it, you need to read the comments, so it would be great if more about this was said here.
I would also probably move it to this function’s call location as people are way more likely to read it in librustc_codegen_llvm than here.
There was a problem hiding this comment.
This last sentence is super interesting, but it is not super clear where the "error" comes from. Does it happen at LTO time? Quick skim of the linked differentials does not answer it, you need to read the comments, so it would be great if more about this was said here.
Thank you for having a look, and sorry for not clear that.
I checked LLVM and IRMover works both link time and LTO time, so this happends either.However, this error won't happen at rustc comiple time, so I would just remove this line.
nagisa
commented
Jul 4, 2020
@bors r+ Thanks! |
bors
commented
Jul 4, 2020
📌 Commit 67a5e2b has been approved by |
Add support for storing code model to LLVM module IR This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323.
JohnTitor
commented
Jul 5, 2020
Failed in #74054 (comment), @bors r- |
kubo39
commented
Jul 5, 2020
CI shows: |
kubo39
commented
Jul 9, 2020
What should I do next? |
bors
commented
Jul 9, 2020
📌 Commit 5c24a94 has been approved by |
bors
commented
Jul 9, 2020
🌲 The tree is currently closed for pull requests below priority 5, this pull request will be tested once the tree is reopened |
bors
commented
Jul 9, 2020
💡 This pull request was already approved, no need to approve it again.
|
bors
commented
Jul 9, 2020
📌 Commit 5c24a94 has been approved by |
Manishearth
commented
Jul 10, 2020
@bors p=1 |
bors
commented
Jul 10, 2020
⌛ Testing commit 5c24a94 with merge 9d1583c098bad1b07f1ee7a2c168e8dd21f743e6... |
Dylan-DPC-zz
commented
Jul 10, 2020
@bors retry yielding to high priority pr |
Manishearth
commented
Jul 10, 2020
@bors rollup=never |
Manishearth
commented
Jul 10, 2020
@bors p=0 |
Manishearth
commented
Jul 11, 2020
Is this rollup=never because it has to be or because we expect it to perhaps fail a rollup? There's a new rollup=iffy for that |
nagisa
commented
Jul 11, 2020
Yeah it was @bors rollup=iffy |
Add support for storing code model to LLVM module IR This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323.
Manishearth
commented
Jul 11, 2020
Expected so, wanted to confirm. Thanks! |
Manishearth
commented
Jul 11, 2020
Dylan-DPC-zz
commented
Aug 13, 2020
@kubo39 thanks for the effort but unfortunately I've to close this pr due to inactivity. If you wish and have figured out the failure pasted earlier, you can submit a new PR with the fix and we can get it reviewed. Thanks for taking the time to contribute. |
This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323. This patch is based on rust-lang#74002
Add support for storing code model to LLVM module IR This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323. This patch is based on rust-lang#74002
Add support for storing code model to LLVM module IR This patch avoids undefined behavior by linking different object files. Also this would it could be propagated properly to LTO. See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323. This patch is based on rust-lang#74002
This patch avoids undefined behavior by linking different object files.
Also this would it could be propagated properly to LTO.
See https://reviews.llvm.org/D52322 and https://reviews.llvm.org/D52323.