A few general principles have been followed when designing the FPC implementation of
- All information necessary to generate a WPO feedback file for a program is always
stored in the ppu files. This means that it is possible to use a generic RTL for WPO
(or, in general, any compiled unit). It does mean that the RTL itself will then not be
optimized, the compiled program code and its units can be correctly optimized because
the compiler knows everything it has to know about all RTL units.
- The generated WPO feedback file is plain text. The idea is that it should be easy to
inspect this file by hand, and to add information to it produced by external tools if
desired (e.g., profile information).
- The implementation of the WPO subsystem in the compiler is very modular, so it
should be easy to plug in additional WPO information providers, or to choose at run
time between different information providers for the same kind of information. At the
same time, the interaction with the rest of the compiler is kept to a bare minimum to
- It is possible to generate a WPO feedback file while at the same time using another
one as input. In some cases, using this second feedback file as input during a third
compilation can further improve the results.