Am 16.07.2018 um 18:54 schrieb J. Gareth Moreton: > In that situation, yes it is. Max is a very simple function though, and it > gets > more complicated if it appears in another pure function where the parameters > are > variables, but whose values are deterministic. Actually, this might be more workable than I thought at first. The "Thing from -O3" that carries out the simplification in my example (it also works for mixed things like "x:= 1; z:= Max(x, 2);") is exactly the constant propagation optimization. It might be enough to simply force a few localized optimizations after inlining and before simplifying. I'll have a look into that later - this would be useful for many cases regardless of pure functions.
-- Regards, Martok _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel