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]

[tree-ssa] patch suggestion: def_op vs vdef_ops


 When a variable has aliases, the variable itself and the aliases are
inserted in vdef_ops. When it does not have alias it is inserted in def_op.

 The result is that in many cases (like in tree-ssa-dce.c) both need to be 
checked:

  if (def_op (stmt) && need_to_preserve_store (*(def_op (stmt))))
    return true;

  ops = vdef_ops (stmt);
  for (i = 0; ops && i < VARRAY_ACTIVE_SIZE (ops); i++)
    if (need_to_preserve_store (VDEF_RESULT (VARRAY_TREE (ops, i))))
      return true;

 My suggestion is:

 -Always add to vdef_ops so that using only vdef_ops is enough in many
cases.

 -The destination variable is always inserted in def_op. Not only when it 
is a non-aliased scalar value.

 With that modification def_op would be a subset of vdef_ops. I can see
some cases (like in some of the transformations that I have) where it is
very interesting to know the variable modified, not the alias.

 Can someone enlightme with reasons for not doing it?

-- 
-------------------------------------------------------------------
  Jose Renau           |  Only those who attempt the absurd can 
  renau at cs.uiuc.edu | achieve the impossible. - Pth group
-------------------------------------------------------------------




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