Daniel Berlin - Re: [PATCH] Re: ref_contains_indirect_ref always false? (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] |
- From: Daniel Berlin
- To: Diego Novillo
- Cc: Richard Kenner , Richard Guenther , gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 04 Nov 2005 11:01:51 -0500
- Subject: Re: [PATCH] Re: ref_contains_indirect_ref always false?
- References: <10511041507.AA09327@vlsi1.ultra.nyu.edu> <200511041017.32255.dnovillo@redhat.com>
On Fri, 2005-11-04 at 10:17 -0500, Diego Novillo wrote:
On Friday 04 November 2005 10:07, Richard Kenner wrote:
#if defined ENABLE_CHECKING gcc_assert (handled_component_p (ref)) #endifIf the comment says it has to be an ARRAY_REF, why not just check for that?
The comment is out of sync with the code. It's used in code that may be sending an arbitrary aggregate.
Given that Dan asked to remove the call from tree-ssa-structalias.c, then we can take advantage and tighten the two predicates more.
In ref_contains_indirect_ref: Rename to array_ref_contains_indirect_ref Add gcc_assert (TREE_CODE (ref) == ARRAY_REF) at the start.
This would be fine. The use in tree-ssa-loop-niter.c is really trying to skip out on inferring loop bounds from pointer to structure accesses in the case of things like:
struct a { char foo[1]; };
struct a *b = malloc (sizeof (struct a) + 100); b->foo = "I like candy!"
Since we have to keep this working:)
Thus, it should always be handed an ARRAY_REF.
- Follow-Ups:
- RE: [PATCH] Re: ref_contains_indirect_ref always false?
* From: Dave Korn
- RE: [PATCH] Re: ref_contains_indirect_ref always false?
- References:
- Re: [PATCH] Re: ref_contains_indirect_ref always false?
* From: Richard Kenner - Re: [PATCH] Re: ref_contains_indirect_ref always false?
* From: Diego Novillo
- Re: [PATCH] Re: ref_contains_indirect_ref always false?
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |