[lld] r244934 - Template OutputSection only over Is64Bit.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 21:31:02 PDT 2015
On 14 August 2015 at 00:19, Rui Ueyama <ruiu at google.com> wrote:
> I think I feel the same way as Sean's. This change does not seem
> particularly good or bad, but this is indeed a micro-optimization which
> might be a premature optimization at this development stage. And the new
> code is a little bit harder than before (although very little) because
> previously ELFT was everywhere if the ELF type matters, and that was pretty
> straightforward. Now we have two cases -- full ELFT is available or only
> 64-bit or not is available.
Please be sure to take r244969 in context.
We now have a native Header structure that is really easy to print in
a debugger, is faster and endian independent.
It is also now isolated in a base class. All the classes that directly
access ELf structures are templated over ELFT.
As for premature optimizations: short of an argument why the old code
would be faster, it is a good precaution to change it now since a
change in the future would be more expensive.
Last but not least, it is ludicrous to say that having to add
::Is64Bits somewhere is a noticeable merge pain. We have spent way
more time discussing this that would have taken anyone to just update
the change.
Cheers,
Rafael
More information about the llvm-commits
mailing list