This is an archive of the discontinued LLVM Phabricator instance.

[MergeFunctions] Remove alias support
ClosedPublic

Authored by whitequark on Jun 28 2017, 8:01 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

whitequark created this revision.Jun 28 2017, 8:01 PM
whitequark added a reviewer: jfb.
jfb accepted this revision.Jun 28 2017, 9:21 PM
This revision is now accepted and ready to land.Jun 28 2017, 9:21 PM
This revision was automatically updated to reflect the committed changes.