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: Fix handling of ASM_EXPR operands


On Thu, Jul 08, 2004 at 11:04:40AM -0400, Diego Novillo wrote:
> ! 	/* Clobber all call-clobbered variables (or .GLOBAL_VAR if we
> ! 	   decided to group them).  */
> ! 	if (global_var)
> ! 	  add_stmt_operand (&global_var, stmt, opf_is_def, prev_vops);
> ! 	else
> ! 	  EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i,
>   	      {
> ! 		tree var = referenced_var (i);
> ! 		add_stmt_operand (&var, stmt, opf_is_def, prev_vops);
> ! 	      });
>   
> ! 	/* Now clobber all addressables.  */
> ! 	EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, i,
> ! 	    {
> ! 	      tree var = referenced_var (i);
> ! 	      add_stmt_operand (&var, stmt, opf_is_def, prev_vops);
> ! 	    });

Isn't addressable_vars a superset of call_clobbered_vars?
In which case I'd think you'd want

	if (global_var)
	  {
	    add_stmt_operand (&global_var, stmt, opf_is_def, prev_vops);

	    EXECUTE_IF_AND_COMPL_IN_BITMAP (addressable_vars,
		call_clobbered_vars, 0, i,
		{
		  tree var = referenced_var (i);
		  add_stmt_operand (&var, stmt, opf_is_def, prev_vops);
		});
	  }
	else
	  {
	    EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, i,
	      {
		tree var = referenced_var (i);
		add_stmt_operand (&var, stmt, opf_is_def, prev_vops);
	      });
	  }


r~


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