This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to access structure information from "pass_vectorize"
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Swati Rathi <swatirathi at cse dot iitb dot ac dot in>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Mon, 20 Jan 2014 09:50:27 +0100
- Subject: Re: How to access structure information from "pass_vectorize"
- Authentication-results: sourceware.org; auth=none
- References: <52DC04FD dot 7080900 at cse dot iitb dot ac dot in>
On Sun, Jan 19, 2014 at 6:01 PM, Swati Rathi <swatirathi@cse.iitb.ac.in> wrote:
> We are writing a GIMPLE pass and would like to use some information computed
> in
> pass_vectorize. However, we are not able to use the data structures which
> gets populated in pass_vectorize
> because the information is not made available across passes.
>
> In particular, we wish to access the structures "stmt_vec_info" and
> "data_reference".
>
> How do we access this information? Should we invoke pass_vectorize as a
> sub-pass of our pass? Should
> we explicitly call the execute function of pass_vectorize in our pass? Or
> should we modify pass_vectorize
> code and make a deep copy in a global variable? Is there any other way of
> getting this information?
It really depends on what kind of information you want to access. You can
re-compute things in your pass, or you can make your pass part of the
vectorizer (thus, modify the vectorizer pass). In particular data_reference
is just what the data-reference analysis usable from any pass (tree-data-ref.h)
produces.
But without more information on what information exactly you want to access
(and where - where is your pass placed compared to the vectorizer?) it is
hard to suggest anything.
Richard.