This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix is_gimple_tmp_var
- From: neroden at twcny dot rr dot com (Nathanael Nerode)
- To: kenner at vlsi1 dot ultra dot nyu dot edu, gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Date: Sat, 14 Aug 2004 19:53:49 -0400
- Subject: Re: [PATCH] Fix is_gimple_tmp_var
> > I'm really not convinced we need the bit. I suspect
> > DECL_ARTIFICIAL && TREE_READONLY
> > will do the trick.
>
> TREE_READONLY? Not all temps are readonly.
>
>No, but the only ones that can safely be used as the LHS of a trapping
>insn are. And that's the issue here.
Sorry. Few of the gimple temps have TREE_READONLY when they're created.
Presumably this matters to internals of the gimplifier.
>From gimplify.c:
create_tmp_var_raw (tree type, const char *prefix)
{
...
/* Make the variable writable. */
TREE_READONLY (tmp_var) = 0;
...
}
Only those created through certain paths which set TREE_READONLY do.
So this would lose by misidentifying some gimple_tmp_vars as user
variables (without SSA_NAMEs), with unpredictable consequences.
--
This space intentionally left blank.