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