This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Fix PR/18179 and use get_inner_reference in vectorizer: part 2
- From: Richard Henderson <rth at redhat dot com>
- To: Ira Rosen <IRAR at il dot ibm dot com>
- Cc: Dorit Naishlos <DORIT at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Jan 2005 13:17:35 -0800
- Subject: Re: [patch] Fix PR/18179 and use get_inner_reference in vectorizer: part 2
- References: <20041216081913.GD7725@redhat.com> <OFC2592C44.D99182A2-ONC2256F7E.0049FB67-C2256F7E.004A4DDF@il.ibm.com>
On Mon, Jan 03, 2005 at 03:31:35PM +0200, Ira Rosen wrote:
> On second thought, I'm afraid this may be not restrictive enough. As
> far as I understand, TREE_CONSTANT includes also expressions and
> declarations, which value is unknown in compile time, but it is
> invariant in the program, right?
Well, it does contain variable addresses and such, yes.
> If so, TREE_CONSTANT is not enough in our case, since we really need
> a number here.
> 1) switch to test for _CST nodes only, instead of TREE_CONSTANT:
If you want a number for an offset, surely you're only interested
in integer constants. So checking all of CONSTANT_CLASS_P would
also be a mistake. Allow only INTEGER_CST.
> 2) continue to use TREE_CONSTANT (in case in the future we'll find a
> way to exploit the information that an alignment is unknown but is
> always the same) and add a check for _CST nodes in
If that day comes, you can always change it. But if you're not going
to handle something, it's better to filter it out earlier than later
so that you don't spend as much time processing it.