[PATCH] D19308: ThinLTO: Resolve linkonce_odr aliases just like functions

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 18:37:10 PDT 2016


joker.eph added inline comments.

================
Comment at: test/ThinLTO/X86/alias_resolution.ll:39
@@ +38,3 @@
+; PROMOTE-DAG: @linkonceODRfuncWeakAlias = weak alias void (...), bitcast (void ()* @linkonceODRfunc to void (...)*)
+; PROMOTE-DAG: @linkonceODRfuncLinkonceAlias = linkonce alias void (...), bitcast (void ()* @linkonceODRfunc to void (...)*)
+; PROMOTE-DAG: @linkonceODRfuncWeakODRAlias = weak_odr alias void (...), bitcast (void ()* @linkonceODRfunc to void (...)*)
----------------
tejohnson wrote:
> joker.eph wrote:
> > There is a bug I think, this one should be promoted right?
> You mean resolved? The alias itself isn't ODR so I think it stays Linkonce(Any).
I think the current situation is murky. Let see if I can summarize it right:

- linkonce (ODR or not) can be discarded: if the symbol is referenced from another module, it needs to be "resolved" for *correctness*.
- weak (ODR or not) can't be discarded: we don't need to resolve them for *correctness*.
- linkonce/weak (the *non* ODR variant) can't be inlined, there is probably no interest in importing them, we should disable that in the importing decision.
- For all of them: we want to resolve when there is more than one definition for compile-time optimization purpose.


http://reviews.llvm.org/D19308





More information about the llvm-commits mailing list