mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 11:48:04 +02:00
* include loop unrolling in -O3, as it is done carefully, it is beneficial on average
git-svn-id: trunk@38687 -
This commit is contained in:
parent
fff6e0ecdb
commit
512328deee
@ -369,7 +369,7 @@ interface
|
||||
{ switches being applied to all CPUs at the given level }
|
||||
genericlevel1optimizerswitches = [cs_opt_level1,cs_opt_peephole];
|
||||
genericlevel2optimizerswitches = [cs_opt_level2,cs_opt_remove_emtpy_proc];
|
||||
genericlevel3optimizerswitches = [cs_opt_level3,cs_opt_constant_propagate,cs_opt_nodedfa,cs_opt_use_load_modify_store];
|
||||
genericlevel3optimizerswitches = [cs_opt_level3,cs_opt_constant_propagate,cs_opt_nodedfa,cs_opt_use_load_modify_store,cs_opt_loopunroll];
|
||||
genericlevel4optimizerswitches = [cs_opt_level4,cs_opt_reorder_fields,cs_opt_dead_values,cs_opt_fastmath];
|
||||
|
||||
{ whole program optimizations whose information generation requires
|
||||
|
@ -141,7 +141,11 @@ unit optloop;
|
||||
begin
|
||||
replaceinfo.node:=tfornode(node).left;
|
||||
replaceinfo.value:=tordconstnode(tfornode(node).right).value;
|
||||
end;
|
||||
end
|
||||
else
|
||||
{ we consider currently unrolling not beneficial, if we cannot get rid of the for completely, this
|
||||
might change if a more sophisticated heuristics is used (FK) }
|
||||
exit;
|
||||
|
||||
{ let's unroll (and rock of course) }
|
||||
for i:=1 to unrolls do
|
||||
|
Loading…
Reference in New Issue
Block a user