Author: ycwu Date: 2011-08-10 22:16:07 -0400 (Wed, 10 Aug 2011) New Revision: 3715
Modified: trunk/osprey/common/com/wn_util.h Log: For volatile field in a struct, the volatile flag is not set correctly in expanding WHIRL to OPs. The CG will reorder the store because it's not volatile. This patch will return the right volatile flag for MSTORE and ISTORE. Modified: trunk/osprey/common/com/wn_util.h =================================================================== --- trunk/osprey/common/com/wn_util.h 2011-08-09 22:07:25 UTC (rev 3714) +++ trunk/osprey/common/com/wn_util.h 2011-08-11 02:16:07 UTC (rev 3715) @@ -453,7 +453,8 @@ OPCODE_operator(opc) == OPR_MSTORE) { TY_IDX pointed = TY_pointed (Ty_Table[WN_ty (wn)]); DevAssert(pointed, ("TY_pointed of ISTORE/MSTORE type is NULL")); - return TY_is_volatile(pointed); + return TY_is_volatile(pointed) || + TY_is_volatile(WN_object_ty(wn)); } else { return TY_is_volatile(WN_ty(wn)) || TY_is_volatile(WN_object_ty(wn)) || ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel