The goal is to simplify the semantic model for clients of IRMover.
Details
Diff Detail
- Build Status
Buildable 3534 Build 3534: arc lint + arc unit
Event Timeline
llvm/lib/LTO/LTO.cpp | ||
---|---|---|
481 | Do we have a test that shows that:
| |
llvm/lib/Linker/IRMover.cpp | ||
875 | No test changed, that's annoying that we're not covering this case (independently of the new LTO API). Any idea how to test this? (along with the removal below as well) |
llvm/lib/Linker/LinkModules.cpp | ||
---|---|---|
398 | I guess removing this is required to make it NFC. Is it required for correctness too? I don't think so but want to make sure my understanding is right. Is it better to continue not mapping these in here (I think they get mapped later if referenced, right?) and not bother making this NFC? |
llvm/lib/LTO/LTO.cpp | ||
---|---|---|
481 | I've added tests for both of those things, as well as a standalone test for the available_externally functionality (previously only a gold plugin test was covering this). | |
llvm/lib/Linker/IRMover.cpp | ||
875 | The only direct users of IRMover are LinkModules and LTO. I guess we could write a unit test for IRMover perhaps? Doesn't seem worth it for this one change though. | |
llvm/lib/Linker/LinkModules.cpp | ||
398 | Actually this change was needed for us to link available_externally at all (with only the change to shouldLink we would hit the 'return false;' here and never link any available_externally globals). But taking a closer look I found that we were linking too much, even unreferenced available_externally globals (which was a functional change). I've uploaded a new change that causes available_externally to be handled like linkonce and only linked if referenced. |
Thanks for the tests! Still LGTM.
llvm/lib/Linker/IRMover.cpp | ||
---|---|---|
875 | I wouldn't suggest it :) |
llvm/test/Linker/available_externally_a.ll | ||
---|---|---|
7 | Actually why isn't llvm-link including the available_externally? |
llvm/test/Linker/available_externally_a.ll | ||
---|---|---|
7 | Because it is unreferenced, see discussion with Teresa in LinkModules.cpp. |
llvm/test/Linker/available_externally_a.ll | ||
---|---|---|
7 | Oh right :) |
Do we have a test that shows that: