Candl 0.6.0
Defines | Functions
pruning.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <candl/candl.h>
#include <assert.h>
Include dependency graph for pruning.c:

Defines

#define BUFF_SIZE   1024

Functions

static int candl_matrix_equal (CandlMatrix *m1, CandlMatrix *m2)
static void find_paths_rec (int tgt_id, int cur_length, int max_length, int final_id, CandlDependence **alldeps, CandlDependence **cur_path, CandlDependence ****paths_list)
static CandlDependence *** find_dep_paths (CandlDependence **ardeps, CandlStatement *source, CandlStatement *target)
static int piplist_are_equal (PipList *l1, PipList *l2, int size)
static int quast_are_equal (PipQuast *q1, PipQuast *q2, int size)
static int is_covering (CandlDependence *dep, CandlDependence **path)
static int is_iter_unimodular (CandlDependence *dep)
CandlDependencecandl_dependence_prune_transitively_covered (CandlDependence *deps)

Detailed Description

------ ( ----------------------------------------------------------** )\ CAnDL ** ----- / ) --------------------------------------------------------** ( * ( pruning.c ** ---- #/ --------------------------------------------------------** .-"#'-. First version: July 17th 2011 ** --- |"-.-"| -------------------------------------------------------** | | | | | | ************************************************************* CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *

* Copyright (C) 2003-2008 Cedric Bastoul * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your option) * any later version. * * This software 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 Lesser General Public License * along with software; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * CAnDL, the Chunky Dependence Analyzer * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr * *

Author:
Louis-Noel Pouchet

Define Documentation

#define BUFF_SIZE   1024

Referenced by find_dep_paths(), and find_paths_rec().


Function Documentation

CandlDependence* candl_dependence_prune_transitively_covered ( CandlDependence deps)
static int candl_matrix_equal ( CandlMatrix m1,
CandlMatrix m2 
) [static]

Return true if the 2 matrices are strictly identical.

References CANDL_eq.

Referenced by candl_dependence_prune_transitively_covered().

static CandlDependence*** find_dep_paths ( CandlDependence **  ardeps,
CandlStatement source,
CandlStatement target 
) [static]

Returns a list of list of dependences containing all paths in the graph represented by the list of dependences 'ardeps', that start from statement label 'source->label' and ends at statement label 'target->label'.

References BUFF_SIZE, find_paths_rec(), and candlstatement::label.

Referenced by candl_dependence_prune_transitively_covered().

static void find_paths_rec ( int  tgt_id,
int  cur_length,
int  max_length,
int  final_id,
CandlDependence **  alldeps,
CandlDependence **  cur_path,
CandlDependence ****  paths_list 
) [static]

Finds all paths in the graph represented by the list of dependences 'alldeps', that start from statement label 'tgt_id' and ends at statement label 'final_id', of length <= 'max_length'. Paths are stored as list of lists of dependences in 'paths_list'.

References BUFF_SIZE, CANDL_RAR, CANDL_RAW, CANDL_WAR, CANDL_WAW, and candldependence::usr.

Referenced by find_dep_paths().

static int is_covering ( CandlDependence dep,
CandlDependence **  path 
) [static]

Return true if 'dep' is fully covered by the transitive dependences in 'path'. This is a conservative functions (works only on unimodular access functions + iteration domains for the sub-matrix corresponding to loop iterators).

FIXME: This may be overly conservative.

FIXME: ambiguous test?

References CANDL_assign, CANDL_get_si, candl_matrix_malloc(), CANDL_RAR, CANDL_RAW, CANDL_set_si, CANDL_WAR, CANDL_WAW, candl_program::context, candlstatement::depth, candldependence::domain, candlstatement::domain, quast_are_equal(), candldependence::source, candldependence::target, and candldependence::type.

Referenced by candl_dependence_prune_transitively_covered().

static int is_iter_unimodular ( CandlDependence dep) [static]
static int piplist_are_equal ( PipList *  l1,
PipList *  l2,
int  size 
) [static]

Return true if the 'size' first elements of 'l1' and 'l2' are equal.

References CANDL_eq.

Referenced by quast_are_equal().

static int quast_are_equal ( PipQuast *  q1,
PipQuast *  q2,
int  size 
) [static]

Return true if the 'size' first variables in a quast are strictly equal.

References piplist_are_equal().

Referenced by is_covering().