This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Marking variable as addressable from within SSA pass
- From: Bonzini <bonzini at gnu dot org>
- To: gcc at gnu dot org
- Date: Fri, 19 Mar 2004 11:06:36 -0500
- Subject: Marking variable as addressable from within SSA pass
Hi,
I am trying to implement vector operation lowering as an SSA pass. The
pass is similar to tree-complex; I work on tree-ssa, slightly modified to
use bsi's also at -O0 similar to what is done in the tree-profiling branch,
but this is ok (it bootstraps).
So far I made it work as a non-SSA pass which I run just before
expanding, but I would like to run it as well just after loop
optimization, so that dom can clean up the code it generates.
The pass takes, for example,
V4QI T_1;
V4QI T_2;
V4QI T_3;
T_3 = T_1 & T_2;
and converts it into
V4QI T_1;
V4QI T_2;
V4QI T_3;
unsigned int *T_4;
unsigned int *T_5;
unsigned int *T_6;
unsigned int T_7;
unsigned int T_8;
T_4 = (unsigned int *) &T_1;
T_5 = (unsigned int *) &T_2;
T_6 = (unsigned int *) &T_3;
T_7 = *T_4;
T_8 = *T_5;
T_9 = T_4 & T_5;
*T_6 = T_9;
I do tweak the alias sets of the unsigned int *Ã that I generate. All
this mess should hopefully be cleaned up by dom -- indeed even CSE and
ADDRESSOF manage to clean most of it.
I am setting the TREE_ADDRESSABLE bit of T_1, T_2 and T_3 but it is not
enough. During variable renaming, stmt_ann returns an error_mark and
then everything goes haywire until I get an ICE near note_addressable.
Is there anything more I should do to mark these variables as
addressable?
Thank you,
Paolo