Sun:
According to Mike's suggestion, I have a revised patch for this broken
issue.
Since there are no lnoconfig_stacks in use, putting the
LNO_Iter_threshold to target specific config_targ.cxx is safe. with only the
side effect of setting the LNO_iter_threshold multiple times. Since each
backend component calls the Configure_Target once.
Another issue is that when I test the patch on an xeon E5620 workstation,
the compiler reports the machine does not support SSE4.1 which is obviously
supported.
Please help a review.
Gang
On Fri, Jul 22, 2011 at 6:37 AM, Sun Chan <sun.c...@gmail.com> wrote:
> Since this is an AMD change, can the original developer change it the
> way Mike suggested?
> Thx!
> Sun
>
> 2011/7/21 Mike Murphy <mmur...@nvidia.com>:
> > I took a quick look at the original issue in config_lno, and it seems to
> me that the simplest solution would be to reset the iter_threshold value in
> x8664/config_targ.cxx (e.g. we set some target-specific defaults in
> Preconfigure_Target). That way the change is only in the x86 branch.
> >
> > -----Original Message-----
> > From: Sun Chan [mailto:sun.c...@gmail.com]
> > Sent: Thursday, July 21, 2011 7:39 AM
> > To: C. Bergström
> > Cc: open64-devel
> > Subject: Re: [Open64-devel] Please help review a build broken fix for
> non-x86 targets [CG][LNO]
> >
> > just to be clear, what i suggested as a better solution is for any
> > implementation of target specific stuff consists of
> > at least two implementations, one generic and one specialize. This
> > way, it will not break any build, while give the specific target the
> > implementation the developer really wants. The actual implementation
> > could be templates, or weak/strong symbols
> > Naturally, any better solution is welcome. Let's put to rest any
> > argument on Is_target_xxx or ifdef.
> > Sun
> >
> > 2011/7/21 Sun Chan <sun.c...@gmail.com>:
> >> I had suggested two better solutions before. The point is, originally,
> >> before STL like style is popular, Is-Target_xxx is used to isolate
> >> target dependent stuff. Short of a better soln, and having done
> >> retarget and rehost for a very long life time (and still doing it now.
> >> )
> >> I would welcome better soln's, but definitely no #ifdefs or the
> >> proliferation of that
> >> Sun
> >>
> >> 2011/7/21 "C. Bergström" <cbergst...@pathscale.com>:
> >>> On 07/21/11 11:38 AM, shuxin yang wrote:
> >>>> Is_Target_xyz() is worse than #ifdef in the sense:
> >>>> - it dosen't improve the retargetability a bit,
> >>>> - replacing #ifdef with is_target_xyz() tends to give new
> >>>> developers false impression that open64 has high degree of
> >>>> retargetability, which is absolutely *NOT*
> >>>>
> >>>> Is_Target_syz() is illusion, not solution...
> >>> Speaking from the perspective of someone who has been involved with
> >>> 1) Multiple real world retargets
> >>> 2) Maintaining multiple targets and branches
> >>> 3) Porting and maintaining code across several OS
> >>>
> >>> #if == hell
> >>> ------------------
> >>> It doesn't immediately solve the problem, but what if all the target
> >>> specific functions were in a single file or directory? Slow and steady
> >>> progress will eventually win if there's a plan.
> >>>
> >>> I can't speak for the best solution in this case, but generally thought
> >>> to chime in..
> >>>
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------------
> >>> 5 Ways to Improve & Secure Unified Communications
> >>> Unified Communications promises greater efficiencies for business. UC
> can
> >>> improve internal communications as well as offer faster, more efficient
> ways
> >>> to interact with customers and streamline customer service. Learn more!
> >>> http://www.accelacomm.com/jaw/sfnl/114/51426253/
> >>> _______________________________________________
> >>> Open64-devel mailing list
> >>> Open64-devel@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/open64-devel
> >>>
> >>
> >
> >
> ------------------------------------------------------------------------------
> > 5 Ways to Improve & Secure Unified Communications
> > Unified Communications promises greater efficiencies for business. UC can
> > improve internal communications as well as offer faster, more efficient
> ways
> > to interact with customers and streamline customer service. Learn more!
> > http://www.accelacomm.com/jaw/sfnl/114/51426253/
> > _______________________________________________
> > Open64-devel mailing list
> > Open64-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/open64-devel
> >
> -----------------------------------------------------------------------------------
> > This email message is for the sole use of the intended recipient(s) and
> may contain
> > confidential information. Any unauthorized review, use, disclosure or
> distribution
> > is prohibited. If you are not the intended recipient, please contact the
> sender by
> > reply email and destroy all copies of the original message.
> >
> -----------------------------------------------------------------------------------
> >
>
>
> ------------------------------------------------------------------------------
> 5 Ways to Improve & Secure Unified Communications
> Unified Communications promises greater efficiencies for business. UC can
> improve internal communications as well as offer faster, more efficient
> ways
> to interact with customers and streamline customer service. Learn more!
> http://www.accelacomm.com/jaw/sfnl/114/51426253/
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
Index: osprey/be/cg/cg_loop.cxx
===================================================================
--- osprey/be/cg/cg_loop.cxx (revision 3708)
+++ osprey/be/cg/cg_loop.cxx (working copy)
@@ -8581,9 +8581,11 @@
// accurate register pressure components to fill in the currently
// boolean setting to the notion that the scheduler saw register pressure.
// So here we fill in the value for lra to use if needed.
+#ifdef TARG_X8664
if (BB_regpressure(bb,ISA_REGISTER_CLASS_float)) {
Set_BB_regpressure(bb, D_f, ISA_REGISTER_CLASS_float);
}
+#endif
// compute the number of gpr Regs Predicted
conflict_map_i = Calculate_All_Conflicts(bb, regs_in_use,
@@ -8596,9 +8598,11 @@
ISA_REGISTER_CLASS_integer) + 1;
// Now do the same for int regs
+#ifdef TARG_X8664
if (BB_regpressure(bb,ISA_REGISTER_CLASS_integer)) {
Set_BB_regpressure(bb, D_i, ISA_REGISTER_CLASS_integer);
}
+#endif
if (trace_general) {
// Now print the details of this loop
Index: osprey/be/cg/lra.cxx
===================================================================
--- osprey/be/cg/lra.cxx (revision 3708)
+++ osprey/be/cg/lra.cxx (working copy)
@@ -4287,9 +4287,11 @@
local_spills++;global_spills++;
BOOL uses_destructive_dest = FALSE;
+#ifdef TARG_X8664
if( Is_Target_Orochi() && OP_sse5( op ) ){
uses_destructive_dest = check_uses_destructive_dest(prev_tn, bb);
}
+#endif
if ((OP_same_res(op)
#ifdef TARG_X8664
Index: osprey/be/cg/whirl2ops.cxx
===================================================================
--- osprey/be/cg/whirl2ops.cxx (revision 3708)
+++ osprey/be/cg/whirl2ops.cxx (working copy)
@@ -3166,6 +3166,7 @@
WN *compare;
VARIANT variant;
+#ifdef TARG_X8664
if (opcode == OPC_V16I1V16I1SELECT) {
TN* op1 = Expand_Expr(WN_kid0(select), select, NULL);
TN* op2 = Expand_Expr(WN_kid1(select), select, NULL);
@@ -3177,6 +3178,7 @@
Expand_Select(result, op1, op2, op3, MTYPE_V16I1, FALSE, &New_OPs); //FALSE passed as dummy arg
return result;
}
+#endif
/*
* Expand the true/false before the condition
Index: osprey/common/com/config_lno.cxx
===================================================================
--- osprey/common/com/config_lno.cxx (revision 3708)
+++ osprey/common/com/config_lno.cxx (working copy)
@@ -1227,12 +1227,5 @@
Mhd_Options.L[i].TLB_Miss_Penalty;
}
}
-
- /* Value of 1 for LNO_Iter_threshold is interpreted as default in which case
- the flag is set based on target. Otherwise use user-specified value.
- */
- if(LNO_Iter_threshold == 1) {
- LNO_Iter_threshold = (Is_Target_SSE41())? 8 : 0;
- }
}
Index: osprey/common/com/x8664/config_targ.cxx
===================================================================
--- osprey/common/com/x8664/config_targ.cxx (revision 3708)
+++ osprey/common/com/x8664/config_targ.cxx (working copy)
@@ -86,6 +86,9 @@
#include "mtypes.h"
#include "stab.h"
#include "targ_sim.h"
+#ifdef BACK_END
+#include "config_lno.h"
+#endif
#if defined(FRONT_END_C) || defined(FRONT_END_CPLUSPLUS)
typedef unsigned char an_integer_kind;
@@ -715,6 +718,13 @@
FmtAssert (IS_POW2(Align_Instructions),
("-OPT:align_instructions=<n> must equal power of two"));
+#ifdef BACK_END
+ /* Value of LNO_Iter_threshold is interpreted as default in which case
+ the flag is set based on target. Otherwise use user-specified value.
+ */
+ LNO_Iter_threshold = (Is_Target_SSE41())? 8 : 0;
+#endif
+
return;
}
------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts.
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel