[fpc-devel] Peephole optimizer tai class change proposals

Jonas Maebe jonas at freepascal.org
Sun Oct 3 14:10:16 CEST 2021

On 03/10/2021 14:04, J. Gareth Moreton via fpc-devel wrote:
> I'm aware that the tai class declares an "optinfo" field, although I'm
> uncertain if this is safe to use or not given it's wrapped by an
> conditional define and is of type Pointer.

It's wrapped under {$ifndef NOOPT}, because it's intended for use by
assembler optimisers and when NOOPT is defined, no assembler optimisers
are included.

It's defined as pointer because it's a field of an abstract base class
in a unit that has no dependencies on target-specific units, and the
actual type could be different for different target architectures.

Its purpose is indeed to attach a pointer to a record with extra
information that is only collected/updated during the optimisation phase.


More information about the fpc-devel mailing list