[PATCH] D34802: [MergeFunctions] Remove alias support

whitequark via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 20:01:38 PDT 2017


whitequark created this revision.
Herald added a subscriber: jfb.

The alias support was dead code since 2011. It was last touched
in r124182, where it was reintroduced after being removed
in r110434, and since then it was gated behind a HasGlobalAliases
flag that was permanently stuck as `false`.

It is also broken. I'm not sure if it bitrotted or was just broken
in the first place because it appears to have never been tested,
but the following IR results in a crash:

  define internal i32 @a(i32 %a, i32 %b) unnamed_addr {
    %c = add i32 %a, %b
    %d = xor i32 %a, %c
    ret i32 %c
  }
  
  define internal i32 @b(i32 %a, i32 %b) unnamed_addr {
    %c = add i32 %a, %b
    %d = xor i32 %a, %c
    ret i32 %c
  }

It seems safe to remove buggy untested code that no one cared about
for seven years.


Repository:
  rL LLVM

https://reviews.llvm.org/D34802

Files:
  lib/Transforms/IPO/MergeFunctions.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34802.104583.patch
Type: text/x-patch
Size: 3635 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/34b1f6fe/attachment.bin>


More information about the llvm-commits mailing list