On Monday, 19 May 2014 at 18:05:29 UTC, Dicebot wrote:
On Sunday, 18 May 2014 at 08:02:59 UTC, bearophile wrote:
deadalnix:
If the machine code is the same, the function can be merged
by the optimizer.
But in general isn't it more efficient to not generate bloat
instead of generating it, detecting it, and removing it?
Bye,
bearophile
It is much more difficult task I believe as template bodies can
change dramatically even from a slightest change in parameter
types. Compiler needs to prove instance equivalence in some way
to do this which sounds harder than just comparing result
assembly.
Comparing assemble at link time is an option. Comparing IR is
another (LLVM does this).