[PATCH] D29781: Add alias canonicalization pass when preparing for ThinLTO

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 12:30:23 PST 2017


tejohnson created this revision.
Herald added subscribers: Prazek, mgorny.

This patch implements an alias canonicalization pass to convert aliases
to the form discussed in https://llvm.org/bugs/show_bug.cgi?id=27866.
This changes aliases and aliasees into aliases with a private anonymous
value.

It was also discussed on the mailing list (see "Weak symbol/alias
semantics" thread here:

  http://lists.llvm.org/pipermail/llvm-dev/2017-January/109038.html),

as it simplifies needed fixes for ThinLTO weak symbol/alias handling.

Therefore, to start with I have only enabled the canonicalization pass
when preparing for ThinLTO. After this, I plan to add a bitcode upgrade
mechanism and use it for ThinLTO, and then enable the pass and upgrade
mechanism in other cases. Eventually IR producers can be changed, but
that is a longer term solution.


https://reviews.llvm.org/D29781

Files:
  include/llvm/InitializePasses.h
  include/llvm/Transforms/Scalar.h
  include/llvm/Transforms/Utils/CanonicalizeAliases.h
  lib/Transforms/IPO/PassManagerBuilder.cpp
  lib/Transforms/Utils/CMakeLists.txt
  lib/Transforms/Utils/CanonicalizeAliases.cpp
  lib/Transforms/Utils/Utils.cpp
  test/Transforms/CanonicalizeAliases/canonicalize.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29781.87856.patch
Type: text/x-patch
Size: 10379 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/f5d35693/attachment-0001.bin>


More information about the llvm-commits mailing list