[fpc-devel] XML node dump feature

Jonas Maebe jonas at freepascal.org
Tue Jun 25 20:56:10 CEST 2019


On 25/06/2019 20:28, denisgolovan wrote:
>> You don't need any kind of new source code constructs for optimizing
>> that. The LLVM backend can already do that; in the worst case, only when
>> LTO is enabled (in case the function is declared in another unit)
> 
> I am pretty sure LLVM is advanced enough to make that analysis itself for primitive types.
> But what about something more interesting - arrays, matrices, trees, hash tables, etc?

Complex types are built from primitive types. And if FPC can verify the
"pure" attribute is valid, then LLVM can probably also come up with it.
In fact, if FPC can verify it is valid, it can also come up with it
itself and add it as an annotation in the LLVM bitcode.


Jonas


More information about the fpc-devel mailing list