Candl  0.6.1
Functions
statement.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include "../include/candl/candl.h"
Include dependency graph for statement.c:

Functions

void candl_statement_print_structure (file, statement, level)
void candl_statement_print (FILE *file, CandlStatement *statement)
void candl_statement_free (CandlStatement *statement)
CandlStatementcandl_statement_read (FILE *file, int label, int nb_parameters)
CandlStatementcandl_statement_malloc ()
int candl_statement_commute (CandlStatement *statement1, CandlStatement *statement2)

Function Documentation

int candl_statement_commute ( CandlStatement statement1,
CandlStatement statement2 
)

candl_statement_commute function: This function returns 1 if the two statements given as parameter commute, 0 otherwise. It uses the statement type information to answer the question.

  • 09/12/2005: first version.

References CANDL_M_REDUCTION, CANDL_P_REDUCTION, CANDL_T_REDUCTION, and candlstatement::type.

Referenced by candl_dependence_between().

void candl_statement_free ( CandlStatement statement)

candl_statement_free function: This function frees the allocated memory for a CandlStatement structure.

  • 09/09/2003: first version.

References candlstatement::domain, candlstatement::index, candlstatement::read, and candlstatement::written.

Referenced by candl_program_free().

candl_statement_malloc function: This function allocates the memory space for a CandlStatement structure and sets its fields with default values. Then it returns a pointer to the allocated space.

  • 09/12/2005: first version.

References CANDL_UNSET, candlstatement::depth, candlstatement::domain, candlstatement::index, candlstatement::label, candlstatement::read, candlstatement::ref, candl_program::statement, candlstatement::type, and candlstatement::written.

Referenced by candl_program_convert_scop(), and candl_statement_read().

void candl_statement_print ( FILE *  file,
CandlStatement statement 
)

candl_statement_print function: This function prints the content of a CandlStatement structure (statement) into a file (file, possibly stdout).

  • 09/09/2003: first version.

References candl_statement_print_structure().

void candl_statement_print_structure ( file  ,
statement  ,
level   
)

------ ( ----------------------------------------------------------** )\ CAnDL ** ----- / ) --------------------------------------------------------** ( * ( statement.c ** ---- #/ --------------------------------------------------------** .-"#'-. First version: september 9th 2003 ** --- |"-.-"| -------------------------------------------------------** | | | | | | ************************************************************* CAnDL '-._,-' the Chunky Analyzer for Dependences in Loops (experimental) *

* Copyright (C) 2003 Cedric Bastoul * * This 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 2 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 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 * * candl_statement_print_structure function: Displays a CandlStatement structure (statement) into a file (file, possibly stdout) in a way that trends to be understandable without falling in a deep depression or, for the lucky ones, getting a headache... It includes an indentation level (level) in order to work with others print_structure functions.

  • 18/09/2003: first version.

References CANDL_ASSIGNMENT, CANDL_M_REDUCTION, candl_matrix_print_structure(), CANDL_P_REDUCTION, CANDL_T_REDUCTION, CANDL_UNSET, candlstatement::depth, candlstatement::domain, candlstatement::index, candlstatement::label, candlstatement::read, candlstatement::type, and candlstatement::written.

Referenced by candl_dependence_print_structure(), candl_program_print_structure(), and candl_statement_print().

CandlStatement* candl_statement_read ( FILE *  file,
int  label,
int  nb_parameters 
)

candl_statement_read function: This function reads statement data from a file (file) and puts them into a CandlStatement structure. This function returns a pointer to this structure.

  • label is the statement number ;
  • nb_parameters is the number of parameters.
  • 09/09/2003: first version.

References CANDL_ASSIGNMENT, CANDL_M_REDUCTION, CANDL_MAX_STRING, CANDL_P_REDUCTION, candl_statement_malloc(), CANDL_T_REDUCTION, candlstatement::depth, candlstatement::domain, candlstatement::index, candlstatement::label, candlstatement::read, candl_program::statement, candlstatement::type, and candlstatement::written.

Referenced by candl_program_read().