Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-08

Documentation problems

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

leledumbo

After downloading the docs, I notice that there's a difference between downloaded version and the one on the site. fpctoc in downloaded version doesn't have any link to FCL docs.

PS: Oh, God... The optimization options are still the old ones! Is there any links to those -OoXXX?

View this message in context: http://www.nabble.com/Documentation-problems-tp19066821p19066821.html Sent from the Free Pascal - General mailing list .
tom_at_work
to leledumbo

Hello,

leledumbo wrote 10 lines
After downloading the docs, I notice that there's a difference between downloaded version and the one on the site. fpctoc in downloaded version doesn't have any link to FCL docs. PS: Oh, God... The optimization options are still the old ones! Is there any links to those -OoXXX?

Use fpc -i to query the available optimization options.

Regards,
Thomas

tom_at_work
to leledumbo

Hello,

leledumbo wrote 8 lines
Thomas Schatzl wrote: > > Use fpc -i to query the available optimization options. > I know that, but what I need is an explanation about what each optimization does. Plus, what are the defaults?

From the programmer's manual about the $OPTIMIZATION switch (you need very recent docs for this) and the "Optimization" chapter:

Default is no optimization at all, i.e. all of the below disabled.

REGVAR - Try to keep local values in registers, avoiding memory traffic.

UNCERTAIN - Use uncertain optimizations, i.e. make some assumptions about pointer aliasing which give more opportunities in the other optimizations but may result in incorrect code otherwise; see the documentation for the rules.

SIZE - Try to generate smaller code; note that this counters some other optimizations.

STACKFRAME - Do not generate stackframes if possible (e.g. for leaf procedures).

PEEPHOLE - Peephole optimizations. Try to find code patterns that either do nothing (and remove them) or replace them with more efficient ones. See e.g. http://en.wikipedia.org/wiki/ Peephole_optimization for more information.

ASMCSE - Use common subexpression elimination at the assembler level.

LOOPUNROLL - Unroll loops: small loops are unrolled, i.e. loop bodies inlined multiple times into the code (plus some setup code) - note that specifying the target processor has great influence on what is considered "small" (e.g. -Op<x>)

TAILREC - Automatically try to convert tail recursions into iterations.

CSE - Use common subexpression elimination, for more information see e.g. http://en.wikipedia.org/wiki/Common_subexpression_elimination

DFA - Use data flow analysis, i.e. gathering more information about the data flow in the program in order to make other optimizations more effective. See e.g. http://en.wikipedia.org/wiki/ Data_flow_analysis for more information.

There are also LEVEL<1-3> "optimizations" that are shortcuts for some of the above.

Regards,
Thomas

Michael Van Canneyt
to leledumbo
leledumbo wrote 8 lines
Thomas Schatzl wrote: > > From the programmer's manual ... (you > need very recent docs for this) ... chapter: > Can I get it? Is it planned to be released with 2.4.0?

You can get the sources, or I can send a version in private if you wish.

Michael.