[fpc-devel] Recompilation optimization patch

2006-10-10 Thread Micha Nelissen

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


Re: [fpc-devel] Recompilation optimization patch

2006-10-10 Thread Peter Vreman
 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?)

This is not correct. Also other things like calling conventions can change
in delphi mode. In ppu.pas at line 33 you can enable {$define INTFPPU}
then a ppu.intf will be generated that contains the info from the
interface only.

A rewrite of the unit handling is planned, but that will be a 2.3 todo.



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Recompilation optimization patch

2006-10-10 Thread Micha Nelissen
Peter Vreman wrote:
 This is not correct. Also other things like calling conventions can change
 in delphi mode. In ppu.pas at line 33 you can enable {$define INTFPPU}

Because the calling convention is only specified in the implementation ?

Micha
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel