[PATCH] D61255: [ThinLTO] Make weak data symbols prevailing when they're visible to regular object

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 09:41:54 PDT 2019


evgeny777 added a comment.

Looks like I have another idea how this can be fixed. In addition to 'ReadOnly' we can introduce 'CompileTimeConstant' flag in GlobalVarSummary.
Not marking linkonce_odr and weak_odr data symbols which are preserved and are not 'CompileTimeConstant' live will fix PR41645.
Also such flag allows exploring some new optimization opportunities:

- Compile time constants are read only by definition, so we can always import them, even if they're referenced by some GV initializer.
- We can import readonly GV with initializer if all references from that initializer are to compile time constants


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61255/new/

https://reviews.llvm.org/D61255





More information about the llvm-commits mailing list