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: [PATCH] Handle RESULT_DECL in set_uids_in_ptset (PR tree-optimization/32353)


On 17 June 2007 07:53, Jakub Jelinek wrote:

> I'm not sure if doing this for any DECL_P is the right thing to do:
> 
>           if (var_can_have_subvars (vi->decl)
>               && get_subvars_for_var (vi->decl))
> 
> The former will return false for !DECL_P or MTAG_P, but the latter:
> 
> static inline subvar_t
> get_subvars_for_var (tree var)
> {
>   subvar_t subvars;
> 
>   gcc_assert (SSA_VAR_P (var));
> 
> where SSA_VAR_P is {VAR,PARM,RESULT}_DECL or SSA_NAME thereof.
> But SSA_NAME is not DECL_P so only those 3 tree codes are suitable.
> The other branch of this if can handle any kind of DECL_P I guess,
> so we could do:
>       else if ((TREE_CODE (vi->decl) == VAR_DECL
>                 || TREE_CODE (vi->decl) == PARM_DECL
>                 || TREE_CODE (vi->decl) == RESULT_DECL)
> 	       && var_can_have_subvars (vi->decl)
> 	       && get_subvars_for_var (vi->decl))

  Or perhaps even re-use SSA_VAR_P ? 

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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