On Thu, Nov 10, 2022 at 8:10 PM J. Gareth Moreton via fpc-devel <
fpc-devel@lists.freepascal.org> wrote:

> Hi everyone,
> This has been something that has been on my mind for a while now, but
> with my increasingly more complex optimisations being developed for the
> Free Pascal Compiler and the code becoming an ever bigger spiderweb of
> conditions, it got me to start wondering... might compiler optimisation
> be a candidate for AI?

An interersting thought.  On a slightly different tangent, could the
language rules itself not be codified as a matrix so that one can use
matrix algebra to perform node level optimizations via similarity
transforms?  Alternatively, if you want to test a candidate optimization
idea, check if there is a feasible solution using matrix algebra (in other
words check if it satisfies all the language rules and the original
intent).  My simplistic view of Pascal is that the language rules should
form a set of linear equations (else the language specification is overly
complicated), so linear algebra is ideal for checking if a potential
solution satisfies the language rules.  Also one could cast a node level
optimization as a (similarity?) transformation matrix and apply this to the
basic nodes generated by the parser.

So there is perhaps some scope for "simple" algebra before diving into
stochastic optimization techniques.
fpc-devel maillist  -  fpc-devel@lists.freepascal.org

Reply via email to