This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Fix handling of function calls with side effects


On Fri, 2004-03-26 at 16:17, Diego Novillo wrote:

> +	/* Clobber memory for asm ("" : : : "memory");  */
> +	if (global_var
> +	    || bitmap_first_set_bit (call_clobbered_vars) >= 0)
>
As pointed out by Richard, this is always true.  Fixed with


	* tree-ssa-operands.c (get_stmt_operands): Remove always-true
	predicate.

Index: tree-ssa-operands.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-operands.c,v
retrieving revision 1.1.2.18
diff -d -c -p -r1.1.2.18 tree-ssa-operands.c
*** tree-ssa-operands.c	26 Mar 2004 21:11:49 -0000	1.1.2.18
--- tree-ssa-operands.c	26 Mar 2004 23:29:40 -0000
*************** get_stmt_operands (tree stmt)
*** 770,780 ****
  	  }
  
  	/* Clobber memory for asm ("" : : : "memory");  */
! 	if (global_var
! 	    || bitmap_first_set_bit (call_clobbered_vars) >= 0)
! 	  for (link = ASM_CLOBBERS (stmt); link; link = TREE_CHAIN (link))
! 	    if (!strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory"))
! 	      add_call_clobber_ops (stmt, &prev_vops);
        }
        break;
  
--- 770,778 ----
  	  }
  
  	/* Clobber memory for asm ("" : : : "memory");  */
! 	for (link = ASM_CLOBBERS (stmt); link; link = TREE_CHAIN (link))
! 	  if (!strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory"))
! 	    add_call_clobber_ops (stmt, &prev_vops);
        }
        break;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]