This is the mail archive of the gcc@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: How to access structure information from "pass_vectorize"


On Mon, Jan 20, 2014 at 11:17 AM, Swati Rathi <swatirathi@cse.iitb.ac.in> wrote:
> On Monday 20 January 2014 02:20 PM, Richard Biener wrote:
>>
>> 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.
>
>
> We wish to access the chain of recurrence (chrecs) which is being populated
> in the below structure.
>
> struct indices
> {
>   /* The object.  */
>   tree base_object;
>
>   /* A list of chrecs.  Access functions of the indices.  */
>   VEC(tree,heap) *access_fns;
>
>   /* Whether BASE_OBJECT is an access representing the whole object
>      or whether the access could not be constrained.  */
>   bool unconstrained_base;
> };
>
>
> Our pass is placed after "pass_ipa_pta".
> However, we even tried placing the pass after pass_vectorize to access this
> information.
>
> Can we use the chain of recurrence computed by the pass_vectorize or do we
> have to recompute it?
> Is there any other pass which is also computing this information and can we
> access it?

You can and should simply re-compute them with
compute_data_dependences_for_loop.

Richard.

>


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