[PATCH] D72829: Implement -fsemantic-interposition

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 23:40:49 PST 2020


MaskRay added a comment.

In D72829#1831017 <https://reviews.llvm.org/D72829#1831017>, @serge-sans-paille wrote:

> > Linkages which were not interposable before and can be interposable now: available_externally, linkonce_odr, weak_odr, external, and appending.
>
> @MaskRay I understand the motivation behind that sentence, but do we want that change to be non-conditional, i.e. not guarded by -fsemantic-interposition ?


I tried modifying `GlobalValue::maybeSetDsoLocal`: `setDSOLocal(true)` for ExternalLinkage. Unfortunately that will break 1337 tests. If not so many tests need fixing, I wish we can place `getParent() && getParent()->getSemanticInterposition()` logic in `maybeSetDsoLocal` and simplify `isInterposable`.

  if (!isInterposableLinkage(getLinkage()))
    return false;
  - return getParent() && getParent()->getSemanticInterposition() && !isDSOLocal();
  + return !isDSOLocal(); 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72829





More information about the llvm-commits mailing list