20 #ifndef GCC_TREE_DFA_H
21 #define GCC_TREE_DFA_H
58 switch (TREE_CODE (exp))
62 HOST_WIDE_INT this_off = TREE_INT_CST_LOW (TREE_OPERAND (exp, 2));
63 if (this_off % BITS_PER_UNIT)
65 byte_offset += this_off / BITS_PER_UNIT;
71 tree field = TREE_OPERAND (exp, 1);
76 || TREE_CODE (this_offset) != INTEGER_CST
77 || (TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field))
81 hthis_offset = TREE_INT_CST_LOW (this_offset);
82 hthis_offset += (TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field))
84 byte_offset += hthis_offset;
91 tree index = TREE_OPERAND (exp, 1);
92 tree low_bound, unit_size;
95 && TREE_CODE (index) == SSA_NAME)
96 index = (*valueize) (index);
99 if (TREE_CODE (index) == INTEGER_CST
101 TREE_CODE (low_bound) == INTEGER_CST)
103 TREE_CODE (unit_size) == INTEGER_CST))
107 hindex -= TREE_INT_CST_LOW (low_bound);
108 hindex *= TREE_INT_CST_LOW (unit_size);
109 byte_offset += hindex;
120 byte_offset += TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (exp)));
123 case VIEW_CONVERT_EXPR:
128 tree base = TREE_OPERAND (exp, 0);
130 && TREE_CODE (base) == SSA_NAME)
131 base = (*valueize) (base);
134 if (TREE_CODE (base) == ADDR_EXPR)
139 gcc_assert (off.
high == -1 || off.
high == 0);
142 exp = TREE_OPERAND (base, 0);
149 tree base = TREE_OPERAND (exp, 0);
151 && TREE_CODE (base) == SSA_NAME)
152 base = (*valueize) (base);
155 if (TREE_CODE (base) == ADDR_EXPR)
157 if (TMR_INDEX (exp) || TMR_INDEX2 (exp))
162 gcc_assert (off.
high == -1 || off.
high == 0);
165 exp = TREE_OPERAND (base, 0);
174 exp = TREE_OPERAND (exp, 0);
178 *poffset = byte_offset;