Uh oh!
There was an error while loading. Please reload this page.
Avoid unnecessary allocas for indirect function arguments - #44573
Conversation
rust-highfive
commented
Sep 14, 2017
(rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
commented
Sep 14, 2017
LGTM. r? @michaelwoerister |
michaelwoerister
commented
Sep 15, 2017
bors
commented
Sep 15, 2017
📌 Commit ed7a7cf has been approved by |
Avoid unnecessary allocas for indirect function arguments The extra alloca was only necessary because it made LLVM implicitly handle the necessary deref to get to the actual value. The same happens for indirect arguments that have the byval attribute. But the Rust ABI does not use the byval attribute and so we need to manually add the deref operation to the debuginfo.
TimNN
commented
Sep 17, 2017
This likely caused rollup #44649 to fail with the following error on ( |
bors
commented
Sep 17, 2017
⌛ Testing commit ed7a7cf with merge ee179583d630a07cf0009739c6edbc61ada961a8... |
arielb1
commented
Sep 17, 2017
@bors r- |
arielb1
commented
Sep 17, 2017
@bors retry |
arielb1
commented
Sep 17, 2017
Turns out leaving LLVM assertions disabled isn't a good idea when working with LLVM. |
michaelwoerister
commented
Sep 18, 2017
Is there anything we can do about this? Or does this just not work in the general case? |
dotdash
commented
Sep 19, 2017
Looks like an LLVM bug which is only triggered by this change. The jump threading pass duplicates an dbg.declare intrinsic, causing the same fragment to be declared twice and triggering the assertion. I asked on the LLVM ML about it. http://lists.llvm.org/pipermail/llvm-dev/2017-September/117575.html |
eddyb
commented
Sep 19, 2017
@dotdash It wouldn't be the first time LLVM mangles non-trivial debuginfo annotations. |
michaelwoerister
commented
Sep 19, 2017
@dotdash ❤️ |
aidanhs
commented
Sep 28, 2017
For triage clarity, where is this up to? Is there a patch making its way upstream (and if so, is there a link to the LLVM phabricator so we can track it)? |
dotdash
commented
Oct 4, 2017
Sorry, I've been unable to get back to this earlier. Upstream patch is at https://reviews.llvm.org/D38540 |
dotdash
commented
Oct 11, 2017
Updated to include the necessary LLVM update and added a second commit to avoid even more copies and fix a debug info oddity/bug. |
b18ed29 to
43c4589Comparebors
commented
Oct 14, 2017
☔ The latest upstream changes (presumably #45162) made this pull request unmergeable. Please resolve the merge conflicts. |
dotdash
commented
Oct 16, 2017
Rebased and backed out the commit that was failing earlier. Should be good to go now. |
There was a problem hiding this comment.
There was an LLVM rebuild race.
r+ with the llvm rebuild trigger removed - it is not needed any more because someone else updated our LLVM. |
michaelwoerister
commented
Oct 18, 2017
👍 |
The extra alloca was only necessary because it made LLVM implicitly handle the necessary deref to get to the actual value. The same happens for indirect arguments that have the byval attribute. But the Rust ABI does not use the byval attribute and so we need to manually add the deref operation to the debuginfo.
dotdash
commented
Oct 18, 2017
@bors r=arielb1 |
bors
commented
Oct 18, 2017
📌 Commit 6bfecd4 has been approved by |
bors
commented
Oct 18, 2017
Avoid unnecessary allocas for indirect function arguments The extra alloca was only necessary because it made LLVM implicitly handle the necessary deref to get to the actual value. The same happens for indirect arguments that have the byval attribute. But the Rust ABI does not use the byval attribute and so we need to manually add the deref operation to the debuginfo.
bors
commented
Oct 18, 2017
☀️ Test successful - status-appveyor, status-travis |
The extra alloca was only necessary because it made LLVM implicitly
handle the necessary deref to get to the actual value. The same happens
for indirect arguments that have the byval attribute. But the Rust ABI
does not use the byval attribute and so we need to manually add the
deref operation to the debuginfo.