[fpc-devel] [Suggestion] Enumeration range-check intrinsic
Sven Barth
pascaldragon at googlemail.com
Sun Jul 14 11:15:06 CEST 2019
Am 14.07.2019 um 04:08 schrieb J. Gareth Moreton:
>
> Just a thought that I'd chuck in on this... I did wonder how practical
> it would be to store checksums of all compiled procedures and the like
> and to look for collisions. When studying how the compiler is built,
> I noticed a lot of the internal methods, due to conditional defines,
> would compile into identical code, so merging them would reduce the
> binary size if the linker is able to strip out procedures that are
> never called. Granted, I haven't done research on how Free Pascal
> does Whole Program Optimisation yet, especially as it requiring a
> separate compilation pass has always put me off. I would have thought
> that the linker should be able to handle it right there and then
> because it has all the information it needs.
>
That would be a possible approach to use if the output format does not
support combining equal sections. PE/COFF's COMDAT sections do have a
flag that says that they need to have equal content (there are also
other possibilities). Don't know right now whether ELF does.
Regards,
Sven
More information about the fpc-devel
mailing list