[fpc-devel] Peephole optimizer tai class change proposals
J. Gareth Moreton
gareth at moreton-family.com
Thu Oct 7 12:57:32 CEST 2021
Just made some more additions, this time introducing some fundamental
extra optimisation information classes that I can see myself using right
off the bat.
https://gitlab.com/CuriousKit/optimisations/-/compare/main...opt-info-list?from_project_id=29565238
I plan to use the tai one for pointing jumps to labels, a simple Boolean
one for flagging potential label removals in some optimisations that may
be difficult to justify without such information (see some of my
previous e-mails) and the Register/value pair for tracking known
register values.
Gareth aka. Kit
On 06/10/2021 05:20, J. Gareth Moreton via fpc-devel wrote:
> Would you approve something like this, Jonas? I admit it's not
> properly tested yet, but I'm descending from TLinkedListItem (and the
> descendant class can itself be descended from) and the TAOptObj class
> handles allocation and cleanup of extra information. I'm not sure how
> practical it is, but I'm taking advantage of the linked list system by
> allowing tai objects to have more than one extra information object
> associated with it.
>
> https://gitlab.com/CuriousKit/optimisations/-/compare/main...opt-info-list?from_project_id=29565238
>
>
> I hope you can view it!
>
> It might be worth changing the defintion of optinfo from Pointer to
> TExtraOptInfo (the TLinkedListItem descendant), but I don't know if
> this may break something that's already present.
>
> One thing I did miss was a "typ" field for TExtraOptInfo so you can
> look up to see what kind of object it is without relying on ClassType
> etc, but I don't know where and how to define such an enumeration
> because the different types would be platform-dependent. All I can
> think of currently is an include file for each platform, which comes
> with its own problems.
>
> Gareth aka. Kit
>
>
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
More information about the fpc-devel
mailing list