Author: yug
Date: 2012-02-07 03:16:09 -0500 (Tue, 07 Feb 2012)
New Revision: 3866
Modified:
trunk/osprey/be/opt/opt_prop.cxx
Log:
fir for bug787.
Try propagate for VAR in OPR_ASM_INPUT first, if the propagated expr is the same
kind to the original one,i.e, also a VAR. we allow this propagation. otherwise,
disable it.
Code Review: Sun Chan.
Modified: trunk/osprey/be/opt/opt_prop.cxx
===================================================================
--- trunk/osprey/be/opt/opt_prop.cxx 2012-02-01 20:15:09 UTC (rev 3865)
+++ trunk/osprey/be/opt/opt_prop.cxx 2012-02-07 08:16:09 UTC (rev 3866)
@@ -1504,9 +1504,23 @@
expr = Copy_propagate_cr(x->Opnd(i), curbb, inside_cse, in_array);
else {
// OSP_384
- if(opr == OPR_ASM_INPUT)
- x->Opnd(i)->Set_flag(CF_DONT_PROP);
- expr = NULL;
+ if(opr == OPR_ASM_INPUT) {
+ // open64.net bug787. Try propagate for VAR first, if the
propagated expr is the same
+ // kind to the original one,i.e, also a VAR. we allow this
propagation. otherwise, disable it.
+ if ( x->Opnd(i)->Kind() == CK_VAR ) {
+ CODEREP *possible_prop = Copy_propagate_cr(x->Opnd(i), curbb,
inside_cse, in_array);
+ if (possible_prop && possible_prop->Kind() ==
x->Opnd(i)->Kind())
+ expr = possible_prop;
+ else {
+ x->Opnd(i)->Set_flag(CF_DONT_PROP);
+ expr = NULL;
+ }
+ }
+ else {
+ x->Opnd(i)->Set_flag(CF_DONT_PROP);
+ expr = NULL;
+ }
+ }
}
#else
// for NVISA, the usage of asm is an array of const val,
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel