[PATCH] D107249: [GlobalOpt] Don't replace alias with aliasee if either alias/aliasee may be preemptible

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 13:36:41 PST 2022


MaskRay updated this revision to Diff 404715.
MaskRay added a comment.

Check both `!GlobalValue::isInterposableLinkage(GV.getLinkage())` and dso_local.

(Spot by rnk): The previous diff might incorrectly optimize a WeakAny alias, which was wrong since the alias might be replaced with another in the same linked unit.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107249

Files:
  llvm/docs/LangRef.rst
  llvm/lib/Transforms/IPO/GlobalOpt.cpp
  llvm/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll
  llvm/test/Transforms/GlobalOpt/alias-resolve.ll
  llvm/test/Transforms/GlobalOpt/alias-used-address-space.ll
  llvm/test/Transforms/GlobalOpt/alias-used.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107249.404715.patch
Type: text/x-patch
Size: 5854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220131/8cdab81c/attachment.bin>


More information about the llvm-commits mailing list