Skip to content
Commit c26bbfe6 authored by Rui Ueyama's avatar Rui Ueyama
Browse files

COFF: Add a test for ICF which LLD cannot handle yet.

In this test, we have two functions, foo and bar. MSVC linker can
choose one and discard the other using ICF. LLD cannot. I add this
test as a TODO.

foo and bar are conceptually equivalent to the following:

  void foo() { foo(); }
  void bar() { foo(); }

foo and bar are effectively the same function. If foo and bar are
compiled to the same instructions, both their contents (foo and bar)
and relocation targets (foo) become the same, so from the ICF point
of view, they are reducible. But their graphs are not isomorphic!
LLD's ICF algorithm cannot handle this case yet.

llvm-svn: 247721
parent 151c032c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment