This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
TREE_ADDRESSABLE types and SRA?
- From: Martin Jambor <mjambor at suse dot cz>
- To: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Mon, 9 Mar 2009 22:21:29 +0100
- Subject: TREE_ADDRESSABLE types and SRA?
Hi,
The description of TREE_ADDRESSABLE macro in tree.h says:
"In ..._TYPE nodes, it means that objects of this type must
be fully addressable. This means that pieces of this
object cannot go into register parameters, for example."
Yet the current tree-sra does not check this flag and happily
scalarizes variables of such types, there are even tests in our
regression testsuite that check whether such types are indeed reduced
(such as g++.dg/tree-ssa/ssa-sra-1.C).
Moreover, such types are very common in C++, the one in the testcase
mentioned above is even quite simple.
On a related note, is the assert in create_tmp_var() checking this
addressability the requested type really necessary?
Is the comment outdated? Or have we been somehow lucky all this time
while ignoring a sensible requirement?
Thanks,
Martin