* 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:
florian 2018-04-04 21:39:44 +00:00
parent fff6e0ecdb
commit 512328deee
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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