GCC Middle and Back End API Reference
graphite-dependences.c File Reference

Data Structures

struct  extend_schedule_str

Functions

static isl_map * constrain_domain ()
static isl_map * add_pdr_constraints ()
static isl_union_map * scop_get_reads ()
static isl_union_map * scop_get_must_writes ()
static isl_union_map * scop_get_may_writes ()
static isl_union_map * scop_get_original_schedule ()
static isl_union_map * scop_get_transformed_schedule ()
static int max_number_of_out_dimensions ()
static __isl_give isl_map * extend_map ()
static int extend_schedule_1 ()
__isl_give isl_union_map * extend_schedule ()
static isl_map * apply_schedule_on_deps (__isl_keep isl_union_map *schedule, __isl_keep isl_union_map *deps)
static bool no_violations (__isl_keep isl_union_map *schedule, __isl_keep isl_union_map *deps)
static bool carries_deps (__isl_keep isl_union_map *schedule, __isl_keep isl_union_map *deps, int depth)
static void subtract_commutative_associative_deps (scop_p scop, vec< poly_bb_p > pbbs, isl_union_map *original, isl_union_map **must_raw, isl_union_map **may_raw, isl_union_map **must_raw_no_source, isl_union_map **may_raw_no_source, isl_union_map **must_war, isl_union_map **may_war, isl_union_map **must_war_no_source, isl_union_map **may_war_no_source, isl_union_map **must_waw, isl_union_map **may_waw, isl_union_map **must_waw_no_source, isl_union_map **may_waw_no_source)
void compute_deps (scop_p scop, vec< poly_bb_p > pbbs, isl_union_map **must_raw, isl_union_map **may_raw, isl_union_map **must_raw_no_source, isl_union_map **may_raw_no_source, isl_union_map **must_war, isl_union_map **may_war, isl_union_map **must_war_no_source, isl_union_map **may_war_no_source, isl_union_map **must_waw, isl_union_map **may_waw, isl_union_map **must_waw_no_source, isl_union_map **may_waw_no_source)
static bool transform_is_safe ()
bool graphite_legal_transform ()
static bool loop_level_carries_dependences (scop_p scop, vec< poly_bb_p > body, int depth)
bool loop_is_parallel_p ()

Function Documentation

static isl_map* add_pdr_constraints ( )
static
   Constrain pdr->accesses with pdr->extent and pbb->domain.  
static isl_map* apply_schedule_on_deps ( __isl_keep isl_union_map *  schedule,
__isl_keep isl_union_map *  deps 
)
static
   Applies SCHEDULE to the in and out dimensions of the dependences
   DEPS and return the resulting relation.  
static bool carries_deps ( __isl_keep isl_union_map *  schedule,
__isl_keep isl_union_map *  deps,
int  depth 
)
static
   Return true when DEPS is non empty and the intersection of LEX with
   the DEPS transformed by SCHEDULE is non empty.  LEX is the relation
   in which all the inputs before DEPTH occur at the same time as the
   output, and the input at DEPTH occurs before output.  
     in + 1 <= out  
void compute_deps ( scop_p  scop,
vec< poly_bb_p pbbs,
isl_union_map **  must_raw,
isl_union_map **  may_raw,
isl_union_map **  must_raw_no_source,
isl_union_map **  may_raw_no_source,
isl_union_map **  must_war,
isl_union_map **  may_war,
isl_union_map **  must_war_no_source,
isl_union_map **  may_war_no_source,
isl_union_map **  must_waw,
isl_union_map **  may_waw,
isl_union_map **  must_waw_no_source,
isl_union_map **  may_waw_no_source 
)
   Compute the original data dependences in SCOP for all the reads and
   writes in PBBS.  

Referenced by scop_get_dependences().

static isl_map* constrain_domain ( )
static
@verbatim 

Data dependence analysis for Graphite. Copyright (C) 2009-2013 Free Software Foundation, Inc. Contributed by Sebastian Pop sebas.nosp@m.tian.nosp@m..pop@.nosp@m.amd..nosp@m.com and Konrad Trifunovic konra.nosp@m.d.tr.nosp@m.ifuno.nosp@m.vic@.nosp@m.inria.nosp@m..fr.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.

   Add the constraints from the set S to the domain of MAP.  

Referenced by scop_get_original_schedule(), and scop_get_transformed_schedule().

static __isl_give isl_map* extend_map ( )
static
   Extends the output dimension of MAP to MAX dimensions.  

References extend_schedule_str::max, and extend_schedule_str::umap.

__isl_give isl_union_map* extend_schedule ( )
   Return a relation that has uniform output dimensions.  
static int extend_schedule_1 ( )
static
   Helper function for extend_schedule.  
bool graphite_legal_transform ( )
   Return true when the SCOP transformed schedule is correct.  
bool loop_is_parallel_p ( )
   Returns true when the loop L at level DEPTH is parallel.
   BB_PBB_MAPPING is a map between a basic_block and its related
   poly_bb_p.  

Referenced by graphite_create_new_loop_guard().

static bool loop_level_carries_dependences ( scop_p  scop,
vec< poly_bb_p body,
int  depth 
)
static
   Return true when the loop at DEPTH carries dependences.  BODY is
   the body of the loop.  
static int max_number_of_out_dimensions ( )
static
   Helper function used on each MAP of a isl_union_map.  Computes the
   maximal output dimension.  
static bool no_violations ( __isl_keep isl_union_map *  schedule,
__isl_keep isl_union_map *  deps 
)
static
   Return true when SCHEDULE does not violate the data DEPS: that is
   when the intersection of LEX with the DEPS transformed by SCHEDULE
   is empty.  LEX is the relation in which the outputs occur before
   the inputs.  
static isl_union_map* scop_get_may_writes ( )
static
   Returns all the memory may writes in SCOP.  
static isl_union_map* scop_get_must_writes ( )
static
   Returns all the memory must writes in SCOP.  
static isl_union_map* scop_get_original_schedule ( )
static
   Returns all the original schedules in SCOP.  

References constrain_domain(), poly_bb::domain, and poly_bb::schedule.

static isl_union_map* scop_get_reads ( )
static
   Returns all the memory reads in SCOP.  
static isl_union_map* scop_get_transformed_schedule ( )
static
   Returns all the transformed schedules in SCOP.  

References constrain_domain(), poly_bb::domain, and poly_bb::transformed.

static void subtract_commutative_associative_deps ( scop_p  scop,
vec< poly_bb_p pbbs,
isl_union_map *  original,
isl_union_map **  must_raw,
isl_union_map **  may_raw,
isl_union_map **  must_raw_no_source,
isl_union_map **  may_raw_no_source,
isl_union_map **  must_war,
isl_union_map **  may_war,
isl_union_map **  must_war_no_source,
isl_union_map **  may_war_no_source,
isl_union_map **  must_waw,
isl_union_map **  may_waw,
isl_union_map **  must_waw_no_source,
isl_union_map **  may_waw_no_source 
)
static
   Subtract from the RAW, WAR, and WAW dependences those relations
   that have been marked as belonging to an associative commutative
   reduction.  
static bool transform_is_safe ( )
static
   Given a TRANSFORM, check whether it respects the original
   dependences in SCOP.  Returns true when TRANSFORM is a safe
   transformation.