Author: rramanar
Date: 2011-04-28 01:00:34 -0400 (Thu, 28 Apr 2011)
New Revision: 3575
Modified:
trunk/osprey/be/lno/cache_model.cxx
trunk/osprey/common/com/config.cxx
Log:
This update enhances performance of the compiled code on X8664
when using the -O3 flag.
The main change here is enabling -OPT:roundoff=2 at -O3 instead
of -OPT:roundoff=1. This change enables fast-math functions,
aggressive loop nest optimizations, reassociation on floating
point expressions and more aggressive round-off settings.
These aggressive floating point optimizations improve performance
when using the -O3 flag but may affect floating point accuracy.
The use of -fp-accuracy=relaxed in addition to -O3 is recommended
for cases which need more floating point accuracy.
-fp-accuracy=relaxed automatically sets -OPT:roundoff=1.
User may also use -OPT:roundoff=1.
During subsequent tuning we found that the bad
reference bias heuristic affects the computed cache costs
and leads to incorrect choice of inner loops and is thus ignored.
Code reviewed by Sun Chan.
Modified: trunk/osprey/be/lno/cache_model.cxx
===================================================================
--- trunk/osprey/be/lno/cache_model.cxx 2011-04-28 02:20:14 UTC (rev 3574)
+++ trunk/osprey/be/lno/cache_model.cxx 2011-04-28 05:00:34 UTC (rev 3575)
@@ -6739,6 +6739,9 @@
iloop[s] = i;
}
+#ifndef TARG_X8664
+ // Ignoring bad reference bias heuristic to allow the right choice of inner
loop
+ // Only do this for X8664
if (depth != required_inner && arl->Num_Bad()) {
INT nbodies = 1;
INT i;
@@ -6751,6 +6754,8 @@
}
*cycles_per_iter += bias / nbodies;
}
+#endif /* TARG_X8664 */
+
if (Debug_Cache_Model) {
fprintf(TFile, "*** END CACHE MODEL (REQUIRED INNER LOOP=%d, ",
required_inner);
Modified: trunk/osprey/common/com/config.cxx
===================================================================
--- trunk/osprey/common/com/config.cxx 2011-04-28 02:20:14 UTC (rev 3574)
+++ trunk/osprey/common/com/config.cxx 2011-04-28 05:00:34 UTC (rev 3575)
@@ -1319,6 +1319,14 @@
Aggregate_Alignment = 16;
if ( !Vcast_Complex_Set && Opt_Level > 1 )
Vcast_Complex = TRUE;
+ if (Opt_Level > 2) {
+ //
+ // Enabling malloc_algorithm at O3
+ //
+ if (!OPT_Malloc_Alg_Set)
+ OPT_Malloc_Alg = 1;
+ }
+
#endif
}
@@ -1634,7 +1642,8 @@
#if defined(TARG_IA64) || defined(TARG_LOONGSON)
Roundoff_Level = ROUNDOFF_ASSOC;
#else
- Roundoff_Level = ROUNDOFF_SIMPLE;
+ // Enabling OPT:RO=2 at O3
+ Roundoff_Level = ROUNDOFF_ASSOC;
#endif
#endif
}
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel