[PATCH] D158949: [LTO] Simplify internalize logic. NFC
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 27 00:03:43 PDT 2023
MaskRay created this revision.
MaskRay added reviewers: steven_wu, tejohnson.
Herald added subscribers: ormris, hiraditya, inglorion.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
D151965 <https://reviews.llvm.org/D151965> removed incorrect internalization for {linkonce,weak}{,_odr} when
the prevailing copy is in native code. The multiple conditions are based
on negative conditions, which can be simplified to be based on positive cases:
- an object with an external linkage (must be prevailing) can be internalized
- a prevailing object with a {linkonce,weak}{,_odr} or common linkage can be internalized.
Further, the lengthy comment is a bit misleading, as it doesn't say that
objects with an external/linkonce/weak linkage can be internalized.
Clarify it.
Add non-odr weak/linkonce tests to weak_resolution.ll to improve
coverage.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158949
Files:
llvm/lib/LTO/LTO.cpp
llvm/test/ThinLTO/X86/weak_resolution.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158949.553786.patch
Type: text/x-patch
Size: 6648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230827/4945f52e/attachment.bin>
More information about the llvm-commits
mailing list