[PATCH] D53285: [MergeFuncs] Generate alias instead of thunk if possible (default disabled)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 05:17:37 PDT 2018


nikic created this revision.
nikic added reviewers: jfb, whitequark.
Herald added a subscriber: llvm-commits.

The MergeFunctions pass was originally intended to emit aliases
instead of thunks where possible (unnamed_addr). However, for a
long time this functionality was behind a flag hardcoded to false,
bitrotted and was eventually removed in
https://github.com/llvm-mirror/llvm/commit/f9f40b539b1dc44b10184684aa3f72e1192c454f.

Originally the functionality was first disabled in
https://github.com/llvm-mirror/llvm/commit/664040a03c17f432a127a35013eeb6b6a26e41fb
due to lack of support for aliases in Mach-O. I believe that this
is no longer the case nowadays, but not really familiar with this
area.

In the interest of being conservative, this patch reintroduces the
aliasing functionality (with some fixes) behind a default disabled
-mergefunc-use-aliases flag.


Repository:
  rL LLVM

https://reviews.llvm.org/D53285

Files:
  lib/Transforms/IPO/MergeFunctions.cpp
  test/Transforms/MergeFunc/alias.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53285.169682.patch
Type: text/x-patch
Size: 7689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181015/b15f4166/attachment.bin>


More information about the llvm-commits mailing list