This is the mail archive of the
mailing list for the GCC project.
[tuples] gimple_assign_subcode for GIMPLE_SINGLE_RHS
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: gcc at gcc dot gnu dot org, dnovillo at google dot com, aldyh at redhat dot com
- Date: Sun, 9 Mar 2008 01:29:46 +0100
- Subject: [tuples] gimple_assign_subcode for GIMPLE_SINGLE_RHS
I just noticed an error in a part of the code that I converted, that
looks this way:
switch (gimple_assign_subcode (stmt))
The problem of course is that for GIMPLE_SINGLE_RHS, we do not maintain
the invariant that
gimple_assign_subcode (stmt) == TREE_CODE (gimple_assign_rhs1 (stmt)),
so gimple_assign_subcode typically will not be SSA_NAME, but VAR_DECL.
Enforcing this invariant might be hard and probably asking for more
trouble than it is worth. However, perhaps it would make sense
to use some special tree code to indicate GIMPLE_SINGLE_RHS, in order
to avoid confusion?