12.01.2019, 19:44, "Benito van der Zander" :Hi, something that appears to help is to put units in the interface uses rather than the implementation uses.When the unit mentioned in the interface uses, uses the first unit in its implementation uses, it can inline the functions from the first
Hi,
something that appears to help is to put units in the interface uses
rather than the implementation uses.
When the unit mentioned in the interface uses, uses the first unit in
its implementation uses, it can inline the functions from the first
unit. Although I would have expected it
12.01.2019, 16:03, "Sven Barth via fpc-pascal" :With WPO you need to compile at least twice as well as the first pass only collects information and acts on it in the second pass. Is it possible to make Lazarus do that automatically?According to Jonas it's a bit too unpractical. -- Regards,Denis
12.01.2019, 15:32, "Jonas Maebe" :
> It's not yet integrated in the compiler, so you have to do it manually
> right now:
> a) compile everything with -al (including the RTL etc; add OPT="-a" to
> the make command)
> b) go in all the unit directories, and assemble the files to bitcode
> using
Am Sa., 12. Jan. 2019, 13:05 hat denisgolovan
geschrieben:
> > However, what you actually can do, is manually recompile all units of
> your program
> > multiple times. While this won't help with inline functions called
> > before they are parsed in those same units, it will allow inlining of
> >
On 12/01/19 13:05, denisgolovan wrote:
12.01.2019, 14:53, "Jonas Maebe" :
Not at this time (unless you use the LLVM backend).
Could you give some hints on how to enable WPO/LTO under LLVM backend?
http://wiki.freepascal.org/LLVM does not seem to mention anything on that.
It's not yet
12.01.2019, 14:53, "Jonas Maebe" :
> Not at this time (unless you use the LLVM backend).
Could you give some hints on how to enable WPO/LTO under LLVM backend?
http://wiki.freepascal.org/LLVM does not seem to mention anything on that.
> However, what you actually can do, is manually recompile
On 12/01/19 12:47, denisgolovan wrote:
07.01.2019, 00:45, "Jonas Maebe" :
Not besides breaking your dependency cycles.
Sorry, but for necro-posting, but shouldn't WPO is supposed to help to inline
functions as well?
Not at this time (unless you use the LLVM backend). However, what you
07.01.2019, 00:45, "Jonas Maebe" :
> Not besides breaking your dependency cycles.
Sorry, but for necro-posting, but shouldn't WPO is supposed to help to inline
functions as well?
--
Regards,
Denis Golovan
___
fpc-pascal maillist -
On 03/01/19 00:10, Benito van der Zander wrote:
The one-pass thing is probably the reason it now complains about all
inline functions in dependency cycles, unit A uses unit B that uses unit
A. Then unit A can't inline something unit B. Any way around that?
Not besides breaking your dependency
Hi,
procedure TStrBuilder.append(const s: RawByteString);
begin
append(pchar(pointer(s)), length(s)); //inlinetest.pas(24,3) Note:
Call to subroutine "procedure TStrBuilder.append(const p:PChar;const
l:Int64);" marked as inline is not inlined
end;
this seems to help
procedure
On 2019-01-02 00:19, Benito van der Zander wrote:
procedure TStrBuilder.append(const s: RawByteString);
begin
append(pchar(pointer(s)), length(s)); //inlinetest.pas(24,3) Note: Call
to subroutine "procedure TStrBuilder.append(const p:PChar;const
l:Int64);" marked as inline is not inlined
Hi Jonas,
That is reasonable. Perhaps the hint should mention that?
But why is this still not inlined::
type TStrBuilder = object
procedure append(const p: pchar; const l: SizeInt); inline;
procedure append(const s: RawByteString);
end;
implementation
procedure TStrBuilder.append(const
On 01/01/19 22:38, Benito van der Zander wrote:
and why is it not inlining the count and append call of this string
builder? It is not using any implementation only function
Routines can only be inlined if they are called after their
implementation has been parsed. FPC compiles everything in
Hi,
and why is it not inlining the count and append call of this string
builder? It is not using any implementation only function
unit inlinetest;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils,math;
type TStrBuilder = object
protected
next, bufferend: pchar; //next empty pchar
Am Sa., 29. Dez. 2018, 15:23 hat Benito van der Zander
geschrieben:
> Hi,
>
> after updating from fpc 3.1 to fpc 3.3, I am getting a lot of "function
> was not inlined" warnings, e.g. when an inline function depends on a
> function not declared in the interface part like:
>
> unit inlinetest;
>
On 12/29/18 9:16 AM, Benito van der Zander wrote:
Fpc 3.1 did not show any warning in this case (although now that I
investigate it, fpc 3.1 also did not seem to inline it despite not showing
the warning)
i think, but am not totally sure, that the addition of the warning is a recently
added
Hi,
after updating from fpc 3.1 to fpc 3.3, I am getting a lot of "function
was not inlined" warnings, e.g. when an inline function depends on a
function not declared in the interface part like:
unit inlinetest;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils;
function
On Thu, 19 Oct 2006, Marc Santhoff wrote:
Hi,
when using inline on a procedure or function, does it completely avoid
the call by copying anything inside the begin ... end block to the
right place?
Yes, that's the idea.
Michael.
___
fpc-pascal
Am Donnerstag, den 19.10.2006, 09:05 +0200 schrieb Michael Van Canneyt:
On Thu, 19 Oct 2006, Marc Santhoff wrote:
Hi,
when using inline on a procedure or function, does it completely avoid
the call by copying anything inside the begin ... end block to the
right place?
Yes,
Hi,
when using inline on a procedure or function, does it completely avoid
the call by copying anything inside the begin ... end block to the
right place?
Yes, that's the idea.
INLINE is a suggestion, not obligation: sometimes they are compiled
with CALL. It looks especially not great
Hi,
when using inline on a procedure or function, does it completely avoid
the call by copying anything inside the begin ... end block to the
right place?
Example:
function anythingFunc(v: integer):real; inline;
begin
... some calculations ...
end;
function TMyObject.callAnything(v:
22 matches
Mail list logo