[PATCH] D70404: [ThinLTO] Always import constants

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 06:06:14 PST 2020


evgeny777 marked an inline comment as done.
evgeny777 added inline comments.


================
Comment at: llvm/test/ThinLTO/X86/import-constant.ll:1
+; Check that we internalize constant object in the destination module
+; even when it is referenced in some other GV initializer and/or is
----------------
tejohnson wrote:
> tejohnson wrote:
> > Looks like it is promoted, not internalized?
> Looking at this test again, I guess @_ZL3Obj must be getting internalized after promotion, which is why it gets optimized away in the OPT version. Could you check it directly after the internalization phase? I also had a couple other suggestions below.
> Looking at this test again, I guess @_ZL3Obj must be getting internalized after promotion, which is why it gets optimized away in the OPT version.

It's been promoted, not internalized. However @_ZL3Obj  is constant so it can be folded even when it has available_externally linkage


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

https://reviews.llvm.org/D70404





More information about the llvm-commits mailing list