Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
config.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 #ifndef config_INCLUDED
00037 #define config_INCLUDED
00038 
00039 /* ====================================================================
00040  * ====================================================================
00041  *
00042  *
00043  * Revision history:
00044  *  09-Apr-90 - Original Version
00045  *  01-Feb-91 - Copied for TP/Muse
00046  *  15-Jun-91 - Restructuring, Josie integration
00047  *
00048  * Description:
00049  *
00050  * Declare parameters describing the current host/target configuration,
00051  * and configuration options selected by the user in the command line.
00052  *
00053  * ====================================================================
00054  * NOTE:  We want to split out the declarations for various option
00055  * groups, so that adding to them doesn't cause virtually everything
00056  * to compile.  These are declared in files named
00057  * common/com/config_groupname.h, and should be used instead of adding
00058  * to this file, although many of the -OPT group options are still
00059  * here (feel free to move them).
00060  * ====================================================================
00061  *
00062  * Most of the compiler is designed to be independent of the host
00063  * (the machine and system where the compiler runs) and of the target
00064  * (the machine and system where the compiled code will run).  This
00065  * file (with those it includes) is the central repository for
00066  * parameters and data which help isolate those parts of the compiler
00067  * which are not host- and/or target-independent.  Note that we assume
00068  * in general that the "host" for building the compiler and the "host"
00069  * for running the compiler are the same.  Although this need not be
00070  * true, it generally will be except for bootstrap phases.  Given a
00071  * cross-compiler on the build host which is reasonably compatible with
00072  * the eventual native compiler on the compilation host, the
00073  * differences in the compiler code should be limited to type
00074  * definitions in defs.h and conceivably to the tdgen programs, which
00075  * will be built and run on the build host.
00076  *
00077  * CONFIGURATION PARAMETER CLASSES
00078  *
00079  * We recognize several classes of such parameters -- the following
00080  * attempts to provide guidelines on where to declare them and where
00081  * to process them.
00082  *
00083  * In the following description, "TARGET" refers to the directory
00084  * containing the host- and target-specific sources and build
00085  * directories; in the Twin Peaks case, it is "tp".
00086  *
00087  *  Ubiquitous: Some configuration parameters are used essentially
00088  *              everywhere in the compiler, such as the basic data
00089  *              type declarations INT32, TN_NUM, and the like.
00090  *              Notwithstanding the following classifications, these
00091  *              are declared in TARGET/com/defs.h, which is included
00092  *              in (virtually) all source files.
00093  *
00094  *  Host Machine: Some parameters reflect the capabilities of the host
00095  *              hardware.  The most important other than the basic
00096  *              types defined in defs.h involves the representation
00097  *              and manipulation of target constants on the host
00098  *              machine, declared in file TARGET/com/targ_const.h.
00099  *              The remainder will be defined in the file
00100  *              TARGET/com/config_host.h, which is included in this
00101  *              file.
00102  *
00103  *  Host System: Some parameters reflect the configuration of the host
00104  *              software, e.g. the pathnames of library files, the
00105  *              syntax of the assembler, etc.  Those required broadly
00106  *              will be declared in TARGET/com/config_host.h; those
00107  *              with a more restricted clientele (e.g. the assembler
00108  *              interface) will be maintained in more specific files.
00109  *
00110  *              Note that we include in this class parameters which
00111  *              depend on which compiler process is being built, i.e.
00112  *              driver, front end, or back end.  Definitions specific
00113  *              to a single process should be #ifdef'ed based on
00114  *              DRIVER, FRONT_END, or BACK_END.
00115  *
00116  *  Target Machine: Most parameters dependent on the target machine
00117  *              are defined by the Target Information facility, and
00118  *              are used in general for driving the code generation process
00119  *              throughout the compiler.  The interface to the target
00120  *              information is in the form of generated header files
00121  *              in TARGET/targ_info. The generator programs and their
00122  *              input are all under common/targ_info.
00123  *
00124  *              The second significant component of this class is the
00125  *              handling of target constants; as described above, the
00126  *              interface to this functionality is in the file
00127  *              TARGET/com/targ_const.h.
00128  *
00129  *              Other parameters in this class should be declared in
00130  *              TARGET/com/config_targ.h.
00131  *
00132  *  Target System: Parameters in this class, e.g. runtime library
00133  *              interface information, will generally have a limited
00134  *              clientele, and will be in files reflecting this usage.
00135  *              Some such information is in the TDT, either due to its
00136  *              effect on code generation or due to the need to
00137  *              preprocess it in tdgen.  Anything else should be in
00138  *              TARGET/com/config_targ.h.
00139  *
00140  *  Compiler:   Parameters in this class control processing choices
00141  *              made by the compiler, independent of host or target,
00142  *              e.g. which optimizations to perform, how to schedule,
00143  *              and the like.  They will generally be declared in the
00144  *              driver modules for the relevant phases (e.g.
00145  *              be/cg/cg.h, be/gopt/opt.h), and initialized by the
00146  *              configuration routines (see below).
00147  *
00148  *  Options:    Many configuration parameters are set or affected by
00149  *              options specified by the command line or environment.
00150  *              Such parameters which need to be widely available will
00151  *              be in this file; those required only by command line
00152  *              processing will be in flags.h.  NOTE: choices made
00153  *              based on user interface flags like optimization level
00154  *              should be implemented by declaring a control variable
00155  *              and setting it in the configuration routines.  We want
00156  *              to be able to modify the effect of specific flag
00157  *              settings in a central place where the interactions are
00158  *              clear, rather than by searching the compiler for who
00159  *              depends on something like optimization level.
00160  *
00161  *              NOTE ALSO:  There is a general interface to compiler
00162  *              controls, settable via either the command line or
00163  *              pragmas, in controls.h.  It will still be preferable
00164  *              to interface to a control variable declared here, but
00165  *              the general, direct interface is available there.
00166  *
00167  *  Global Data: Such data, of a non-configuration nature (e.g. the
00168  *              current file names), used to be declared in flags.h.
00169  *              It is now declared in the process' miscellaneous
00170  *              globals header (i.e. glob.h) and defined in the
00171  *              process driver (e.g. bedriver.c for the back end).
00172  *
00173  * CONFIGURATION PROCESSING
00174  *
00175  * Each of the configuration files described above has an associated
00176  * source file with three external routines (at least):
00177  *
00178  *  Preconfigure_Xxx:  Does configuration required before flag
00179  *              processing (Xxx = Host, Target, etc.).
00180  *
00181  *  Configure_Xxx:  Does configuration required after flag processing.
00182  *
00183  *  Configure_Source_Xxx:  Does configuration required for each source
00184  *              file compiled.
00185  *
00186  * Processing will involve calling, at compiler initialization time,
00187  * the Preconfigure routines, flag processing, and the Configure
00188  * routines.  Then, as each source file is processed, the driver will
00189  * call the Configure_Source routine.
00190  *
00191  * CONTENTS
00192  *
00193  * - Memory allocation configuration.
00194  *
00195  *
00196  * Exported variables:
00197  *
00198  *      TODO: Cleanup organization of the *_Level and Max_Sdata_Elt_Size
00199  *      controls.  For example, the Debug and Profile maximums and defaults
00200  *      are determined by identical code in fedriver.c and bedriver.c.
00201  *      Eagerness levels need their own enumerated type.
00202  *
00203  *      INT8 Opt_Level
00204  *          Optimization level, as set by -0 switch.  Bounded by
00205  *          MAX_OPT_LEVEL.  Default is DEF_OPT_LEVEL if -O not given,
00206  *          or DEF_O_LEVEL if -O given with no argument.
00207  *
00208  *      INT8 Debug_Level
00209  *          Debug level, as set by -g switch.  Bounded by MAX_DEBUG_LEVEL.
00210  *          Defaults to DEF_DEBUG_LEVEL if -g not given or 2 if -g given
00211  *          with no argument (see fedriver.c, bedriver.c).
00212  *
00213  *      INT32 Max_Sdata_Elt_Size
00214  *          Maximum size of data elements allowed in .sdata/.sbss 
00215  *          (short data/bss) sections.  Bounded by MAX_SDATA_ELT_SIZE.
00216  *          Defaults to DEF_SDATA_ELT_SIZE.
00217  *
00218  *      INT16 Eager_Level
00219  *          Eagerness level for speculative operations, as set by -X
00220  *          switch.  Valid levels are:
00221  *           EAGER_NONE         No speculative operations
00222  *           EAGER_SAFE         Only exception-safe speculative ops
00223  *           EAGER_ARITH        Arithmetic exceptions off
00224  *           EAGER_DIVIDE       Divide by zero exceptions off
00225  *           EAGER_MEMORY       Memory exceptions off
00226  *           EAGER_OTHER        All speculative ops allowed
00227  *          Each level includes the levels above (in this text) it.
00228  *          Default is EAGER_SAFE.
00229  *
00230  *
00231  * SEE ALSO
00232  *
00233  *   common/com/MIPS/config_platform.h -- target platform configuration
00234  *   common/com/MIPS/config_targ.h -- target processor configuration
00235  *   common/com/MIPS/config_host.h -- compiler host configuration
00236  *   common/com/defs.h -- ubiquitous host types and configuration
00237  *                        options.
00238  *   common/util/flags.h -- command-line processing utilities.
00239  *
00240  *   common/com/config_ipa.h -- -IPA/-INLINE group options.
00241  *   common/com/config_opt.h -- -OPT group options.
00242  *   common/com/config_wopt.h -- -WOPT group options.
00243  *
00244  * ====================================================================
00245  * ====================================================================
00246  */
00247 
00248 
00249 #include "config_host.h"        /* in TARGET/com */
00250 #include "config_targ.h"        /* in TARGET/com */
00251 
00252 /* Define BIG_ENDIAN and LITTLE_ENDIAN manually because they are not
00253  * reliably defined.
00254  *   available in <endian.h>: Linux, IRIX, MacOS
00255  *   available in <sys/param>: cygwin (no <endian.h>)
00256  *   unavailable: Solaris, Tru64 (no <endian.h>)
00257  */
00258 #ifndef LITTLE_ENDIAN
00259 # define LITTLE_ENDIAN 1234
00260 #endif
00261 
00262 #ifndef BIG_ENDIAN
00263 # define BIG_ENDIAN 4321
00264 #endif 
00265 
00266 #include "mempool.h"    /* Include the "fundamental" routines */
00267 #include "flags.h"
00268 
00269 /* IR builder sometimes needs to know whether we're in front end,
00270  * either to do something differently, or to complain about attempts
00271  * to handle something that shouldn't be present.  Note that the
00272  * arguments to the *Assert_Front_End macros are parenthesized
00273  * parameter lists to ErrMsg or printf.
00274  */
00275 #ifdef SINGLE_PROCESS
00276   extern INT16 In_Front_End;
00277 # ifdef Is_True_On
00278 #   define Assert_Front_End(x)          Assert ( In_Front_End, x )
00279 #   define FmtAssert_Front_End(x)       FmtAssert ( In_Front_End, x )
00280 # endif
00281 #else
00282 # ifdef FRONT_END
00283 #   define In_Front_End TRUE
00284 # else
00285 #   define In_Front_End FALSE
00286 #   ifdef Is_True_On
00287 #     define Assert_Front_End(x)        ErrMsg x
00288 #     define FmtAssert_Front_End(x)     FmtAssert ( FALSE, x )
00289 #   endif
00290 # endif
00291 #endif
00292 
00293 #ifndef Assert_Front_End
00294 # define Assert_Front_End(x)    (void)0
00295 # define FmtAssert_Front_End(x) (void)0
00296 #endif
00297 
00298 
00299 
00300 /* ====================================================================
00301  *
00302  * Miscellaneous configuration options
00303  *
00304  * ====================================================================
00305  */
00306 
00307 /***** Language being compiled -- initialized in flags.c *****/
00308 #include "language.h"
00309 
00310 #ifdef __cplusplus
00311 extern "C" {
00312 #endif
00313 
00314 extern LANGUAGE Language;
00315 
00316 /* What is the model to be used for logical values in Fortran?
00317  *   TRUE:      .TRUE. is 1             (i.e. standard C/Unix model).
00318  *              truth test is zero/non-zero.
00319  *   FALSE:     .TRUE. is -1            (i.e. VMS Fortran model).
00320  *              truth test is LSB test.
00321  * This variable is defaulted to TRUE; the Fortran FE must set it to
00322  * FALSE prior to any IRB conversions if the VMS model is desired.
00323  */
00324 extern  BOOL Use_C_Like_Logicals;
00325 
00326 /***** LANGuage group options *****/
00327 extern BOOL CXX_Bool_On;
00328 extern BOOL CXX_Bool_Set;
00329 extern BOOL CXX_Exceptions_On;
00330 extern BOOL CXX_Exceptions_Set;
00331 extern BOOL CXX_Alias_Const;
00332 extern BOOL CXX_Alias_Const_Set;
00333 extern BOOL LANG_Recursive;     /* Fortran program contains recursion */
00334 extern BOOL LANG_Recursive_Set;
00335 extern BOOL CXX_Wchar_On;
00336 extern BOOL CXX_Wchar_Set;
00337 
00338 extern BOOL CXX_Namespaces_On;
00339 extern BOOL CXX_Namespaces_Set;
00340 extern BOOL CXX_Ansi_For_Init_Scope_On;
00341 extern BOOL CXX_Ansi_For_Init_Scope_Set;
00342 extern BOOL CXX_Explicit_On;
00343 extern BOOL CXX_Explicit_Set;
00344 extern BOOL CXX_Typename_On;
00345 extern BOOL CXX_Typename_Set;
00346 extern BOOL CXX_Mutable_On;
00347 extern BOOL CXX_Mutable_Set;
00348 extern BOOL CXX_Packed_On;
00349 extern BOOL CXX_Packed_Set;
00350 
00351 extern BOOL CXX_Standard_C_Plus_Plus_On;
00352 extern BOOL CXX_Standard_C_Plus_Plus_Set;
00353 
00354 extern BOOL LANG_Pch;
00355 extern BOOL LANG_Pch_Set;
00356 extern char *LANG_Create_Pch;
00357 extern BOOL LANG_Create_Pch_Set;
00358 extern char *LANG_Use_Pch;
00359 extern BOOL LANG_Use_Pch_Set;
00360 extern char *LANG_Pchdir;
00361 extern BOOL LANG_Pchdir_Set;
00362 
00363 extern char *LANG_cxx_dialect;
00364 extern BOOL LANG_cxx_dialect_Set;
00365 
00366 extern BOOL LANG_Microsoft_Mode;
00367 extern BOOL LANG_Microsoft_Mode_Set;
00368 
00369 extern BOOL LANG_Ansi_Setjmp_On;
00370 extern BOOL LANG_Ansi_Setjmp_Set;
00371 
00372 extern BOOL LANG_Ignore_Carriage_Return_On;
00373 extern BOOL LANG_Ignore_Carriage_Return_Set;
00374 
00375 extern BOOL C_Restrict_On;
00376 extern BOOL C_Restrict_Set;
00377 
00378 extern char *C_Auto_Restrict;
00379 extern BOOL C_Auto_Restrict_Set;
00380 
00381 extern BOOL FTN_Short_Circuit_On;
00382 extern BOOL FTN_Short_Circuit_Set;
00383 
00384 extern BOOL WHIRL_Comma_Rcomma_On;
00385 extern BOOL WHIRL_Comma_Rcomma_Set;
00386 
00387 extern BOOL Macro_Expand_Pragmas_On;
00388 extern BOOL Macro_Expand_Pragmas_Set;
00389 
00390 extern BOOL C_VLA_On;
00391 extern BOOL C_VLA_Set;
00392 
00393 extern BOOL WHIRL_Merge_Types_On;
00394 extern BOOL WHIRL_Merge_Types_Set;
00395 
00396 extern BOOL LANG_Symtab_Verify_On;
00397 extern BOOL LANG_Symtab_Verify_Set;
00398 
00399 extern BOOL WHIRL_Mtype_A_On;
00400 extern BOOL WHIRL_Mtype_B_On;
00401 extern BOOL WHIRL_Mtype_BS_On;
00402 extern BOOL WHIRL_Return_Val_On;
00403 extern BOOL WHIRL_Flatten_Field_On;
00404 extern BOOL WHIRL_Mldid_Mstid_On;
00405 extern BOOL WHIRL_Vfcall_On;
00406 extern BOOL WHIRL_Addr_Passed_On;
00407 extern BOOL WHIRL_Addr_Saved_For_Passed_On;
00408 extern BOOL WHIRL_Addr_Saved_On;
00409 extern BOOL WHIRL_Keep_Cvt_On;
00410 extern BOOL WHIRL_Return_Info_On;
00411 
00412 extern BOOL Global_Pragmas_In_Dummy_PU_On;
00413 extern BOOL Malloc_Free_On;
00414 extern BOOL Alloca_Dealloca_On;
00415 extern BOOL Barrier_Lvalues_On;
00416 
00417 /***** The following is TRUE for C++  unless -no_exceptions is specified *****/
00418 extern BOOL Allow_Exceptions;
00419 
00420 /***** Compiler debug/trace options *****/
00421 extern BOOL Tracing_Enabled;    /* Any trace options set? */
00422 
00423 /* Control usage of the .I and .J files: */
00424 extern BOOL Open_IJ_Files;
00425 
00426 /* For communication between driver and config routines ONLY: */
00427 extern INT8 Debug_Level;
00428 # define MAX_DEBUG_LEVEL        3
00429 
00430 typedef enum {
00431   EAGER_NONE,
00432   EAGER_SAFE,
00433   EAGER_ARITH,
00434   EAGER_DIVIDE,
00435   EAGER_MEMORY,
00436   EAGER_OTHER,
00437   EAGER_EXCESS
00438 } EAGER_LEVEL;
00439 extern EAGER_LEVEL Eager_Level;
00440 
00441 /***** Miscellaneous optimization options *****/
00442 /* Should idict commute operands in seeking match? */
00443 extern BOOL Idict_Commutable_Match;
00444 extern BOOL Enable_FE_Optimization;     /* Enable FE (KAP) scalar opt? */
00445 extern BOOL Alias_Pointer_Parms;        /* Reference parms indep? */
00446 extern BOOL Alias_Pointer_Types;        /* Ptrs to distinct basic types indep? */
00447 extern BOOL Alias_Not_In_Union;          /* C++ ONLY rule: assume ptrs to objects with user-constructors are NOT in unions */
00448 extern BOOL Alias_Pointer_Strongly_Typed; /* Ptrs to distinct types indep? */
00449 extern BOOL Alias_Pointer_Named_Data;   /* No pointers to named data? */
00450 extern BOOL Alias_Pointer_Restricted;   /* *p and *q not aliased */
00451 extern BOOL Alias_Pointer_Disjoint;     /* **p and **q not aliased */
00452 extern BOOL Alias_Pointer_Cray;         /* Cray pointer semantics? */
00453 extern BOOL Alias_Common_Scalar;        /* Distinguish scalar from other array
00454                                            in a common block */
00455 
00456 extern BOOL CSE_Elim_Enabled;           /* Is CSE-elim on? -- this does
00457                                          * not control it, it just
00458                                          * shadows the opt. level
00459                                          */
00460 extern BOOL Enable_GOT_Call_Conversion; /* %call16 -> %got_disp? */
00461 extern BOOL OPT_Unroll_Analysis;        /* Enable unroll limitations? */
00462 extern BOOL OPT_Unroll_Analysis_Set;    /* ... option seen? */
00463 
00464 /***** Various Scalar Optimizer options *****/
00465 extern BOOL Enable_Copy_Propagate;
00466 
00467 /***** Put all-zero initialized file-level data in the BSS section? *****/
00468 extern BOOL Zeroinit_in_bss;
00469 
00470 /***** IEEE 754 options *****/
00471 typedef enum {
00472   IEEE_STRICT = 0,      /* Conform strictly */
00473         /* IEEE_STRICT is not supported.  It might be useful to
00474          * avoid madds, do gradual underflow, etc...
00475          */
00476   IEEE_ACCURATE = 1,    /* Do not degrade IEEE accuracy */
00477   IEEE_INEXACT = 2,     /* Inexact results may not be IEEE */
00478   IEEE_ANY = 3          /* Anything goes */
00479 } IEEE_LEVEL;
00480 extern IEEE_LEVEL IEEE_Arithmetic;  /* IEEE arithmetic? */
00481 extern  BOOL IEEE_Arith_Set;    /* ... option seen? */
00482 
00483 /***** Constant folding options *****/
00484 typedef enum {
00485   ROUNDOFF_NONE,        /* No roundoff-inducing transformations */
00486   ROUNDOFF_SIMPLE,      /* Simple roundoff transformations */
00487   ROUNDOFF_ASSOC,       /* Reassociation transformations */
00488   ROUNDOFF_ANY          /* Anything goes */
00489 } ROUNDOFF;
00490 extern ROUNDOFF Roundoff_Level;         /* -OPT_roundoff=n value */
00491 extern BOOL Roundoff_Set;               /* ... option seen? */
00492 extern BOOL Enable_WN_Simp;             /* Use the WHIRL simplifier? */
00493 extern BOOL Regions_Around_Inner_Loops; /* Put REGIONs around inner loops */
00494 extern BOOL Region_Boundary_Info;       /* calc boundary info for regions */
00495 extern BOOL Cray_Ivdep;                 /* Use Cray meaning for ivdep */
00496 extern BOOL Liberal_Ivdep;              /* Use liberal meaning for ivdep */
00497 extern BOOL Rsqrt_Allowed;              /* Generate RSQRT instruction? */
00498 extern BOOL Recip_Allowed;              /* Generate RECIP instruction? */
00499 extern BOOL Enable_Cfold_Aggressive;    /* Complex constant folding? */
00500 extern BOOL Ptr_Opt_Allowed;            /* Treat pointers as arrays */
00501 extern BOOL Fast_Complex_Allowed;       /* Enable fast c_div and c_abs? */
00502 extern BOOL Fast_Complex_Set;           /* ... option seen? */
00503 extern BOOL Fast_Bit_Allowed;           /* Fast inlined bit intrinsics? */
00504 extern BOOL Fast_Bit_Set;               /* ... option seen? */
00505 extern BOOL Fast_NINT_Allowed;          /* Fast NINT and ANINT? */
00506 extern BOOL Fast_NINT_Set;              /* ... option seen? */
00507 extern BOOL Fast_trunc_Allowed;         /* Fast trunc of NINT/ANINT/AINT/AMOD */
00508 extern BOOL Fast_trunc_Set;             /* ... option seen? */
00509 extern BOOL Fast_IO_Allowed;            /* Fast printf/scanf/printw */
00510 extern BOOL Inline_Intrinsics_Allowed;  /* Inline intrinsics? Or lib calls? */
00511 extern BOOL Inline_Intrinsics_Set;      /* ... option seen? */
00512 extern BOOL Simp_Multiply_To_Shift;     /* Change multiplies to shifts? */
00513 extern BOOL Simp_Canonicalize;          /* Simple canon/reassoc */
00514 extern BOOL Simp_Fold_Unsigned_Relops;  /* Simplify unsigned relops */
00515 extern BOOL Simp_Unsafe_Relops;         /* Allow foldings which might cause error if overflow occurs */
00516 extern BOOL Enable_NaryExpr;            /* Allow nary expr in the lowerer */
00517 extern BOOL Enable_NaryExpr_Set;        /* ... option seen? */
00518 
00519 #ifdef __linux__
00520 extern BOOL Enable_WFE_DFE;             /* frontend dead function elimination? */
00521 #endif /* __linux __ */
00522 
00523 /***** Global Code Motion (GCM) options *****/
00524 extern BOOL GCM_Eager_Null_Ptr_Deref;   /* allow speculation past the NULL
00525                                            ptr test. assumes page zero as
00526                                            readable */
00527 extern BOOL GCM_Eager_Null_Ptr_Deref_Set; /* ... option seen? */
00528 
00529 /***** Miscellaneous GOPT options *****/
00530 #define MAX_OPT_LEVEL   3
00531 #define DEF_O_LEVEL     2       /* Level implied by -O */
00532 #define DEF_OPT_LEVEL   1
00533 extern INT32 Opt_Level;         /* -On level */
00534 extern INT32 OPT_unroll_times;
00535 extern BOOL OPT_unroll_times_overridden;
00536 extern INT32 OPT_unroll_size;
00537 extern BOOL OPT_unroll_size_overridden;
00538 extern BOOL OPT_Lower_Speculate;
00539 extern BOOL OPT_Lower_Treeheight;
00540 extern BOOL OPT_Inline_Divide;
00541 extern BOOL OPT_Space;
00542 extern INT32 Olimit;    /* stop optimization or use regions at this limit */
00543 extern BOOL Olimit_opt; /* FALSE => stop optimization if Olimit reached;
00544                          * TRUE  => use regions to optimize if Olimit reached */
00545 extern BOOL CG_mem_intrinsics;
00546 extern INT32 CG_memmove_inst_count;
00547 extern BOOL CG_memmove_inst_count_overridden;
00548 extern BOOL CG_bcopy_cannot_overlap;
00549 extern BOOL CG_memcpy_cannot_overlap;
00550 extern BOOL CG_memmove_cannot_overlap;
00551 extern BOOL CG_memmove_nonconst;
00552 extern BOOL Allow_wrap_around_opt;
00553 #define DEF_FOLD_ARITH_MAX_INS_CNT 1000
00554 extern INT32 Fold_Arith_Max_INS_CNT;
00555 #define DEF_CONST_COPY_TN_CNT 10000
00556 extern INT32 Const_Copy_TN_CNT;
00557 #define DEF_GOPT_TN_CNT 15000
00558 extern INT32 Gopt_TN_CNT;
00559 extern BOOL Enable_BB_Splitting; /* Split long basic blocks? */
00560 extern INT32 Split_BB_Length;   /* split BBs that are > than this */
00561 #define DEF_BBLENGTH     300    /* default value for Split_BB_Length */
00562 #define MIN_BBLENGTH     100    /* don't let the value get too small */
00563 #define MAX_BBLENGTH    5000    /* don't let the value get too big */
00564 
00565 /***** What is the byte sex of the host and target? *****/
00566 extern UINT8 Host_Byte_Sex;     /* Set in config_host.c */
00567 extern UINT8 Target_Byte_Sex;   /* Set in config_targ.c */
00568 extern BOOL  Same_Byte_Sex;     /* Set in config_targ.c */
00569 
00570 extern INT32 iolist_reuse_limit;
00571 
00572 /***** Misaligned memory reference control *****/
00573 extern INT32 Aggregate_Alignment; /* This alignment for aggregate layout */
00574 
00575 extern BOOL Align_Object;       /* Try to improve the alignment of objects */
00576 extern BOOL Align_Padding;      /* Pad objects to their natural alignment */
00577 extern BOOL UseAlignedCopyForStructs;   /* always use aligned copy */
00578 
00579 /***** Miscellaneous code generation options *****/
00580 extern BOOL Gen_PIC_Call_Shared; /* CPIC */
00581 extern BOOL Gen_PIC_Shared;     /* PIC */
00582 extern BOOL Gen_PIC_Calls;      /* do calls as PIC code */
00583 extern BOOL Guaranteed_Small_GOT; /* GOT < 64kB? */
00584 extern BOOL Non_Volatile_GOT;   /* GOT entries volatile? */
00585 extern BOOL PIC_Local_Names;    /* Names local by default? */
00586 extern BOOL PIC_Protected_Names; /* Names protected by default? */
00587 extern BOOL PIC_Fixed_Addresses; /* Names fixed by default? */
00588 extern BOOL PIC_No_Page_Offset; /* Don't use page/offset addressing? */
00589 extern BOOL Force_Mem_Formals;  /* Always force formals to memory? */
00590 extern BOOL Kernel_Code;        /* Compiling OS kernel? */
00591 extern INT32 Short_Data;        /* Objects of this size in .sdata */
00592 extern INT32 Short_Lits;        /* Literals of this size in .litX */
00593 extern INT32 Max_Sdata_Elt_Size;/* -Gn: sdata size */
00594 extern INT32 Gspace_Available;  /* -Gspace: available space for gprel objects */
00595 extern BOOL Force_GP_Prolog;    /* force usage of gp prolog */
00596 extern INT32 Heap_Allocation_Threshold; /* Allocate objects > this on the heap 
00597                                          * (-1 means always use stack), 
00598                                          * 0 always use heap
00599                                          * default is 0
00600                                          */
00601 extern BOOL Strings_Not_Gprelative;     /* don't make strings gp-relative */
00602 #define MAX_SDATA_ELT_SIZE      32760
00603 #define DEF_SDATA_ELT_SIZE      8
00604 extern BOOL Varargs_Prototypes; /* Varargs have prototypes for FP? */
00605 extern BOOL Gen_Profile;
00606 extern char *Gen_Profile_Name;
00607 extern BOOL Call_Mcount;        /* generate a call to mcount in pu entry */
00608 extern BOOL GP_Is_Preserved;    /* GP is neither caller or callee-save */
00609 extern BOOL Constant_GP;        /* GP never changes */
00610 
00611 extern char *Emit_Global_Data;  /* only emit global data */
00612 extern char *Read_Global_Data;  /* only read global data */
00613 
00614 extern char *Library_Name;              /* -TENV:io_library=xxx */
00615 extern INT  target_io_library;
00616 
00617 extern BOOL Meld_Schedule;      /* Attempt to meld basic blocks */
00618 extern BOOL Gap_Schedule;       /* Attempt to perform gap scheduling */
00619 extern BOOL Attempt_Bypass;     /* Attempt to use bypass registers */
00620 extern BOOL Enable_SWP;         /* Do software pipelining */
00621 extern BOOL Enable_SWP_overridden; /* override on command line */
00622 extern BOOL Enable_LOH;         /* Do loop overhead */
00623 extern BOOL Enable_LOH_overridden; /* Enable_LOH overridden on cmd line */
00624 extern BOOL Enable_Spec_Loads;  /* Allow speculation of loads */
00625 extern BOOL Isolate_Lines;      /* Don't overlap source lines */
00626 extern BOOL Fill_Delay_Slots;   /* Attempt to fill branch delay slots */
00627 extern BOOL Enable_GDSE;        /* Do global dead store elimination */
00628 extern BOOL Enable_CG_Peephole; /* Enable peephole optimization in cgprep */
00629 extern BOOL Optimize_CVTL_Exp;  /* Optimize expansion of CVTL operators */
00630 extern BOOL Enable_CVT_Opt;     /* Optimize expansion of CVT operators */
00631 extern BOOL Indexed_Loads_Allowed; /* enable generation of indexed loads/stores */
00632 extern BOOL Early_MP_Processing; /* Do MP lowering before LNO/PREOPT */
00633 extern BOOL Implied_Do_Io_Opt;   /* Do implied-do loop optimization for I/O */
00634 
00635 /* back end phases options */
00636 #ifdef BACK_END
00637 extern BOOL Run_lno;                /* run loop-nest optimizer */
00638 extern BOOL Run_lego;               /* run lego-lowering */
00639 extern BOOL Run_lego_given;         /* was run lego-lowering given/not */
00640 extern BOOL Run_wopt;               /* run WHIRL global optimizer */
00641 extern BOOL Run_preopt;             /* run WHIRL preopt optimizer */
00642 extern BOOL Run_cg;                 /* run code generator */
00643 extern BOOL Run_w2c;                /* run whirl2c */
00644 extern BOOL Run_w2f;                /* run whirl2f */
00645 extern BOOL Run_w2fc_early;         /* run whirl2f after LNO parallelization */
00646 extern BOOL Run_prompf;             /* create prompf analysis file */
00647 extern BOOL Run_purple;             /* run purple instrumenter */
00648 extern BOOL Run_ipl;                /* run summary phase of IPA */
00649 extern char *LNO_Path;              /* path to lno.so */
00650 extern char *WOPT_Path;             /* path to wopt.so */
00651 extern char *CG_Path;               /* path to cg.so */
00652 extern char *W2C_Path;              /* path to whirl2c.so */
00653 extern char *W2F_Path;              /* path to whirl2f.so */
00654 extern char *Prompf_Anl_Path;       /* path to prompf_anl.so */
00655 extern char *Purple_Path;           /* path to purple.so */
00656 extern char *Ipl_Path;              /* path to ipl.so */
00657 #endif /* BACK_END */
00658 extern char *Inline_Path;           /* path to inline.so */
00659 #if defined(BACK_END) || defined(QIKKI_BE)
00660 extern char *Targ_Path;             /* path to targinfo .so */
00661 #endif /* defined(BACK_END) || defined(QIKKI_BE) */
00662 
00663 extern char *Schedlist_Option;
00664 
00665 /* Force EH Region offsets to be long */
00666 extern BOOL Force_Long_EH_Range_Offsets;
00667 /* Force stack frame to use large model */
00668 extern BOOL Force_Large_Stack_Model;
00669 /* put each function in its own text section */
00670 extern BOOL Section_For_Each_Function;
00671 
00672 /* list of registers that are not allocatable */
00673 extern OPTION_LIST *Registers_Not_Allocatable;
00674 
00675 /* Unique ident from IPA */
00676 extern INT32 Ipa_Ident_Number;
00677 
00678 extern BOOL Scalar_Formal_Ref;          /* for fortran formal scalar refs */
00679 extern BOOL Non_Scalar_Formal_Ref;      /* for fortran formal non_scalar refs */
00680 
00681 /***** Maximum sizes of recursive structures we will handle *****/
00682 #define MAXDONEST       300
00683 #define MAXIFNEST       300
00684 
00685 /* The following define specifies the maximum evaluation depth from
00686  * leaf to root in an expression containing boolean operators (AND,
00687  * OR, NOT).  The amount of space specified will be allocated to hold
00688  * the inherited attributes of boolean expressions and flow of control
00689  * statements.
00690  */
00691 #define MAXBOOLDEPTH    (100 + MAXIFNEST)
00692 
00693 /* ====================================================================
00694  *
00695  * Skip option interface
00696  *
00697  * For debugging purposes, we support the suppression (skipping) of
00698  * optimization for specific PUs in a compilation (e.g. in WOPT and in
00699  * IPA).  This is controlled by specifying a range (before/after) or
00700  * item (ident) of numbers to skip, which produces a group option list
00701  * from the group processing in flags.c.  The support here provides for
00702  * (1) converting the group option list to a form easier to query, and
00703  * (2) querying the resulting skip list.
00704  *
00705  * ====================================================================
00706  */
00707 
00708 typedef struct skiplist SKIPLIST;
00709 struct option_list;
00710 
00711 /* Convert an option list to a SKIPLIST: */
00712 SKIPLIST *Build_Skiplist ( struct option_list *olist );
00713 
00714 /* Query a SKIPLIST -- result TRUE means element is in list: */
00715 BOOL Query_Skiplist ( SKIPLIST *slist, INT32 elmt );
00716 
00717 /* SKIPLIST for All Optimizations */
00718 extern SKIPLIST *Optimization_Skip_List;     /* Processed list */
00719 extern SKIPLIST *Region_Skip_List;           /* regions to skip, processed */
00720 
00721 /* ====================================================================
00722  *
00723  * Initialization interface
00724  *
00725  * ====================================================================
00726  */
00727 
00728 /***** Perform configuration functions prior to flag processing *****/
00729 extern void Preconfigure (void);
00730 
00731 /***** Perform configuration functions after flag processing *****/
00732 extern void Configure (void);
00733 
00734 /***** Perform configuration functions for each source file *****/
00735 extern void Configure_Source ( char *filename );
00736 
00737 /***** Perform configuration functions for the alias analysis options *****/
00738 extern void Configure_Alias_Options (struct option_list *);
00739 
00740 extern void Configure_Feedback_Options (struct option_list *);
00741 
00742 
00743 /***** Process a trace option string *****/
00744 extern BOOL Process_Trace_Option ( char *option );
00745 
00746 /***** List options to the given file *****/
00747 extern void List_Compile_Options (
00748   FILE *file,           /* File to which to write */
00749   char *pfx,            /* Prefix output with this string */
00750   BOOL internal,        /* Internal or user listing? */
00751   BOOL full_list,       /* Groups (user)?  All options (internal)? */
00752   BOOL update );        /* Reset option changed/modified flags? */
00753 
00754 
00755 #ifndef Is_Target_R4K
00756 #define Is_Target_R4K()         (0)
00757 #endif
00758 #ifndef Is_Target_R5K
00759 #define Is_Target_R5K()         (0)
00760 #endif
00761 #ifndef Is_Target_R8K
00762 #define Is_Target_R8K()         (0)
00763 #endif
00764 #ifndef Is_Target_R10K
00765 #define Is_Target_R10K()        (0)
00766 #endif
00767 #ifndef Is_Target_TP
00768 #define Is_Target_TP()          Is_Target_R8K()
00769 #endif
00770 #ifndef Is_Target_T5
00771 #define Is_Target_T5()          Is_Target_R10K()
00772 #endif
00773 #ifndef Is_Target_Pentium
00774 #define Is_Target_Pentium()     (0)
00775 #endif
00776 #ifndef Is_Target_Itanium
00777 #define Is_Target_Itanium()     (0)
00778 #endif
00779 
00780 #ifndef Is_Target_ISA_M1
00781 #define Is_Target_ISA_M1()      (0)
00782 #endif
00783 #ifndef Is_Target_ISA_M2
00784 #define Is_Target_ISA_M2()      (0)
00785 #endif
00786 #ifndef Is_Target_ISA_M3
00787 #define Is_Target_ISA_M3()      (0)
00788 #endif
00789 #ifndef Is_Target_ISA_M4
00790 #define Is_Target_ISA_M4()      (0)
00791 #endif
00792 #ifndef Is_Target_ISA_M2Plus
00793 #define Is_Target_ISA_M2Plus()  (0)
00794 #endif
00795 #ifndef Is_Target_ISA_M3Plus
00796 #define Is_Target_ISA_M3Plus()  (0)
00797 #endif
00798 #ifndef Is_Target_ISA_M4Plus
00799 #define Is_Target_ISA_M4Plus()  (0)
00800 #endif
00801 #ifndef Is_Target_ISA_I1
00802 #define Is_Target_ISA_I1()      (0)
00803 #endif
00804 #ifndef Is_Target_ISA_I1Plus
00805 #define Is_Target_ISA_I1Plus()  (0)
00806 #endif
00807 
00808 #ifdef __cplusplus
00809 }
00810 #endif
00811 #endif /* config_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines