Hi,
I'm trying to reduce the number of recompilation needed of units.
Currently compiler very often recompiles due to possibility of changed
inlined functions being present. Attached patch tries store this info in
ppu (whether inlined functions are present). Is this a good patch ?
Btw, question: is po_inline set for a pd's procoptions when
optimizations are disabled (so functions are not inlined anyway, I assume?)
Micha
Index: symdef.pas
===
--- symdef.pas (revision 4846)
+++ symdef.pas (working copy)
@@ -3135,6 +3135,8 @@
ppufile.putbyte(sizeof(funcretloc[callerside]));
ppufile.putdata(funcretloc[callerside],sizeof(funcretloc[callerside]));
end;
+if (po_inline in procoptions) then
+ ppufile.header.flags := ppufile.header.flags or uf_has_inline;
end;
Index: fppu.pas
===
--- fppu.pas(revision 4846)
+++ fppu.pas(working copy)
@@ -1232,6 +1232,7 @@
if (pu.u.interface_crcpu.interface_checksum) or
(
((ppufile.header.flags and uf_release)=0) and
+ ((ppufile.header.flags and uf_has_inline)0) and
(pu.u.crcpu.checksum)
) then
begin
Index: ppu.pas
===
--- ppu.pas (revision 4846)
+++ ppu.pas (working copy)
@@ -147,6 +147,7 @@
uf_uses_variants = $4; { this unit uses variants }
uf_has_resourcefiles = $8; { this unit has external resources (using $R
directive)}
uf_has_exports = $10; { this module or a used unit has exports }
+ uf_has_inline = $20; { this unit exports inlined functions }
type
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel