Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
config_ipa.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 /* ====================================================================
00037  * ====================================================================
00038  *
00039  *
00040  * Revision history:
00041  *  11-Apr-96 - Original Version
00042  *
00043  * Description:
00044  *
00045  * ====================================================================
00046  * ====================================================================
00047  */
00048 
00049 #ifndef config_ipa_INCLUDED
00050 #define config_ipa_INCLUDED
00051 
00052 struct skiplist;
00053 struct option_list;
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif /* __cplusplus */
00058 
00059 /* Defined in config.h -- here too to avoid including that: */
00060 extern BOOL Tracing_Enabled;    /* Any trace options set? */
00061 
00062 /* ====================================================================
00063  * List of global variables that are set by the -IPA option group
00064  * ====================================================================
00065  */
00066 
00067 /* ===== Feature enable flags: ===== */
00068 extern BOOL IPA_Enable_DFE;             /* Dead Function Elimination */
00069 extern BOOL IPA_Enable_DFE_Set;         /* ... explicitly set? */
00070 extern BOOL IPA_Enable_Inline;          /* Inlining */
00071 extern BOOL IPA_Enable_Picopt;          /* PIC optimization */
00072 extern BOOL IPA_Enable_AutoGnum;        /* AutoGnum optimization */
00073 extern BOOL IPA_Enable_BarrierFarg; /* Barrier for aliased Fortran actual */
00074 extern BOOL IPA_Enable_Opt_Alias;       /* WOPT uses alias/mod/ref */
00075 extern BOOL IPA_Enable_Simple_Alias;    /* Simple alias/mod/ref */
00076 extern BOOL IPA_Enable_Addressing;      /* Addr_taken analysis */
00077 extern BOOL IPA_Enable_Readonly_Ref;    /* find out readonly ref parameter */
00078 extern BOOL IPA_Enable_Cprop;           /* Constant Propagation */
00079 extern BOOL IPA_Enable_Cprop2;          /* Aggressive constant propagation */
00080 extern BOOL IPA_Enable_Assert;          /* assert cprop value */
00081 extern BOOL IPA_Enable_daVinci;         /* Graphical display of call graph */
00082 extern BOOL IPA_Enable_ipacom;          /* Call ipacom after IPA */
00083 extern BOOL IPA_Enable_final_link;      /* Final link step */
00084 extern BOOL IPA_Enable_Memtrace;        /* Memory trace */
00085 extern BOOL IPA_Enable_DST;             /* Generate DST */
00086 extern BOOL IPA_Enable_DCE;             /* Enable Dead Call Elimination */
00087 extern BOOL IPA_Enable_Exc;             /* Enable exception handling */
00088 extern BOOL IPA_Enable_Recycle;         /* Enable recycling of variables */
00089 extern BOOL IPA_Enable_DVE;             /* Enable Dead Variable Elimination */
00090 extern BOOL IPA_Enable_CGI;             /* Enable Constant Global Variable
00091                                          * Identification */
00092 extern BOOL IPA_Enable_Copy_Prop;       /* Copy propagation during inlining */
00093 extern BOOL IPA_Enable_Padding;         /* Intra-Dimension padding 
00094                                          * of common block variables */
00095 extern UINT32 IPA_Common_Pad_Size;      /* Amount by which to pad commons */
00096 extern BOOL IPA_Enable_Split_Common;    /* Enable split common inside IPA */
00097 extern BOOL IPA_Enable_Cloning;         /* Enable Cloning in conjunction
00098                                          * with constant propagation */
00099                                            
00100 extern BOOL IPA_Echo_Commands;          /* Echo back end command lines */
00101 extern BOOL IPA_Enable_Lang;            /* support inlining across language
00102                                            boundaries */
00103 extern BOOL IPA_Enable_Preempt;         /* allow the user to specify that
00104                                            functions are not preemptible */
00105 extern BOOL IPA_Enable_Flow_Analysis;   /* flow-sensitive analysis */
00106 extern BOOL IPA_Enable_Array_Sections;  /* array section analysis in IPA */
00107 extern BOOL IPA_Enable_Array_Summary;   /* array section summary in IPL */
00108 extern BOOL IPA_Enable_Scalar_Euse;     /* enable scalar euse  */
00109 extern BOOL IPA_Enable_Scalar_Kill;     /* enable scalar kill   */
00110 extern BOOL IPA_Enable_Common_Const;    /* enable const prop of common block variables */
00111 extern BOOL IPA_Enable_Relocatable_Opt; /* support -call_shared optimizations of relocatable objects */
00112 extern BOOL IPA_Enable_Feedback;        /* create .prg, .dfe, .dve files */
00113 extern BOOL IPA_Enable_Alias_Class;     /* interprocedural alias classification */
00114 extern BOOL IPA_Debug_AC_Temp_Files;    /* save alias class temps til done? */
00115 extern BOOL IPA_Enable_Reshape;         /* reshape analysis for arrays  */
00116 
00117 extern BOOL IPA_Enable_Preopt;          /* call preopt during IPA */
00118 extern BOOL IPA_Enable_Preopt_Set;
00119 
00120 /* ===== Inlining heuristics: ===== */
00121 
00122 /* max. bloat % of the entire program */
00123 extern UINT32   IPA_Bloat_Factor;
00124 extern BOOL     IPA_Bloat_Factor_Set;
00125 
00126 extern UINT32   IPA_PU_Limit;   /* Max nodes per PU after inlining */
00127 extern BOOL     IPA_PU_Limit_Set;       /* if IPA_PU_Limit is set by user */
00128 
00129 /* absolute max. # of nodes per PU after inlining (1.25 * IPA_PU_Limit) */
00130 extern UINT32   IPA_PU_Hard_Limit;
00131 extern BOOL     IPA_PU_Hard_Limit_Set;
00132 
00133 /* Size of small PU that's always inlined */
00134 extern UINT32   IPA_PU_Minimum_Size;
00135 
00136 /* Callees larger than this size are not inlined, except ...  */
00137 extern UINT32   IPA_Small_Callee_Limit; 
00138 
00139 extern UINT32   IPA_Max_Depth;          /* maximum depth to inline */
00140 extern UINT32   IPA_Force_Depth;        /* force inlining to depth n
00141                                          * regardless of size */
00142 extern BOOL     IPA_Force_Depth_Set;
00143 
00144 /* 100th% of call freq lower than which will not inlined */
00145 extern UINT32   IPA_Min_Freq;   
00146 
00147 /* % of time that an inlined callee is called by its caller */
00148 extern UINT32   IPA_Rela_Freq;  
00149 
00150 /* only routines "hotter" than this will be inlined */
00151 extern UINT32  IPA_Min_Hotness;
00152 
00153 /* ignore zero-freq. statements when estimating size of a PU */
00154 extern BOOL     IPA_Use_Effective_Size;
00155 
00156 /* ===== Miscellaneous -IPA options: ===== */
00157 
00158 extern BOOL     IPA_Enable_Merge_ty;    /* merge types across files */
00159 extern UINT32   IPA_Max_Jobs;   /* concurrent backend compilations */
00160 extern BOOL     IPA_Max_Jobs_Set;
00161 
00162 /* max. gp-relative space available for auto Gnum */
00163 extern UINT32   IPA_Gspace;     
00164 
00165 /* user specified -G num */
00166 extern UINT32   IPA_user_gnum;  
00167 
00168 /* user defined percentage used to multiply the estimated External GOT entries with for estimating the total .got size */
00169 extern UINT32   IPA_Extgot_Factor;
00170 
00171 /* user defined number of Fortran Intrinsics used, for purpose of
00172    estimating the number of GOTs  */
00173 extern UINT32   IPA_Num_Fortran_Intrinsics;
00174 extern BOOL     IPA_Has_Fortran;
00175 
00176 /* maximum size of address space used for the entire input source to
00177  * be mapped in without converting to the SAVE_SPACE mode
00178  */
00179 extern UINT32   IPA_Map_Limit;
00180 
00181 /* In case the program is too big that it needs multigot, we would
00182  * still like to get some of the PICOPT by partitioning the program
00183  * into different partitions.  Each partition is treated like a
00184  * seperate compilation unit that IPA can do all its optimization
00185  * on, sort-of like a shared object by itself.  There will be NO 
00186  * cross-inlining between different partitions.
00187  * Each "visible" entries into the partition are at best considered
00188  * as PROTECTED symbols.
00189  * There will also be a "COMMON" partition that all the other
00190  * partitions can inline from, but every function in the
00191  * "COMMON" partition are treated just like the "visible" entry
00192  * in the other partitions.  All defined global variables in a
00193  * certain partition can be marked as GP-relative, but the same
00194  * global variable used in another partition CANNOT be marked 
00195  * as GP-relative.  This option is either turned on by the user
00196  * or by IPA when -multigot is on or the SAVE_SPACE option is on
00197  */
00198 extern BOOL     IPA_Enable_SP_Partition;   
00199 extern BOOL     IPA_Enable_GP_Partition;   
00200 
00201 #define DEFAULT_ACCESS_MODE     0
00202 #define SAVE_SPACE_MODE         1
00203 #define IPA_DEVWARN_LIMIT       2
00204 
00205 extern BOOL IPA_Space_Access_Mode;
00206 
00207 extern struct option_list *IPA_Group_Names;     /* partition groupings */
00208 extern struct option_list *IPA_Spec_Files;      /* Specification files for IPA options, particularly used for partition groupings */
00209 
00210 
00211 extern struct option_list *IPA_Skip;    /* List of skip options */
00212 extern BOOL     IPA_Skip_Report;        /* Report skip count */
00213 
00214 extern BOOL     IPA_Enable_Keeplight;   /* Only keep .I and .o under the
00215                                          * .ipakeep directory
00216                                          */
00217 
00218 extern BOOL     IPA_Enable_Cord;        /* Enable procedure reordering. */
00219 extern BOOL     IPA_Enable_Linearization; /* Enable linearization of array
00220                                             expressions */ 
00221 
00222 extern BOOL     IPA_Use_Intrinsic;      /* Load Intrinsic libraries */
00223 extern BOOL     IPA_Enable_Inline_Nested_PU;   /* Enable inlining of nested PU */
00224 extern BOOL     IPA_Enable_Inline_Struct;   /* Enable inlining of PU with F90 structures */
00225 extern BOOL     IPA_Enable_Inline_Char_Array;   /* Enable inlining of PU with char arrays */
00226 extern BOOL     IPA_Enable_Inline_Optional_Arg;   /* Enable inlining of PU with optional arguments */
00227 extern BOOL     IPA_Enable_Inline_Struct_Array_Actual;   /* Enable inlining of PU with F90 structures with actuals being array type */
00228 extern BOOL     IPA_Enable_Inline_Var_Dim_Array;   /* Enable inlining of PU with param that is variable-dimensioned array */
00229 
00230 
00231 /* Maximum number of clones for a call graph node */
00232 extern UINT32 IPA_Max_Node_Clones;
00233 extern BOOL   IPA_Max_Node_Clones_Set;
00234 
00235 /* Maximum % increase of the call graph size through node cloning */
00236 extern UINT32 IPA_Max_Clone_Bloat;
00237   
00238 /* Max. "size" of each output file */
00239 extern UINT32 IPA_Max_Output_File_Size;
00240 
00241 /* percentage change of the max. output file size */
00242 extern INT32 IPA_Output_File_Size;
00243     
00244 /* ====================================================================
00245  * List of global variables that are set by the -INLINE option group.
00246  * ====================================================================
00247  */
00248 
00249 /* What is the default inlining behavior? */
00250 extern BOOL     INLINE_Enable;  /* If FALSE, disable inliner? */
00251 extern BOOL     INLINE_All;     /* Inline everything possible? */
00252 extern BOOL     INLINE_Optimize_Alloca; /* When inlining calls with alloca fix the stack and pop  */
00253 extern BOOL     INLINE_Enable_Copy_Prop; /* Copy Propogation during stand-alone inlining? */
00254 extern BOOL     INLINE_Enable_Subst_Copy_Prop; /* Aggressive substitution of actual for formal and hence Copy Propogation during stand-alone inlining */
00255 extern BOOL     INLINE_Enable_Split_Common;  /* Enable split common: inliner */
00256 extern BOOL     INLINE_F90;  /* Enable recognition of F90 in parameter type compatibility */
00257 extern BOOL     INLINE_None;    /* Inline nothing? */
00258 extern BOOL     INLINE_Exceptions;      /* Inline exception code? */
00259 extern BOOL     INLINE_Keep_PU_Order;   /* Retain input PU order? */
00260 extern BOOL     INLINE_List_Actions;    /* List inline actions? */
00261 extern UINT32   INLINE_Max_Pu_Size;      /* Max size of pu : default 5000 */
00262 extern BOOL     INLINE_Preemptible;     /* Inline preemptible PUs? */
00263 extern BOOL     INLINE_Static;          /* Inline static fns? */
00264 extern BOOL     INLINE_Static_Set;      /* explicitly set */
00265 extern BOOL     INLINE_Aggressive;      /* inline even non-leaf, out-of-loop
00266                                            calls */ 
00267 extern BOOL     INLINE_Enable_DFE;     /* dead function elimination */
00268 extern BOOL     INLINE_Enable_Auto_Inlining;    /* automatic inline analysis */
00269 extern BOOL     INLINE_Enable_Restrict_Pointers; /* allow restrict pointers */
00270 
00271 extern struct option_list *INLINE_List_Names;   /* Must/never/file/library 
00272                                                    options */
00273 extern struct option_list *INLINE_Spec_Files;   /* Specification files     */
00274 extern UINT32  INLINE_Skip_After;   /* skip inline edges > specified */
00275 extern UINT32  INLINE_Skip_Before;   /* skip inline edges < specified */
00276 extern BOOL    INLINE_Array_Bounds;     /* "conforming" array bounds */
00277 extern BOOL    INLINE_Use_Malloc_Mempool;     /* Use Malloc Mempool for cloning */
00278 extern BOOL    INLINE_Free_Malloc_Mempool;     /* Free Malloc Mempool for cloning */
00279 extern BOOL    INLINE_Inlined_Pu_Call_Graph;   /* lightweight inliner impl 2 -- build only a call graph with PU tagged inline */
00280 extern BOOL    INLINE_Inlined_Pu_Call_Graph2;  /* lightweight inliner impl 3 -- build only a call graph with PU tagged inline and its callers */
00281 extern BOOL    INLINE_Get_Time_Info;          /* Generate timing info for different phases of the inliner */
00282 
00283 
00284 #ifdef __cplusplus
00285 }
00286 #endif /* __cplusplus */
00287     
00288 #endif /* config_ipa_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines