This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

Re: [patch] Fix PR/18179 and use get_inner_reference in vectorizer: part 2


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.

Ok.

> 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
> vect_compute_data_ref_alignment:

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.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]