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.