[PATCH] D52893: [ThinLTO] Keep non-prevailing (linkonce|weak)_odr symbols live

Xin Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 5 11:01:34 PDT 2018


trentxintong added inline comments.


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:746
+    // later in the EliminateAvailableExternally pass and setting them to
+    // not-live could break downstreams users of liveness information (PR36483)
+    // or limit optimization opportunities.
----------------
tejohnson wrote:
> Are you fixing another instance of PR36483? If not, then the comment should probably be updated to indicate that this is to fix a missed optimization.
Hi Teresa

Thank you for the comment. 

We have some linkonceodr symbols that are included in multiple files, one of the files is compiled to ELF object file directly which makes the ones in the IR object non-prevailing.

Originally we crashed because the IR level vtable (linkonce_odr linkage) is not prevailing and WPD crashed. This should be prevented by https://reviews.llvm.org/D52175.

So at this point, this patch is more to improve a missed optimization opportunity than fix a crash. I have the comment "or limit optimization opportunities" in the comment. 


Repository:
  rL LLVM

https://reviews.llvm.org/D52893





More information about the llvm-commits mailing list