Uh oh!
There was an error while loading. Please reload this page.
Mark all extern functions as nounwind - #28358
Conversation
rust-highfive
commented
Sep 11, 2015
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Sep 11, 2015
Thanks @dotdash! I'm excited to see how this plays out. Some thoughts of mine:
|
bors
commented
Sep 11, 2015
☔ The latest upstream changes (presumably #28306) made this pull request unmergeable. Please resolve the merge conflicts. |
494e66b to
be96d9fComparedotdash
commented
Sep 12, 2015
Added codegen tests for the attributes, but not for the call (as discussed on IRC) because we never use invoke an external functions anyway. Also removed the check for nounwind in invoke() because that's for rust functions only, and they don't get marked nounwind yet. |
alexcrichton
commented
Sep 13, 2015
Looks good to me, thanks! Can you also mark the |
dotdash
commented
Sep 13, 2015
@bors r=alexcrichton bd6da30 |
bors
commented
Sep 14, 2015
⌛ Testing commit bd6da30 with merge 21ba40d... |
bors
commented
Sep 14, 2015
💔 Test failed - auto-win-msvc-64-opt |
dotdash
commented
Sep 14, 2015
@bors retry I'm confused about this error... |
bors
commented
Sep 14, 2015
⌛ Testing commit bd6da30 with merge dcf66cb... |
bors
commented
Sep 14, 2015
💔 Test failed - auto-win-msvc-64-opt |
Unwinding across an FFI boundary is undefined behaviour, so we can mark all external function as nounwind. The obvious exception are those functions that actually perform the unwinding.
dotdash
commented
Sep 14, 2015
bors
commented
Sep 14, 2015
This allows to skip the codegen for all the unneeded landing pads, reducing code size across the board by about 2-5%, depending on the crate. Compile times seem to be pretty unaffected though :-/
bors
commented
Sep 14, 2015
💔 Test failed - auto-win-msvc-64-opt |
dotdash
commented
Sep 14, 2015
@bors retry At least it hit a known intermittent failure this time... |
bors
commented
Sep 14, 2015
⚡ Previous build results for auto-win-msvc-32-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-nopt-t, auto-mac-64-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-64-opt... |
This allows to skip the codegen for all the unneeded landing pads, reducing code size across the board by about 2-5%, depending on the crate. Compile times seem to be pretty unaffected though :-/