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
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.   

References extend_schedule().

Referenced by carries_deps(), and no_violations().

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.   

References apply_schedule_on_deps().

Referenced by loop_level_carries_dependences().

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.   

References scop_get_may_writes(), scop_get_must_writes(), scop_get_original_schedule(), scop_get_reads(), and subtract_commutative_associative_deps().

Referenced by loop_level_carries_dependences(), scop_get_dependences(), and transform_is_safe().

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 add_pdr_constraints(), 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.   

Referenced by extend_schedule_1().

__isl_give isl_union_map* extend_schedule ( )
Return a relation that has uniform output dimensions.   

References extend_schedule_1(), extend_schedule_str::max, max_number_of_out_dimensions(), and extend_schedule_str::umap.

Referenced by apply_schedule_on_deps().

static int extend_schedule_1 ( )
static
Helper function for extend_schedule.   

References extend_map(), extend_schedule_str::max, and extend_schedule_str::umap.

Referenced by extend_schedule().

bool graphite_legal_transform ( )
Return true when the SCOP transformed schedule is correct.   

References scop_get_transformed_schedule(), timevar_pop(), timevar_push(), and transform_is_safe().

Referenced by lst_try_interchange_loops().

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.   

References get_loop_body_pbbs(), loop_level_carries_dependences(), timevar_pop(), and timevar_push().

Referenced by translate_clast_for_loop().

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.   

References carries_deps(), compute_deps(), and scop_get_transformed_schedule().

Referenced by loop_is_parallel_p().

static int max_number_of_out_dimensions ( )
static
Helper function used on each MAP of a isl_union_map.  Computes the
   maximal output dimension.   

Referenced by extend_schedule().

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.   

References apply_schedule_on_deps().

Referenced by transform_is_safe().

static isl_union_map* scop_get_may_writes ( )
static
Returns all the memory may writes in SCOP.   

References add_pdr_constraints(), scop::context, and pdr_may_write_p().

Referenced by compute_deps().

static isl_union_map* scop_get_must_writes ( )
static
Returns all the memory must writes in SCOP.   

References add_pdr_constraints(), scop::context, and pdr_write_p().

Referenced by compute_deps().

static isl_union_map* scop_get_original_schedule ( )
static
Returns all the original schedules in SCOP.   

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

Referenced by compute_deps().

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

References add_pdr_constraints(), scop::context, and pdr_read_p().

Referenced by compute_deps().

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

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

Referenced by graphite_legal_transform(), and loop_level_carries_dependences().

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.   

References add_pdr_constraints(), scop::context, pdr_may_write_p(), pdr_read_p(), and pdr_write_p().

Referenced by compute_deps().

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.   

References compute_deps(), scop::may_raw, scop::may_raw_no_source, scop::may_war, scop::may_war_no_source, scop::may_waw, scop::may_waw_no_source, scop::must_raw, scop::must_raw_no_source, scop::must_war, scop::must_war_no_source, scop::must_waw, scop::must_waw_no_source, and no_violations().

Referenced by graphite_legal_transform().