PoCC  Version 1.0
options.h
Go to the documentation of this file.
00001 /*
00002  * options.h: this file is part of the PoCC project.
00003  *
00004  * PoCC, the Polyhedral Compiler Collection package
00005  *
00006  * Copyright (C) 2009 Louis-Noel Pouchet
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public License
00010  * as published by the Free Software Foundation; either version 2.1
00011  * of the License, or (at your option) any later version.
00012  *
00013  * This library is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * The complete GNU General Public Licence Notice can be found as the
00019  * `COPYING.LESSER' file in the root directory.
00020  *
00021  * Author:
00022  * Louis-Noel Pouchet <Louis-Noel.Pouchet@inria.fr>
00023  *
00024  */
00025 #ifndef POCC_OPTIONS_H
00026 # define POCC_OPTIONS_H
00027 
00028 # include <stdio.h>
00029 # include <pocc/common.h>
00030 # ifndef CLOOG_INT_GMP
00031 #  define CLOOG_INT_GMP
00032 # endif
00033 # include <cloog/cloog.h>
00034 # include <cloog/options.h>
00035 # include <pluto/pluto.h>
00036 # include <letsee/options.h>
00037 
00038 #define POCC_TIMER_CODE_ASM     1
00039 #define POCC_TIMER_CODE_TIME    2
00040 
00041 #define POCC_CLOOG_UNDEF        -2
00042 
00043 struct s_pocc_options
00044 {
00045   // In/Out file information
00046   FILE*         input_file;
00047   char*         input_file_name;
00048   FILE*         output_file;
00049   char*         output_file_name;
00050   char*         output_scoplib_file_name;
00051   int           cloogify_schedules;
00052   // Set to 1 if scop fields (eg, iterator and parameter names) are
00053   // standard char* strings, set to 0 if it is pointers from random AST
00054   // node.
00055   int           names_are_strings;
00056 
00057   // Verbose.
00058   int           verbose;
00059   int           quiet;
00060 
00061   // Trash.
00062   int           trash;
00063 
00064   // Parser options.
00065   int           clan_bounded_context;
00066   int           inscop_fakepoccarray;
00067   int           set_default_parameter_values;
00068   int           read_input_scop_file;
00069 
00070   // Dependence analysis.
00071   int           candl_pass; // Run Candl (default: yes)
00072   int           candl_deps_isl_simplify;
00073   int           candl_deps_prune_transcover;
00074 
00075   // Feature extraction.
00076   int           polyfeat; // Run PolyFeat (default:no)
00077   int           polyfeat_rar;
00078 
00079   // Compile command.
00080   int           compile_program; // Internal field
00081   char*         compile_command;
00082   int           execute_program;
00083   char*         execute_command_args;
00084   char*         program_exec_result; // Internal field
00085 
00086   // LetSee Options.
00087   int           letsee; // Run LetSee (default: no)
00088   int           letsee_space;
00089   int           letsee_traversal;
00090   int           letsee_normspace;
00091   int*          letsee_scheme_m1;
00092   int           letsee_prune_precut;
00093   int           letsee_backtrack_multi;
00094   int           letsee_rtries;
00095   int           letsee_ilb;
00096   int           letsee_iUb;
00097   int           letsee_plb;
00098   int           letsee_pUb;
00099   int           letsee_clb;
00100   int           letsee_cUb;
00101 
00102   // PLuTo Options.
00103   int           pluto; // Run PLuTo (default: no)
00104   int           pluto_unroll;
00105   int           pluto_parallel;
00106   int           pluto_tile;
00107   int           pluto_rar;
00108   int           pluto_fuse;
00109   int           pluto_polyunroll;
00110   int           pluto_bee;
00111   int           pluto_prevector;
00112   int           pluto_ufactor;
00113   int           pluto_quiet;
00114   int           pluto_context;
00115   int           pluto_ft;
00116   int           pluto_lt;
00117   int           pluto_multipipe;
00118   int           pluto_l2tile;
00119   int           pluto_lastwriter;
00120   int           pluto_scalpriv;
00121   int           pluto_external_candl;
00122   int           pluto_rar_cf;
00123   int           pluto_tiling_in_scatt;
00124   int           pluto_bound_coefficients;
00125 
00126   // Codegen Options.
00127   int           codegen; // Perform codegen (default: yes)
00128   CloogOptions* cloog_options;
00129   int           cloog_f;
00130   int           cloog_l;
00131   int           print_cloog_file;
00132   int           codegen_timercode;
00133   int           codegen_timer_asm;
00134   int           codegen_timer_papi;
00135   int           timeout;
00136 
00137   // Pragmatizer.
00138   int           pragmatizer;
00139 
00140   // PAST IR.
00141   int           use_past;
00142   int           past_optimize_loop_bounds;
00143 
00144   // Ptile.
00145   int           ptile;
00146   int           ptile_fts;
00147 
00148   // Punroller.
00149   int           punroll;
00150   int           punroll_and_jam;
00151   int           punroll_size;
00152   int           nb_registers;
00153 
00154   // Vectorizer.
00155   int           vectorizer;
00156   int           vectorizer_mark_par_loops;
00157   int           vectorizer_mark_vect_loops;
00158   int           vectorizer_vectorize_loops;
00159   int           vectorizer_keep_outer_par_loops;
00160   int           vectorizer_sink_all_candidates;
00161 
00162   // Storage compaction.
00163   int           storage_compaction;
00164   int           array_contraction_keep_outer_par_loops;
00165   int           array_contraction_keep_vectorized_loops;
00166 
00167   // CLAST annotation/translation.
00168   int           clastannotation_pass;
00169 
00170 };
00171 typedef struct s_pocc_options s_pocc_options_t;
00172 
00173 
00174 
00175 BEGIN_C_DECLS
00176 
00177 extern
00178 s_pocc_options_t* pocc_options_malloc ();
00179 
00180 extern
00181 void pocc_options_init_cloog (s_pocc_options_t* options);
00182 
00183 extern
00184 void pocc_options_free (s_pocc_options_t* options);
00185 
00186 
00187 END_C_DECLS
00188 
00189 
00190 
00191 #endif // POCC_OPTIONS_H