This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC's ICF vs. gold's ICF
- From: Frank Tetzel <s1445051 at mail dot zih dot tu-dresden dot de>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 15 Jan 2019 14:11:10 +0100
- Subject: GCC's ICF vs. gold's ICF
Hi,
why is the ICF pass in gcc not folding member functions which depend on
a template parameter but happen to generate identical code?
Is it because it is not identical on the IR level in the compiler?
Can I somehow dump the IR in text form?
The ICF pass in the gold linker can do it on binary level which is kind
of mentioned in manpage of gcc. I'm just interested in why the compiler
cannot do it on its own.
There is a test program in a blog post I wrote [1].
Best regards,
Frank
[1] https://tetzank.github.io/posts/identical-code-folding/#consolidating-independent-member-functions