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.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to