Re: [fpc-devel] -Oodfa
Am 30.12.2011 02:00, schrieb Martin: Florian wrote at http://bugs.freepascal.org/view.php?id=20907 FPC has a good enough dfa, however it is only activated when compiling with -Oodfa: c:\fpc\svn\compilerfpc ..\tw20907 -vw -Oodfa Is that documented somewhere ? Is that production read or beta? Beta. I'am not aware of any missing stuff, but it's mainly untested. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
Florian Klämpfl wrote: Am 30.12.2011 02:00, schrieb Martin: Florian wrote at http://bugs.freepascal.org/view.php?id=20907 c:\fpc\svn\compilerfpc ..\tw20907 -vw -Oodfa Is that documented somewhere ? Is that production read or beta? Beta. I'am not aware of any missing stuff, but it's mainly untested. Maybe add a nightly testsuite run for it? Micha ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
In our previous episode, Florian Kl?mpfl said: c:\fpc\svn\compilerfpc ..\tw20907 -vw -Oodfa Is that documented somewhere ? Is that production read or beta? Beta. I'am not aware of any missing stuff, but it's mainly untested. I tried yesterday, and couldn't cycle with it. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
On 30 Dec 2011, at 10:26, Florian Klämpfl wrote: Beta. I'am not aware of any missing stuff, but it's mainly untested. I tried to activate by default it during the development of the JVM port (since the JVM will abort if it detects an uninitialized read), but it caused compiler crashes. I'll see if I can create isolated test cases. Jonas___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
30.12.2011 14:42, Jonas Maebe пишет: On 30 Dec 2011, at 10:26, Florian Klämpfl wrote: Beta. I'am not aware of any missing stuff, but it's mainly untested. I tried to activate by default it during the development of the JVM port (since the JVM will abort if it detects an uninitialized read), but it caused compiler crashes. I'll see if I can create isolated test cases. The present DFA doesn't work for code which uses exceptions, including implicit exception handling (read: a good 50% of all codebase). In the meantime I tried adapting DFA, or more precisely, definite assignment analyzer, from Mono compiler (Mantis #15523). It uses a different approach, which works fine with exceptions, but is not suited well (if at all) for determining live range of variables. See notes on Mantis #15523 for details. With #15523 applied, the compiler can be cycled, but it emits hundreds of warnings which have to be fixed because cycling is done with -Sew these days. In particular, we have to solve the FillChar() issue before any DFA is enabled by default. Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
Am 30.12.2011 12:13, schrieb Sergei Gorelkin: 30.12.2011 14:42, Jonas Maebe пишет: On 30 Dec 2011, at 10:26, Florian Klämpfl wrote: Beta. I'am not aware of any missing stuff, but it's mainly untested. I tried to activate by default it during the development of the JVM port (since the JVM will abort if it detects an uninitialized read), but it caused compiler crashes. I'll see if I can create isolated test cases. The present DFA doesn't work for code which uses exceptions, Indeed, I can fix this. including implicit exception handling (read: a good 50% of all codebase). In the meantime I tried adapting DFA, or more precisely, definite assignment analyzer, from Mono compiler (Mantis #15523). It uses a different approach, which works fine with exceptions, but is not suited well (if at all) for determining live range of variables. See notes on Mantis #15523 for details. 15523 has different aims than optdfa. With #15523 applied, the compiler can be cycled, but it emits hundreds of warnings which have to be fixed because cycling is done with -Sew these days. In particular, we have to solve the FillChar() issue before any DFA is enabled by default. I played with this yesterday and what about extended Initialize to support unmanaged types? In case of an unmanaged type it just calls fillchar. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
On 30 Dec 2011, at 12:13, Sergei Gorelkin wrote: With #15523 applied, the compiler can be cycled, but it emits hundreds of warnings which have to be fixed because cycling is done with -Sew these days. Passing an uninitialized variable to a var-parameter should cause a hint, not a warning. Jonas___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
30.12.2011 15:18, Florian Klämpfl пишет: I played with this yesterday and what about extended Initialize to support unmanaged types? In case of an unmanaged type it just calls fillchar. I was rather thinking about 'varout' (or so) parameter type, which was suggested already several times in the past. Extending Initialize is a) different from Delphi (Delphi ignores initialize(unmanaged_type)), b) does not affect already existing code, c) not applicable to all cases where FillChar is used (e.g. FillChar(x, sizeof(foo)+n*sizeof(bar)) Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
Re: [fpc-devel] -Oodfa
Am 30.12.2011 12:47, schrieb Sergei Gorelkin: 30.12.2011 15:18, Florian Klämpfl пишет: I played with this yesterday and what about extended Initialize to support unmanaged types? In case of an unmanaged type it just calls fillchar. I was rather thinking about 'varout' (or so) parameter type, which was suggested already several times in the past. My concern about varout is that it is a rather big change of the language ... Extending Initialize is a) different from Delphi (Delphi ignores initialize(unmanaged_type)), b) does not affect already existing code, c) not applicable to all cases where FillChar is used (e.g. FillChar(x, sizeof(foo)+n*sizeof(bar)) Sergei ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel
[fpc-devel] -Oodfa
Florian wrote at http://bugs.freepascal.org/view.php?id=20907 FPC has a good enough dfa, however it is only activated when compiling with -Oodfa: c:\fpc\svn\compilerfpc ..\tw20907 -vw -Oodfa Is that documented somewhere ? Is that production read or beta? fpc -i only lists: Supported Optimizations: REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASMCSE LOOPUNROLL TAILREC CSE Supported Whole Program Optimizations: All DEVIRTCALLS OPTVMTS SYMBOLLIVENESS ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel