00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055 #include "config_ipa.h"
00056
00057
00058 char *Ipa_File_Name = NULL;
00059 FILE *Ipa_File = NULL;
00060
00061
00062 typedef struct skiplist SKIPLIST;
00063 SKIPLIST *Build_Skiplist ( OPTION_LIST *olist );
00064
00065
00066
00067
00068
00069
00070 #define DEFAULT_BLOAT_FACTOR 100
00071 #define DEFAULT_PU_LIMIT 2500
00072 #define DEFAULT_HARD_LIMIT (2500 + (2500 >> 2))
00073 #define DEFAULT_SMALL_PU 30
00074 #define DEFAULT_SMALL_CALLEE 500
00075 #define DEFAULT_MIN_FREQ 100
00076 #define DEFAULT_MIN_HOTNESS 100
00077 #define DEFAULT_RELA_FREQ 50
00078 #define DEFAULT_INLINE_Max_Pu_Size 5000
00079 #define DEFAULT_CLONE_BLOAT_FACTOR 100
00080 #define DEFAULT_EXTGOT_FACTOR 200
00081 #define DEFAULT_NUM_FORTRAN_INTR 100
00082 #define DEFAULT_MAP_LIMIT 0x1fff0000
00083
00084
00085
00086
00087
00088 #define DEFAULT_OUTPUT_FILE_SIZE 10000
00089
00090
00091
00092
00093
00094 BOOL IPA_Enable_DFE = TRUE;
00095 BOOL IPA_Enable_DFE_Set = FALSE;
00096 BOOL IPA_Enable_Inline = TRUE;
00097 BOOL IPA_Enable_Picopt = TRUE;
00098 BOOL IPA_Enable_AutoGnum = TRUE;
00099 BOOL IPA_Enable_Opt_Alias =FALSE;
00100 BOOL IPA_Enable_Simple_Alias = TRUE;
00101 BOOL IPA_Enable_Addressing = TRUE;
00102 BOOL IPA_Enable_BarrierFarg = FALSE;
00103 BOOL IPA_Enable_Alias_Class = TRUE;
00104 BOOL IPA_Debug_AC_Temp_Files = FALSE;
00105 BOOL IPA_Enable_Readonly_Ref = TRUE;
00106 BOOL IPA_Enable_Cprop = TRUE;
00107 BOOL IPA_Enable_Cprop2 = TRUE;
00108 BOOL IPA_Enable_Assert = FALSE;
00109
00110 BOOL IPA_Enable_daVinci = FALSE;
00111 BOOL IPA_Enable_ipacom = TRUE;
00112 BOOL IPA_Enable_final_link = TRUE;
00113 BOOL IPA_Enable_Memtrace = FALSE;
00114 BOOL IPA_Enable_DST = TRUE;
00115 BOOL IPA_Enable_DCE = TRUE;
00116 BOOL IPA_Enable_Exc = TRUE;
00117 BOOL IPA_Enable_Recycle = TRUE;
00118 BOOL IPA_Enable_DVE = TRUE;
00119 BOOL IPA_Enable_CGI = TRUE;
00120
00121 BOOL IPA_Enable_Copy_Prop = TRUE;
00122 BOOL IPA_Enable_Padding = TRUE;
00123
00124 UINT32 IPA_Common_Pad_Size = 0;
00125
00126 BOOL IPA_Enable_Cloning = TRUE;
00127
00128 BOOL IPA_Enable_Lang = FALSE;
00129 BOOL IPA_Enable_Relocatable_Opt = FALSE;
00130 BOOL IPA_Enable_Split_Common = TRUE;
00131 BOOL IPA_Enable_Array_Sections = TRUE;
00132 BOOL IPA_Enable_Array_Summary = FALSE;
00133
00134 BOOL IPA_Enable_Scalar_Euse = FALSE;
00135 BOOL IPA_Enable_Scalar_Kill = FALSE;
00136 BOOL IPA_Enable_Common_Const = TRUE;
00137 BOOL IPA_Enable_Feedback = FALSE;
00138
00139
00140 BOOL IPA_Echo_Commands = FALSE;
00141
00142
00143 UINT32 IPA_Bloat_Factor = DEFAULT_BLOAT_FACTOR;
00144 BOOL IPA_Bloat_Factor_Set = FALSE;
00145
00146 UINT32 IPA_PU_Limit = DEFAULT_PU_LIMIT;
00147 BOOL IPA_PU_Limit_Set = FALSE;
00148
00149
00150 UINT32 IPA_PU_Hard_Limit = DEFAULT_HARD_LIMIT;
00151 BOOL IPA_PU_Hard_Limit_Set = FALSE;
00152
00153
00154 UINT32 IPA_PU_Minimum_Size = DEFAULT_SMALL_PU;
00155
00156
00157 UINT32 IPA_Small_Callee_Limit = DEFAULT_SMALL_CALLEE;
00158
00159 UINT32 IPA_Max_Depth = UINT32_MAX;
00160 UINT32 IPA_Force_Depth = 0;
00161
00162 BOOL IPA_Force_Depth_Set = FALSE;
00163 BOOL IPA_Enable_Merge_ty = TRUE;
00164 UINT32 IPA_Max_Jobs = 0;
00165 BOOL IPA_Max_Jobs_Set = FALSE;
00166
00167
00168 UINT32 IPA_Min_Freq = DEFAULT_MIN_FREQ;
00169
00170
00171 UINT32 IPA_Rela_Freq = DEFAULT_RELA_FREQ;
00172
00173
00174 UINT32 IPA_Min_Hotness = DEFAULT_MIN_HOTNESS;
00175
00176
00177 BOOL IPA_Use_Effective_Size = TRUE;
00178
00179
00180 UINT32 IPA_Gspace = DEFAULT_GSPACE - 72;
00181
00182
00183 UINT32 IPA_Extgot_Factor = 0;
00184
00185
00186
00187 UINT32 IPA_Num_Fortran_Intrinsics = DEFAULT_NUM_FORTRAN_INTR;
00188 BOOL IPA_Has_Fortran = FALSE;
00189
00190
00191 UINT32 IPA_user_gnum = 0;
00192
00193 OPTION_LIST *IPA_Skip = NULL;
00194 BOOL IPA_Skip_Report = FALSE;
00195
00196 BOOL IPA_Enable_Preempt = FALSE;
00197
00198
00199 BOOL IPA_Enable_Flow_Analysis = TRUE;
00200
00201
00202
00203
00204 UINT32 IPA_Map_Limit = DEFAULT_MAP_LIMIT;
00205
00206 BOOL IPA_Enable_SP_Partition = FALSE;
00207
00208
00209
00210 BOOL IPA_Enable_GP_Partition = FALSE;
00211
00212
00213
00214 BOOL IPA_Space_Access_Mode = DEFAULT_ACCESS_MODE;
00215
00216 BOOL IPA_Enable_Keeplight = TRUE;
00217
00218
00219
00220 BOOL IPA_Enable_Cord = FALSE;
00221 BOOL IPA_Enable_Linearization = FALSE;
00222 BOOL IPA_Use_Intrinsic = FALSE;
00223
00224 BOOL IPA_Enable_Inline_Nested_PU = TRUE;
00225
00226 BOOL IPA_Enable_Reshape = TRUE;
00227 BOOL IPA_Enable_Inline_Struct = TRUE;
00228 BOOL IPA_Enable_Inline_Char_Array = TRUE;
00229 BOOL IPA_Enable_Inline_Optional_Arg = TRUE;
00230 BOOL IPA_Enable_Inline_Struct_Array_Actual = TRUE;
00231 BOOL IPA_Enable_Inline_Var_Dim_Array = TRUE;
00232
00233
00234 BOOL IPA_Enable_Preopt = FALSE;
00235 BOOL IPA_Enable_Preopt_Set = FALSE;
00236
00237
00238 UINT32 IPA_Max_Node_Clones = 0;
00239 BOOL IPA_Max_Node_Clones_Set = FALSE;
00240
00241
00242 UINT32 IPA_Max_Clone_Bloat = DEFAULT_CLONE_BLOAT_FACTOR;
00243
00244
00245 UINT32 IPA_Max_Output_File_Size = DEFAULT_OUTPUT_FILE_SIZE;
00246
00247
00248 INT32 IPA_Output_File_Size = 0;
00249
00250
00251 static OPTION_DESC Options_IPA[] = {
00252 { OVK_BOOL, OV_VISIBLE, FALSE, "addressing", "",
00253 0, 0, 0, &IPA_Enable_Addressing, NULL,
00254 "Enable address-taken analysis" },
00255 { OVK_BOOL, OV_VISIBLE, FALSE, "readonly_parameter", "",
00256 0, 0, 0, &IPA_Enable_Readonly_Ref, NULL,
00257 "Enable identification of read-only reference parameters" },
00258 { OVK_BOOL, OV_VISIBLE, FALSE, "aggr_cprop", "",
00259 0, 0, 0, &IPA_Enable_Cprop2, NULL,
00260 "Enable aggressive constant propagation" },
00261 { OVK_BOOL, OV_VISIBLE, FALSE, "alias", "",
00262 0, 0, 0, &IPA_Enable_Simple_Alias,NULL,
00263 "Enable variable mod, use, and alias analysis" },
00264 { OVK_BOOL, OV_INTERNAL, FALSE, "array_section", "",
00265 0, 0, 0, &IPA_Enable_Array_Sections, NULL,
00266 "Enable interprocedural array section analysis " },
00267 { OVK_BOOL, OV_INTERNAL, FALSE, "array_summary", "",
00268 0, 0, 0, &IPA_Enable_Array_Summary, NULL,
00269 "Enable local array section summary" },
00270 { OVK_BOOL, OV_INTERNAL, FALSE, "scalar_kill", "",
00271 0, 0, 0, &IPA_Enable_Scalar_Kill, NULL,
00272 "Enable scalar kill analysis" },
00273 { OVK_BOOL, OV_INTERNAL, FALSE, "scalar_euse", "",
00274 0, 0, 0, &IPA_Enable_Scalar_Euse, NULL,
00275 "Enable scalar euse analysis" },
00276 { OVK_BOOL, OV_VISIBLE, FALSE, "common_cprop", "",
00277 0, 0, 0, &IPA_Enable_Common_Const, NULL,
00278 "Enable common constant propagation" },
00279 { OVK_BOOL, OV_VISIBLE, FALSE, "autognum", "",
00280 0, 0, 0, &IPA_Enable_AutoGnum, NULL,
00281 "Enable automatic gp-relative data allocation" },
00282 { OVK_BOOL, OV_INTERNAL, FALSE, "barrier_aliasfarg", "",
00283 0, 0, 0, &IPA_Enable_BarrierFarg, NULL,
00284
00285
00286
00287
00288 "Enable barrier gen. " },
00289 { OVK_BOOL, OV_VISIBLE, FALSE, "cgi", "",
00290 0, 0, 0, &IPA_Enable_CGI, NULL,
00291 "Enable constant global variable identification" },
00292 { OVK_BOOL, OV_SHY, FALSE, "compile", "",
00293 0, 0, 0, &IPA_Enable_ipacom, NULL,
00294 "Enable final back-end compilation" },
00295 { OVK_BOOL, OV_SHY, FALSE, "link", "",
00296 0, 0, 0, &IPA_Enable_final_link, NULL,
00297 "Enable final link step" },
00298 { OVK_BOOL, OV_VISIBLE, FALSE, "copy_prop", "",
00299 0, 0, 0, &IPA_Enable_Copy_Prop, NULL,
00300 "Enable interprocedural copy propagation" },
00301 { OVK_BOOL, OV_VISIBLE, FALSE, "cprop", "",
00302 0, 0, 0, &IPA_Enable_Cprop, NULL,
00303 "Enable constant propagation" },
00304 { OVK_BOOL, OV_INTERNAL, FALSE, "assert", "",
00305 0, 0, 0, &IPA_Enable_Assert, NULL,
00306 "Enable assertion for constant propagation" },
00307 { OVK_BOOL, OV_VISIBLE, FALSE, "clone", "",
00308 0, 0, 0, &IPA_Enable_Cloning, NULL,
00309 "Enable subprogram cloning" },
00310 { OVK_UINT32, OV_INTERNAL, FALSE, "multi_clone", "",
00311 0, 0, UINT32_MAX, &IPA_Max_Node_Clones, &IPA_Max_Node_Clones_Set,
00312 "Maximum clones per call graph node" },
00313 { OVK_UINT32, OV_INTERNAL, FALSE, "node_bloat", "",
00314 DEFAULT_CLONE_BLOAT_FACTOR, 0, UINT32_MAX, &IPA_Max_Clone_Bloat,NULL,
00315 "Maximum call graph bloat with cloning" },
00316 { OVK_BOOL, OV_VISIBLE, FALSE, "dce", "",
00317 0, 0, 0, &IPA_Enable_DCE, NULL,
00318 "Enable dead code elimination" },
00319 { OVK_BOOL, OV_VISIBLE, FALSE, "dve", "",
00320 0, 0, 0, &IPA_Enable_DVE, NULL,
00321 "Enable dead variable elimination" },
00322 { OVK_UINT32,OV_VISIBLE, FALSE, "depth", "",
00323 UINT32_MAX, 0, UINT32_MAX,&IPA_Max_Depth, NULL,
00324 "Limit inlining depth" },
00325 { OVK_UINT32,OV_VISIBLE, FALSE, "maxdepth", "",
00326 UINT32_MAX, 0, UINT32_MAX,&IPA_Max_Depth, NULL,
00327 "Limit inlining depth" },
00328 { OVK_UINT32,OV_VISIBLE, FALSE, "forcedepth", "",
00329 UINT32_MAX, 0, UINT32_MAX, &IPA_Force_Depth, &IPA_Force_Depth_Set,
00330 "Inline to at least this depth" },
00331 { OVK_BOOL, OV_VISIBLE, FALSE, "dfe", "",
00332 0, 0, 0, &IPA_Enable_DFE, &IPA_Enable_DFE_Set,
00333 "Enable dead function elimination" },
00334 { OVK_BOOL, OV_INTERNAL, FALSE, "dst", "",
00335 0, 0, 0, &IPA_Enable_DST, NULL},
00336 { OVK_BOOL, OV_VISIBLE, FALSE, "echo_commands", "",
00337 0, 0, 0, &IPA_Echo_Commands, NULL,
00338 "Echo back end compilation commands" },
00339 { OVK_BOOL, OV_INTERNAL, FALSE, "exc", "",
00340 0, 0, 0, &IPA_Enable_Exc, NULL},
00341 { OVK_BOOL, OV_INTERNAL, FALSE, "flow_analysis", "",
00342 0, 0, 0, &IPA_Enable_Flow_Analysis, NULL},
00343 { OVK_BOOL, OV_INTERNAL, FALSE, "gp_partition", "",
00344 0, 0, 0, &IPA_Enable_GP_Partition, NULL},
00345 { OVK_BOOL, OV_INTERNAL, FALSE, "graph", "",
00346 0, 0, 0, &IPA_Enable_daVinci, NULL,
00347 "Generate call-graph display" },
00348 { OVK_UINT32,OV_VISIBLE, FALSE, "Gspace", "",
00349 DEFAULT_GSPACE, 0, DEFAULT_GSPACE, &IPA_Gspace, NULL},
00350 { OVK_UINT32,OV_VISIBLE, FALSE, "Gnum", "",
00351 DEFAULT_GSPACE, 0, DEFAULT_GSPACE, &IPA_user_gnum, NULL,
00352 "Specific size limit for data in gp-relative space" },
00353 { OVK_UINT32,OV_INTERNAL, FALSE, "Gfactor", "",
00354 DEFAULT_EXTGOT_FACTOR, 0, UINT32_MAX, &IPA_Extgot_Factor, NULL,
00355 "Percentage used to multiply the number of External GOTs, for AutoGnum purpose" },
00356 { OVK_UINT32,OV_VISIBLE, FALSE, "hard_plimit", "",
00357 DEFAULT_HARD_LIMIT, 0, UINT32_MAX,
00358 &IPA_PU_Hard_Limit, &IPA_PU_Hard_Limit_Set },
00359 { OVK_BOOL, OV_SHY, FALSE, "ignore_lang", "",
00360 0, 0, 0, &IPA_Enable_Lang, NULL},
00361 { OVK_BOOL, OV_VISIBLE, FALSE, "inline", "",
00362 0, 0, 0, &IPA_Enable_Inline, NULL,
00363 "Enable subprogram inlining" },
00364 { OVK_NAME, OV_INTERNAL, FALSE, "ipaa_summary_file", "",
00365 0, 0, 0, &Ipa_File_Name, NULL,
00366 "File name for IP alias analysis summary" },
00367 { OVK_UINT32,OV_INTERNAL, FALSE, "intrinsics", "intr",
00368 DEFAULT_NUM_FORTRAN_INTR, 0, UINT32_MAX,
00369 &IPA_Num_Fortran_Intrinsics, NULL,
00370 "Number of FORTRAN intrinsics used" },
00371 { OVK_BOOL, OV_INTERNAL, FALSE, "keeplight", "",
00372 0, 0, 0, &IPA_Enable_Keeplight, NULL},
00373 { OVK_UINT32,OV_INTERNAL, FALSE, "map_limit", "",
00374 DEFAULT_MAP_LIMIT, 0, UINT32_MAX, &IPA_Map_Limit, NULL},
00375 { OVK_UINT32,OV_VISIBLE, FALSE, "max_jobs", "",
00376 0, 0, UINT32_MAX, &IPA_Max_Jobs, &IPA_Max_Jobs_Set,
00377 "Maximum number of concurrent back-end jobs" },
00378 { OVK_BOOL, OV_INTERNAL, FALSE, "merge_ty", "",
00379 0, 0, 0, &IPA_Enable_Merge_ty, NULL},
00380 { OVK_BOOL, OV_INTERNAL, FALSE, "use_effective_size", "",
00381 0, 0, 0, &IPA_Use_Effective_Size, NULL},
00382 { OVK_OBSOLETE,OV_INTERNAL, FALSE, "min_freq", "",
00383 DEFAULT_MIN_FREQ, 0, 10000, &IPA_Min_Freq, NULL},
00384 { OVK_UINT32,OV_SHY, FALSE, "min_hotness", "",
00385 DEFAULT_MIN_HOTNESS, 0, UINT32_MAX, &IPA_Min_Hotness, NULL},
00386 { OVK_BOOL, OV_INTERNAL, FALSE, "reshape", "",
00387 0, 0, 0, &IPA_Enable_Reshape, NULL,
00388 "Reshape analysis for IPA" },
00389 { OVK_BOOL, OV_INTERNAL, FALSE, "opt_alias", "",
00390 0, 0, 0, &IPA_Enable_Opt_Alias, NULL,
00391 "Use IPA alias information in WOPT" },
00392 { OVK_BOOL, OV_INTERNAL, FALSE, "pad", "",
00393 0, 0, 0, &IPA_Enable_Padding, NULL,
00394 "Enable padding of common block arrays"},
00395 { OVK_UINT32, OV_INTERNAL, FALSE, "common_pad_size", "",
00396 0, 1, 1000, &IPA_Common_Pad_Size, NULL,
00397 "Amount by which to pad common block array dimensions" },
00398 { OVK_LIST, OV_SHY, FALSE, "partition_group", "",
00399 0, 0, 0, &IPA_Group_Names, NULL },
00400 { OVK_LIST, OV_VISIBLE, FALSE, "specfile", "spec",
00401 0, 0, 0, &IPA_Spec_Files, NULL,
00402 "Identify IPA specification filename" },
00403 { OVK_BOOL, OV_SHY, FALSE, "sp_partition", "",
00404 0, 0, 0, &IPA_Enable_SP_Partition, NULL},
00405 { OVK_BOOL, OV_VISIBLE, FALSE, "picopt", "",
00406 0, 0, 0, &IPA_Enable_Picopt, NULL,
00407 "Enable shared code optimizations" },
00408 { OVK_BOOL, OV_VISIBLE, FALSE, "preempt", "",
00409 0, 0, 0, &IPA_Enable_Preempt, NULL},
00410 { OVK_UINT32, OV_VISIBLE, FALSE, "plimit", "",
00411 DEFAULT_PU_LIMIT, 0, UINT32_MAX, &IPA_PU_Limit, &IPA_PU_Limit_Set},
00412 { OVK_UINT32, OV_SHY, FALSE, "callee_limit", "",
00413 DEFAULT_SMALL_CALLEE, 0, UINT32_MAX, &IPA_Small_Callee_Limit, NULL},
00414 { OVK_BOOL, OV_INTERNAL, FALSE, "recycle", "",
00415 0, 0, 0, &IPA_Enable_Recycle, NULL},
00416 { OVK_BOOL, OV_SHY, FALSE, "relopt", "",
00417 0, 0, 0, &IPA_Enable_Relocatable_Opt, NULL},
00418 { OVK_OBSOLETE, OV_VISIBLE, FALSE, "rela_freq", "",
00419 DEFAULT_RELA_FREQ, 0, 100, &IPA_Rela_Freq, NULL},
00420 { OVK_LIST, OV_VISIBLE, FALSE, "skip_after", "",
00421 0, 0, 0, &IPA_Skip, NULL},
00422 { OVK_LIST, OV_VISIBLE, FALSE, "skip_before", "",
00423 0, 0, 0, &IPA_Skip, NULL},
00424 { OVK_LIST, OV_VISIBLE, FALSE, "skip_equal", "",
00425 0, 0, 0, &IPA_Skip, NULL},
00426 { OVK_BOOL, OV_INTERNAL, FALSE, "skip_report", "",
00427 0, 0, 0, &IPA_Skip_Report, NULL,
00428 "Report PU numbers for skip control" },
00429 { OVK_UINT32, OV_VISIBLE, FALSE, "small_pu", "",
00430 DEFAULT_SMALL_PU, 1, UINT32_MAX, &IPA_PU_Minimum_Size, NULL },
00431 { OVK_UINT32, OV_VISIBLE, FALSE, "space", "",
00432 DEFAULT_BLOAT_FACTOR, 0, UINT32_MAX, &IPA_Bloat_Factor,
00433 &IPA_Bloat_Factor_Set},
00434 { OVK_BOOL, OV_INTERNAL, FALSE, "split", "",
00435 0, 0, 0, &IPA_Enable_Split_Common, NULL,
00436 "Enable IPA split common optimization" },
00437 { OVK_BOOL, OV_INTERNAL, FALSE, "cord", "",
00438 0, 0, 0, &IPA_Enable_Cord, NULL,
00439 "Enable procedure reordering" },
00440 { OVK_BOOL, OV_VISIBLE, FALSE, "linear", "",
00441 0, 0, 0, &IPA_Enable_Linearization, NULL,
00442 "Enable linearization of array subscripts" },
00443 { OVK_BOOL, OV_VISIBLE, FALSE, "use_intrinsic", "",
00444 0, 0, 0, &IPA_Use_Intrinsic, NULL,
00445 "Load Intrinsic Libraries" },
00446 { OVK_BOOL, OV_VISIBLE, FALSE, "feedback", "",
00447 0, 0, 0, &IPA_Enable_Feedback, NULL,
00448 "Create .pragma, .dfe, .dve files, " },
00449 { OVK_BOOL, OV_VISIBLE, FALSE, "class", "",
00450 0, 0, 0, &IPA_Enable_Alias_Class, NULL,
00451 "Enable interprocedural alias classification" },
00452 { OVK_BOOL, OV_VISIBLE, FALSE, "ac_temp", "",
00453 0, 0, 0, &IPA_Debug_AC_Temp_Files, NULL,
00454 "Save files from before alias classification" },
00455 { OVK_BOOL, OV_INTERNAL, FALSE, "nested", "",
00456 0, 0, 0, &IPA_Enable_Inline_Nested_PU, NULL,
00457 "Enable inlining of nested PU " },
00458 { OVK_BOOL, OV_INTERNAL, FALSE, "preopt", "",
00459 0, 0, 0, &IPA_Enable_Preopt, &IPA_Enable_Preopt_Set,
00460 "Enable calling the preopt" },
00461 { OVK_BOOL, OV_INTERNAL, FALSE, "struct", "",
00462 0, 0, 0, &IPA_Enable_Inline_Struct, NULL,
00463 "Enable inlining of PU with F90 structures " },
00464 { OVK_BOOL, OV_INTERNAL, FALSE, "char", "",
00465 0, 0, 0, &IPA_Enable_Inline_Char_Array, NULL,
00466 "Enable inlining of PU with char arrays " },
00467 { OVK_BOOL, OV_INTERNAL, FALSE, "optional", "",
00468 0, 0, 0, &IPA_Enable_Inline_Optional_Arg, NULL,
00469 "Enable inlining of PU with optional arguments " },
00470 { OVK_BOOL, OV_INTERNAL, FALSE, "array_struct", "",
00471 0, 0, 0, &IPA_Enable_Inline_Struct_Array_Actual, NULL,
00472 "Enable inlining of PU with F90 structures when actuals are of ARRAY type " },
00473 { OVK_INT32, OV_INTERNAL, FALSE, "output_file_size", "",
00474 0, -100, INT32_MAX, &IPA_Output_File_Size, NULL},
00475 { OVK_BOOL, OV_INTERNAL, FALSE, "var_dim_array", "",
00476 0, 0, 0, &IPA_Enable_Inline_Var_Dim_Array, NULL,
00477 "Enable inlining of PU with param that is variable-dim array " },
00478 { OVK_COUNT }
00479 };
00480
00481
00482
00483
00484
00485
00486
00487 BOOL INLINE_Enable = TRUE;
00488 BOOL INLINE_All = FALSE;
00489 BOOL INLINE_Optimize_Alloca = TRUE;
00490 BOOL INLINE_Enable_Copy_Prop = TRUE;
00491 BOOL INLINE_Enable_Subst_Copy_Prop = FALSE;
00492 BOOL INLINE_F90 = TRUE;
00493 BOOL INLINE_None = FALSE;
00494 BOOL INLINE_Exceptions = TRUE;
00495 BOOL INLINE_Keep_PU_Order = FALSE;
00496 BOOL INLINE_List_Actions = FALSE;
00497 UINT32 INLINE_Max_Pu_Size = DEFAULT_INLINE_Max_Pu_Size;
00498
00499 BOOL INLINE_Preemptible = FALSE;
00500 BOOL INLINE_Static = FALSE;
00501 BOOL INLINE_Static_Set = FALSE;
00502 BOOL INLINE_Aggressive = FALSE;
00503 BOOL INLINE_Enable_Split_Common = TRUE;
00504 BOOL INLINE_Enable_Auto_Inlining = TRUE;
00505 BOOL INLINE_Enable_Restrict_Pointers = FALSE;
00506
00507
00508 OPTION_LIST *INLINE_List_Names = NULL;
00509 OPTION_LIST *INLINE_Spec_Files = NULL;
00510 OPTION_LIST *IPA_Group_Names = NULL;
00511 OPTION_LIST *IPA_Spec_Files = NULL;
00512 UINT32 INLINE_Skip_After = UINT32_MAX;
00513 UINT32 INLINE_Skip_Before = 0;
00514 BOOL INLINE_Array_Bounds = FALSE;
00515 BOOL INLINE_Use_Malloc_Mempool = FALSE;
00516 BOOL INLINE_Free_Malloc_Mempool = FALSE;
00517
00518 BOOL INLINE_Inlined_Pu_Call_Graph = FALSE;
00519 BOOL INLINE_Inlined_Pu_Call_Graph2 = FALSE;
00520 BOOL INLINE_Get_Time_Info = FALSE;
00521
00522 static OPTION_DESC Options_INLINE[] = {
00523 { OVK_BOOL, OV_VISIBLE, FALSE, "", NULL,
00524 0, 0, 0, &INLINE_Enable, NULL,
00525 "Enable subprogram inlining" },
00526 { OVK_BOOL, OV_SHY, FALSE, "aggressive", "",
00527 0, 0, 0, &INLINE_Aggressive, NULL },
00528 { OVK_BOOL, OV_VISIBLE, FALSE, "all", "a",
00529 0, 0, 0, &INLINE_All, NULL,
00530 "Attempt to inline all subprograms" },
00531 { OVK_BOOL, OV_SHY, FALSE, "alloca", "alloca",
00532 0, 0, 0, &INLINE_Optimize_Alloca, NULL,
00533 "Enable save/restore of stack when inlining calls with alloca" },
00534 {OVK_BOOL, OV_VISIBLE, FALSE, "copy_prop_inline", "copy",
00535 0, 0, 0, &INLINE_Enable_Copy_Prop, NULL,
00536 "Enable inliner copy propagation" },
00537 { OVK_BOOL, OV_VISIBLE, FALSE, "dfe", "df",
00538 0, 0, 0, &IPA_Enable_DFE, &IPA_Enable_DFE_Set,
00539 "Enable dead function elimination" },
00540 { OVK_BOOL, OV_INTERNAL, FALSE, "exceptions", "exc",
00541 0, 0, 0, &INLINE_Exceptions, NULL },
00542 { OVK_LIST, OV_VISIBLE, FALSE, "file", "f",
00543 0, 0, 0, &INLINE_List_Names, NULL,
00544 "Identify files where inliner should search for subprograms" },
00545 { OVK_BOOL, OV_VISIBLE, FALSE, "keep_pu_order", "keep_pu",
00546 0, 0, 0, &INLINE_Keep_PU_Order, NULL,
00547 "Preserve source subprogram ordering" },
00548 { OVK_LIST, OV_VISIBLE, FALSE, "library", "lib",
00549 0, 0, 0, &INLINE_List_Names, NULL,
00550 "Identify archive libraries where inliner should search for subprograms" },
00551 { OVK_BOOL, OV_VISIBLE, FALSE, "list", "l",
00552 0, 0, 0, &INLINE_List_Actions, NULL,
00553 "Report inliner actions" },
00554 { OVK_UINT32, OV_VISIBLE, FALSE, "max_pu_size_inline", "max_pu_size",
00555 DEFAULT_INLINE_Max_Pu_Size, 0, UINT32_MAX,
00556 &INLINE_Max_Pu_Size, NULL,
00557 "Limit size of inlined subprograms" },
00558 { OVK_LIST, OV_VISIBLE, FALSE, "must", "m",
00559 0, 0, 0, &INLINE_List_Names, NULL,
00560 "Identify subprograms to be inlined" },
00561 { OVK_LIST, OV_VISIBLE, FALSE, "never", "ne",
00562 0, 0, 0, &INLINE_List_Names, NULL,
00563 "Identify subprograms not to inline" },
00564 { OVK_BOOL, OV_VISIBLE, FALSE, "none", "no",
00565 0, 0, 0, &INLINE_None, NULL,
00566 "Disable default inlining" },
00567 { OVK_BOOL, OV_SHY, FALSE, "preemptible", "preempt",
00568 0, 0, 0, &INLINE_Preemptible, NULL },
00569 { OVK_BOOL, OV_INTERNAL, FALSE, "recycle_symbols", "recycle",
00570 0, 0, 0, &IPA_Enable_Recycle, NULL },
00571 { OVK_LIST, OV_VISIBLE, FALSE, "specfile", "sp",
00572 0, 0, 0, &INLINE_Spec_Files, NULL,
00573 "Identify IPA specification filename" },
00574 { OVK_BOOL, OV_INTERNAL, FALSE, "split", "",
00575 0, 0, 0, &INLINE_Enable_Split_Common, NULL,
00576 "Enable inliner split common optimization" },
00577 { OVK_BOOL, OV_SHY, FALSE, "static", "",
00578 0, 0, 0, &INLINE_Static, &INLINE_Static_Set,
00579 "Enable inlining of static functions" },
00580 { OVK_BOOL, OV_INTERNAL, FALSE, "subst_copy_prop_inline", "subst",
00581 0, 0, 0, &INLINE_Enable_Subst_Copy_Prop, NULL,
00582 "Enable inliner copy propagation" },
00583 { OVK_BOOL, OV_INTERNAL, FALSE, "f90param", "",
00584 0, 0, 0, &INLINE_F90, NULL,
00585 "Enable parameter type checking for F90" },
00586 { OVK_BOOL, OV_INTERNAL, FALSE, "auto", "",
00587 0, 0, 0, &INLINE_Enable_Auto_Inlining, NULL,
00588 "Enable inliner automatic inline analysis" },
00589 { OVK_BOOL, OV_INTERNAL, FALSE, "restrict", "",
00590 0, 0, 0, &INLINE_Enable_Restrict_Pointers, NULL,
00591 "Allow inlining of PUs with restrict pointer as formal parameters" },
00592 { OVK_LIST, OV_VISIBLE, FALSE, "skip", "s",
00593 0, 0, 0, &INLINE_List_Names, NULL,
00594 "Skip requested CG edges to avoid doing inlining" },
00595 { OVK_BOOL, OV_INTERNAL, FALSE, "nested", "",
00596 0, 0, 0, &IPA_Enable_Inline_Nested_PU, NULL,
00597 "Enable inlining of nested PU " },
00598 { OVK_BOOL, OV_INTERNAL, FALSE, "struct", "",
00599 0, 0, 0, &IPA_Enable_Inline_Struct, NULL,
00600 "Enable inlining of PU with F90 structures " },
00601 { OVK_BOOL, OV_INTERNAL, FALSE, "char", "",
00602 0, 0, 0, &IPA_Enable_Inline_Char_Array, NULL,
00603 "Enable inlining of PU with char arrays " },
00604 { OVK_BOOL, OV_INTERNAL, FALSE, "optional", "opt",
00605 0, 0, 0, &IPA_Enable_Inline_Optional_Arg, NULL,
00606 "Enable inlining of PU with optional arguments " },
00607 { OVK_LIST, OV_VISIBLE, FALSE, "edge", "e",
00608 0, 0, 0, &INLINE_List_Names, NULL,
00609 "Inline requested CG edges ONLY" },
00610 { OVK_BOOL, OV_INTERNAL, FALSE, "array_struct", "",
00611 0, 0, 0, &IPA_Enable_Inline_Struct_Array_Actual, NULL,
00612 "Enable inlining of PU with F90 structures when actuals are of ARRAY type" },
00613 { OVK_UINT32, OV_VISIBLE, FALSE, "skip_after", "",
00614 UINT32_MAX, 0, UINT32_MAX, &INLINE_Skip_After, NULL,
00615 "Edge number to skip if larger than the specified" },
00616 { OVK_UINT32, OV_VISIBLE, FALSE, "skip_before", "",
00617 0, 0, UINT32_MAX, &INLINE_Skip_Before, NULL,
00618 "Edge number to skip if smaller than the specified" },
00619 { OVK_BOOL, OV_INTERNAL, FALSE, "var_dim_array", "",
00620 0, 0, 0, &IPA_Enable_Inline_Var_Dim_Array, NULL,
00621 "Enable inlining of PU with param that is variable-dim array " },
00622 { OVK_LIST, OV_VISIBLE, FALSE, "in", "",
00623 0, 0, 0, &INLINE_List_Names, NULL,
00624 "Inline requested CG edges " },
00625 { OVK_BOOL, OV_INTERNAL, FALSE, "array_bounds", "",
00626 0, 0, 0, &INLINE_Array_Bounds, NULL,
00627 "Is it safe to inline a PU with an array parameter whose outermost dimension size is unknown" },
00628 { OVK_BOOL, OV_INTERNAL, FALSE, "malloc", "",
00629 0, 0, 0, &INLINE_Use_Malloc_Mempool, NULL,
00630 "Use malloc mempool instead of private mempool to clone trees" },
00631 { OVK_BOOL, OV_INTERNAL, FALSE, "free", "",
00632 0, 0, 0, &INLINE_Free_Malloc_Mempool, NULL,
00633 "Free memory malloc'ed by the malloc mempool used in clone trees" },
00634 { OVK_BOOL, OV_INTERNAL, FALSE, "inlined_pu", "",
00635 0, 0, 0, &INLINE_Inlined_Pu_Call_Graph, NULL,
00636 "Lightweight inliner impl 2 -- build a call graph with only PU tagged inline" },
00637 { OVK_BOOL, OV_INTERNAL, FALSE, "pu_need_inline", "",
00638 0, 0, 0, &INLINE_Inlined_Pu_Call_Graph2, NULL,
00639 "Lightweight inliner impl 2 -- build a call graph with only PU tagged inline and callers that call these PUs" },
00640 { OVK_BOOL, OV_INTERNAL, FALSE, "time", "",
00641 0, 0, 0, &INLINE_Get_Time_Info, NULL,
00642 "Generate timing info for different phase of the inliner" },
00643 { OVK_COUNT }
00644 };