[all-commits] [llvm/llvm-project] 02054d: [LTO] Simplify internalize logic. NFC

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Aug 28 10:03:05 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 02054d3ae9be1f513a0af30aa34884298316c712
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-08-28 (Mon, 28 Aug 2023)

  Changed paths:
    M llvm/lib/LTO/LTO.cpp

  Log Message:
  [LTO] Simplify internalize logic. NFC

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.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D158949

More information about the All-commits mailing list