OSDN Git Service

[MergeFunctions] Remove alias support.
authorwhitequark <whitequark@whitequark.org>
Thu, 27 Jul 2017 19:36:13 +0000 (19:36 +0000)
committerwhitequark <whitequark@whitequark.org>
Thu, 27 Jul 2017 19:36:13 +0000 (19:36 +0000)
commitf9f40b539b1dc44b10184684aa3f72e1192c454f
tree1cb67b03cd170049c90788f4fb2fd9cca5aafb8e
parent935d9198b37758c0717f3b86ab876a32fc12f637
[MergeFunctions] Remove alias support.

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.

Differential Revision: https://reviews.llvm.org/D34802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309313 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/MergeFunctions.cpp