Message ID | 51CC8391.5000900@redhat.com |
---|---|
State | New |
Headers | show |
On Thu, Jun 27, 2013 at 02:25:21PM -0400, Andrew MacLeod wrote: > I'm doing some trial file conversions to my proposed wrapper > classes, I'm seeing a couple of places which aren't mapping > properly (they triggered compile errors), and I think its because > there is a couple of bugs regarding the use of IDENTIFIERS in > ssanames.. (I wasn't even aware you could have non-var_decls...) > so this is just a sanity check :-) If ssa_name.var is IDENTIFIER_NODE, it is just like ssa_name.var == NULL, i.e. anonymous SSA_NAME, just that in the dumps it is given some name and not just _NNN. > in tree-ssanames.c:release_ssa_names() : > > if (! SSA_NAME_IN_FREE_LIST (var)) > { > tree saved_ssa_name_var = SSA_NAME_VAR (var); > int saved_ssa_name_version = SSA_NAME_VERSION (var); > use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var)); > <..> > /* Hopefully this can go away once we have the new incremental > SSA updating code installed. */ > SET_SSA_NAME_VAR_OR_IDENTIFIER (var, saved_ssa_name_var); I don't see a big issue with this, sure, you could tree saved_ssa_name_identifier = saved_ssa_name_var ? saved_ssa_name_var : SSA_NAME_IDENTIFIER (var); and use that instead in SET_SSA_NAME_VAR_OR_IDENTIFIER. Jakub
On 06/27/2013 02:39 PM, Jakub Jelinek wrote: > > in tree-ssanames.c:release_ssa_names() : > > if (! SSA_NAME_IN_FREE_LIST (var)) > { > tree saved_ssa_name_var = SSA_NAME_VAR (var); > int saved_ssa_name_version = SSA_NAME_VERSION (var); > use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var)); > <..> > /* Hopefully this can go away once we have the new incremental > SSA updating code installed. */ > SET_SSA_NAME_VAR_OR_IDENTIFIER (var, saved_ssa_name_var); > I don't see a big issue with this, sure, you could > tree saved_ssa_name_identifier = saved_ssa_name_var ? saved_ssa_name_var : SSA_NAME_IDENTIFIER (var); > and use that instead in SET_SSA_NAME_VAR_OR_IDENTIFIER. Yeah I wasn't too concerned about this one, the outof-ssa case looked like more of a possible issue. Maybe neither is, they just popped out as inconsistent uses. Andrew
On Thu, Jun 27, 2013 at 8:52 PM, Andrew MacLeod <amacleod@redhat.com> wrote: > On 06/27/2013 02:39 PM, Jakub Jelinek wrote: >> >> >> in tree-ssanames.c:release_ssa_names() : >> >> if (! SSA_NAME_IN_FREE_LIST (var)) >> { >> tree saved_ssa_name_var = SSA_NAME_VAR (var); >> int saved_ssa_name_version = SSA_NAME_VERSION (var); >> use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var)); >> <..> >> /* Hopefully this can go away once we have the new incremental >> SSA updating code installed. */ >> SET_SSA_NAME_VAR_OR_IDENTIFIER (var, saved_ssa_name_var); >> I don't see a big issue with this, sure, you could >> tree saved_ssa_name_identifier = saved_ssa_name_var ? saved_ssa_name_var : >> SSA_NAME_IDENTIFIER (var); >> and use that instead in SET_SSA_NAME_VAR_OR_IDENTIFIER. > > > Yeah I wasn't too concerned about this one, the outof-ssa case looked like > more of a possible issue. Maybe neither is, they just popped out as > inconsistent uses. Restoring SSA_NAME_VAR_OR_IDENTIFIER is only for debugging. Yes, it probably should save SSA_NAME_VAR_OR_IDENTIFIER instead of SSA_NAME_VAR. Richard. > Andrew >
Index: tree.h =================================================================== --- tree.h (revision 196663) +++ tree.h (working copy) @@ -1917,6 +1918,8 @@ || TREE_CODE ((NODE)->ssa_name.var) == IDENTIFIER_NODE \ ? NULL_TREE : (NODE)->ssa_name.var) +#define SSA_NAME_VAR_OR_IDENTIFIER(NODE) (SSA_NAME_CHECK (NODE)->ssa_name.var) + #define SET_SSA_NAME_VAR_OR_IDENTIFIER(NODE,VAR) \ do { SSA_NAME_CHECK (NODE)->ssa_name.var = (VAR); } while (0) Index: tree-ssanames.c =================================================================== --- tree-ssanames.c (revision 195512) +++ tree-ssanames.c (working copy) @@ -200,7 +200,7 @@ defining statement. */ if (! SSA_NAME_IN_FREE_LIST (var)) { - tree saved_ssa_name_var = SSA_NAME_VAR (var); + tree saved_ssa_name_var = SSA_NAME_VAR_OR_IDENTIFIER (var); int saved_ssa_name_version = SSA_NAME_VERSION (var); use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var)); Index: tree-outof-ssa.c =================================================================== --- tree-outof-ssa.c (revision 195512) +++ tree-outof-ssa.c (working copy) @@ -1039,7 +1039,8 @@ needed. */ if ((e->flags & EDGE_DFS_BACK) && (TREE_CODE (arg) != SSA_NAME - || SSA_NAME_VAR (arg) != SSA_NAME_VAR (result) + || (SSA_NAME_VAR_OR_IDENTIFIER (arg) + != SSA_NAME_VAR_OR_IDENTIFIER (result)) || trivially_conflicts_p (bb, result, arg))) { tree name;