-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
ThinLTO: updates for LLVM 5 #46652
ThinLTO: updates for LLVM 5 #46652
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
src/rustllvm/PassWrapper.cpp
Outdated
if (GlobalValue::isLocalLinkage(GVS->linkage())) | ||
continue; | ||
auto GUID = GVS->getOriginalName(); | ||
#if LLVM_VERSION_GE(5, 0) | ||
if (IsLiveByGUID(Ret->Index, GUID)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is just GVS->flags().Live
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied from the relevant commit. I have no idea what's the pitfall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's switch to GVS->flags().Live
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few reasons we should not use this construction:
- The implementation of
IsLiveByGUID
goes from a GUID back to theGlobalValueSummary
which is already in scope here asGVS
. - We don't need to take
WithGlobalValueDeadStripping
into account, this is all happening long before anything else.
Let's switch to GVS->flags().Live
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
65b26ea
to
dffa36c
Compare
@bors: r+ |
📌 Commit dffa36c has been approved by |
⌛ Testing commit dffa36c with merge fa0ee7b8773610ad8aee58d31f23265fd31af98d... |
💔 Test failed - status-travis |
@bors retry — http://crosstool-ng.org was down. |
@bors rollup |
…lexcrichton ThinLTO: updates for LLVM 5 refs: llvm-mirror/llvm@ccb80b9 llvm-mirror/llvm@e611018
refs:
llvm-mirror/llvm@ccb80b9
llvm-mirror/llvm@e611018