Uh oh!
There was an error while loading. Please reload this page.
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. - #40367
Conversation
rust-highfive
commented
Mar 8, 2017
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
| bug!("cannot generate operand from rvalue {:?}", rvalue); | ||
| // According to `rvalue_creates_operand`, only ZST | ||
| // aggregate rvalues are allowed to be operands. |
There was a problem hiding this comment.
(debug) assertion would be nice here. It is not unlikely for somebody to edit some interaction between some rvalue_creates_operand and this function in a wrong way and an assertion here would catch it.
There was a problem hiding this comment.
I had one! It's now in OperandRef::new_zst.
eddyb
commented
Mar 8, 2017
@bors r=nagisa |
bors
commented
Mar 8, 2017
📌 Commit df60044 has been approved by |
bors
commented
Mar 9, 2017
🔒 Merge conflict |
alexcrichton
commented
Mar 9, 2017
@bors: retry |
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. These two small changes fixedef1c/libfringe#68: * Don't emit ZST allocas, such as when returning `()` * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. These two small changes fixedef1c/libfringe#68: * Don't emit ZST allocas, such as when returning `()` * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
alexcrichton
commented
Mar 10, 2017
@bors: r=nagisa |
bors
commented
Mar 10, 2017
📌 Commit d8ca084 has been approved by |
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. These two small changes fixedef1c/libfringe#68: * Don't emit ZST allocas, such as when returning `()` * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. These two small changes fixedef1c/libfringe#68: * Don't emit ZST allocas, such as when returning `()` * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
Rollup of 38 pull requests - Successful merges: #39202, #39820, #39918, #39921, #40092, #40146, #40199, #40225, #40239, #40257, #40259, #40261, #40277, #40278, #40287, #40297, #40311, #40315, #40319, #40324, #40336, #40340, #40344, #40345, #40367, #40369, #40372, #40373, #40379, #40385, #40386, #40389, #40400, #40404, #40410, #40422, #40423, #40424 - Failed merges: #40220, #40329, #40426
Rollup of 38 pull requests - Successful merges: #39202, #39820, #39918, #39921, #40092, #40146, #40199, #40225, #40239, #40257, #40259, #40261, #40277, #40278, #40287, #40297, #40311, #40315, #40319, #40324, #40336, #40340, #40344, #40345, #40367, #40369, #40372, #40373, #40379, #40385, #40386, #40389, #40400, #40404, #40410, #40422, #40423, #40424 - Failed merges: #40220, #40329, #40426
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. These two small changes fixedef1c/libfringe#68: * Don't emit ZST allocas, such as when returning `()` * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
arielb1
commented
Mar 11, 2017
Eh, @bors r- Better that @eddyb add a tester for i686-gnu-noopt. Test failure: |
bors
commented
Mar 20, 2017
☔ The latest upstream changes (presumably #39628) made this pull request unmergeable. Please resolve the merge conflicts. |
eddyb
commented
Mar 21, 2017
Looks like ./x.py test --stage 1 src/test/debuginfo --test-args macro-stepping --target i686-unknown-linux-gnu |
I've gradually transformed the LLVM IR from Rust to match the LLVM IR from Clang. --- test.c.ll 2017-04-12 15:58:31.236264978 +0000+++ test.rs.ll 2017-04-12 15:59:02.302421857 +0000@@ -29 +29 @@-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.1 (tags/RELEASE_391/final)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "rustc version 1.18.0-dev (57ca703dc 2017-04-11)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)EDIT: Shorter diff, |
eddyb
commented
Apr 12, 2017
So it turns out that LLVM produces this (for a main: .loc 150 pushl %ebp movl %esp, %ebp .loc 165 prologue_end subl$8, %esp calll includedGDB is capable of determining that the last instruction in the prologue is |
eddyb
commented
Apr 12, 2017
@bors r=nagisa |
bors
commented
Apr 12, 2017
📌 Commit 9b5c577 has been approved by |
bors
commented
Apr 12, 2017
⌛ Testing commit 9b5c577 with merge 3ee3088... |
bors
commented
Apr 12, 2017
💔 Test failed - status-travis |
eddyb
commented
Apr 12, 2017
@bors retry
|
bors
commented
Apr 12, 2017
⌛ Testing commit 9b5c577 with merge 8e25752... |
bors
commented
Apr 13, 2017
💔 Test failed - status-travis |
alexcrichton
commented
Apr 13, 2017
via email
| … On Wed, Apr 12, 2017 at 7:28 PM, bors ***@***.***> wrote:
💔 Test failed - status-travis
<https://travis-ci.org/rust-lang/rust/builds/221539796>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#40367 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95HcODQfcDRwRRoWPvfYU-V0dvhrEks5rvWwmgaJpZM4MXIqb>
.
|
bors
commented
Apr 13, 2017
⌛ Testing commit 9b5c577 with merge 1470a1a... |
bors
commented
Apr 13, 2017
💔 Test failed - status-travis |
arielb1
commented
Apr 13, 2017
Musl segfault: @bors retry |
bors
commented
Apr 13, 2017
Improve the LLVM IR we generate for trivial functions, especially #[naked] ones. These two small changes fixedef1c/libfringe#68: * Don't emit ZST allocas, such as when returning `()` * Don't emit a branch from LLVM's entry block to MIR's `START_BLOCK` unless needed * That is, if a loop branches back to it, although I'm not sure that's even valid MIR
bors
commented
Apr 13, 2017
☀️ Test successful - status-appveyor, status-travis |
These two small changes fixedef1c/libfringe#68:
()START_BLOCKunless needed