This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[pretty-ipa, PATCH, commited] New FIXME comment in get_ref_base_and_extent()
- From: Martin Jambor <mjambor at suse dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 5 Jan 2009 22:24:21 +0100
- Subject: [pretty-ipa, PATCH, commited] New FIXME comment in get_ref_base_and_extent()
Hi,
as Richi requested in http://gcc.gnu.org/ml/gcc-patches/2008-12/msg01224.html
I have added a FIXME comment to get_ref_base_and_extent() indicating
that trating any mix of variable accessed array_refs and union
component_refs might be too conservative.
I have bootstrapped and tested the following patch on x86_64 and
committed it under the obvious rule as revision 143096.
Thanks,
Martin
2009-01-05 Martin Jambor <mjambor@suse.cz>
* tree-dfa.c (get_ref_base_and_extent): Added a FIXME comment.
Index: isra/gcc/tree-dfa.c
===================================================================
--- isra.orig/gcc/tree-dfa.c
+++ isra/gcc/tree-dfa.c
@@ -937,7 +937,13 @@ get_ref_base_and_extent (tree exp, HOST_
base type boundary.
Unfortunately this is difficult to determine reliably when unions are
- involved and so we are conservative in such cases. */
+ involved and so we are conservative in such cases.
+
+ FIXME: This approach may be too conservative, we probably want to at least
+ check that the union is the last field/element at its level or even
+ propagate the calculated offsets back up the access chain and check
+ there. */
+
if (seen_variable_array_ref
&& (seen_union
|| (maxsize != -1