- cseDef *cdp = item;
- V_ARG(eBBlock *,src);
- bitVect *outs ;
-
- /* if this is a global variable and this block
- has a function call then delete it */
- if (isOperandGlobal(cdp->sym) && src->hasFcall)
- return 1;
-
- /* if this is pointer get then it will be killed
- if there is a pointer set for the same pointer
- in this block */
- if (POINTER_GET(cdp->diCode) &&
- bitVectBitValue(src->ptrsSet,
- IC_LEFT(cdp->diCode)->key))
- return 1;
-
- /* if assignment to iTmep then if right is defined
- elsewhere kill this one */
- if (ASSIGNMENT(cdp->diCode) &&
- !POINTER_SET(cdp->diCode) &&
- IS_ITEMP(IC_RESULT(cdp->diCode)) &&
- IS_SYMOP(IC_RIGHT(cdp->diCode)) &&
- bitVectBitsInCommon(src->outDefs,OP_DEFS(IC_RIGHT(cdp->diCode))))
- return 1;
+ cseDef *cdp = item;
+ V_ARG (eBBlock *, src);
+ bitVect *outs;
+
+ /* if this is a global variable and this block
+ has a function call then delete it */
+ if (isOperandGlobal (cdp->sym) && src->hasFcall)
+ return 1;
+
+ /* if this is pointer get then it will be killed
+ if there is a pointer set for the same pointer
+ in this block */
+ if (POINTER_GET (cdp->diCode) &&
+ bitVectBitValue (src->ptrsSet,
+ IC_LEFT (cdp->diCode)->key))
+ return 1;
+
+ /* if assignment to iTmep then if right is defined
+ elsewhere kill this one */
+ if (ASSIGNMENT (cdp->diCode) &&
+ !POINTER_SET (cdp->diCode) &&
+ IS_ITEMP (IC_RESULT (cdp->diCode)) &&
+ IS_SYMOP (IC_RIGHT (cdp->diCode)) &&
+ bitVectBitsInCommon (src->outDefs, OP_DEFS (IC_RIGHT (cdp->diCode))))
+ return 1;
+
+ /* if we find it in the defSet of this block */
+ if (bitVectBitsInCommon (src->defSet, OP_DEFS (cdp->sym)))
+ return 1;
+
+ /* if in the outdef we find a definition other than this one */
+ /* to do this we make a copy of the out definitions and turn */
+ /* this one off then check if there are other definitions */
+ bitVectUnSetBit (outs = bitVectCopy (src->outDefs),
+ cdp->diCode->key);
+ if (bitVectBitsInCommon (outs, OP_DEFS (cdp->sym)))
+ {
+ setToNull ((void **) &outs);
+ return 1;
+ }