program.c File Reference

#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <candl/candl.h>
#include <candl/program.h>
Include dependency graph for program.c:

Functions

void candl_program_print_structure (FILE *file, candl_program_p program, int level)
void candl_program_print (FILE *file, candl_program_p program)
void candl_program_print_candl_file (FILE *file, candl_program_p program)
candl_program_p candl_program_malloc ()
void candl_program_free (candl_program_p program)
candl_program_p candl_program_read (FILE *file)
static int ** candl_program_scop_get_opt_indices (scoplib_scop_p scop)
candl_program_p candl_program_read_scop (FILE *file)
candl_program_p candl_program_convert_scop (scoplib_scop_p scop, int **indices)

Function Documentation

candl_program_p candl_program_convert_scop ( scoplib_scop_p  scop,
int **  indices 
)

candl_program_convert_scop function: This function extracts the useful information of a scoplib_scop_t structure to a fresh, independent candl_program_t structure. This function is built only if candl was configured with ScopLib support.

References CANDL_AFFECTATION, CANDL_FAIL, CANDL_get_si, candl_matrix_malloc(), candl_program_malloc(), candl_statement_malloc(), candl_program::context, candlstatement::depth, candlstatement::domain, candlstatement::index, candlstatement::label, candl_program::nb_statements, candlstatement::read, candlstatement::ref, candl_program::statement, candlstatement::type, and candlstatement::written.

Referenced by candl_program_read_scop().

void candl_program_free ( candl_program_p  program  ) 

candl_program_free function: This function frees the allocated memory for a candl_program_t structure, it recursively frees everything inside.

References candl_matrix_free(), candl_statement_free(), candl_program::context, candl_program::nb_statements, candl_program::scalars_privatizable, candl_program::statement, and candl_program::transformation.

Referenced by main().

candl_program_p candl_program_malloc (  ) 

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

  • 09/12/2005: first version.

References CANDL_FAIL, candl_program::context, candl_program::nb_statements, candl_program::scalars_privatizable, candl_program::statement, and candl_program::transformation.

Referenced by candl_program_convert_scop(), and candl_program_read().

void candl_program_print ( FILE *  file,
candl_program_p  program 
)

candl_program_print function: This function prints the content of a candl_program_t structure (program) into a file (file, possibly stdout).

References candl_program_print_structure().

Referenced by main().

void candl_program_print_candl_file ( FILE *  file,
candl_program_p  program 
)

candl_program_print function: This function prints a candl_program_t structure (program) into a candl-formatted file (file, possibly stdout).

References candl_matrix_print_data(), candl_program::context, candlstatement::depth, candlstatement::domain, candlstatement::index, candl_program::nb_statements, candlstatement::read, candl_program::statement, and candlstatement::written.

Referenced by main().

void candl_program_print_structure ( FILE *  file,
candl_program_p  program,
int  level 
)

------ ( ----------------------------------------------------------** )\ CAnDL ** ----- / ) --------------------------------------------------------** ( * ( program.c ** ---- #/ --------------------------------------------------------** .-"#'-. First version: september 9th 2003 ** --- |"-.-| -------------------------------------------------------** | | | | | | ************************************************************* 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 * * candl_program_print_structure function: Displays a candl_program_t structure (program) 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.

  • 09/09/2003: first version.

References candl_matrix_print_structure(), candl_statement_print_structure(), candl_program::context, candl_program::nb_statements, candl_program::statement, and candl_program::transformation.

Referenced by candl_program_print().

candl_program_p candl_program_read ( FILE *  file  ) 

candl_program_read function: This function reads the informations to put in a candl_program_t structure from a file (file, possibly stdin). It returns a pointer to a candl_program_t structure containing the read informations. September 10th 2003: first version.

References CANDL_FAIL, candl_matrix_read(), CANDL_MAX_STRING, candl_program_malloc(), candl_statement_read(), candl_program::context, candl_program::nb_statements, candl_program::statement, and candl_program::transformation.

Referenced by main().

candl_program_p candl_program_read_scop ( FILE *  file  ) 

candl_program_read_scop function: This function reads the informations to put in a candl_program_t structure from a file (file, possibly stdin) following the .scop format. It returns a pointer to a candl_program_t structure containing the read informations. This function is built only if candl was configured with ScopLib support.

References candl_program_convert_scop(), candl_program_scop_get_opt_indices(), and candl_program::nb_statements.

Referenced by main().

static int** candl_program_scop_get_opt_indices ( scoplib_scop_p  scop  )  [static]

This function reads the .scop formatted file 'file', check for the existence of the <candl> tag in the file, and retrieve the loop index information, if any. This function is built only if candl was configured with ScopLib support.

Referenced by candl_program_read_scop().


Generated on Mon Jan 11 21:20:51 2010 for Candl by  doxygen 1.6.1