62 #define USE_STANDARD_TYPES 1
64 #undef USE_STANDARD_TYPES
70 # include "cmd_line.h"
91 static INT32 Ignore_Int;
115 #ifdef SINGLE_PROCESS
135 # define DEF_DEBUG_LEVEL 0
317 "Minimum alignment to use for aggregates (structs/arrays)" },
326 "Generate code for executable programs which may call DSOs" },
331 "Maximum GP-relative space available" },
334 "Specify IPA timestamp number" },
337 "Generate code for kernel use" },
340 "Assume GOT is larger than 64K bytes" },
345 "Generate code assuming >32KB stack frame" },
352 "Assume GOT is non-volatile" },
355 "Don't use GOT page/offset addressing" },
358 "Generate position-independent code suitable for DSOs" },
361 "Generate code for executable programs which may call DSOs" },
370 "Maximum size of data to allocate GP-relative" },
373 "Maximum size of literals to allocate GP-relative" },
376 "Assume GOT is smaller than 64K bytes" },
383 "Exception-enable level" },
386 "Place zero-initialized data in .bss section" },
389 "Do not put any strings in gp-relative sections" },
392 "only process the global data" },
395 "only read the already-processed global data" },
398 "force gp_prolog to always be setup" },
401 "list of registers that are reserved and not available for allocation" },
419 const_cast<char*
>(
"-DEBUG:varargs_prototypes"),
NULL },
425 "Assume this alignment for unknown objects" },
429 "Assume unknown objects are properly aligned" },
432 3, 0, 3,
NULL, NULL },
435 "Maximum number of iolists which will share stack space" },
484 #elif defined(QIKKI_BE)
495 "Language being compiled, from front end" },
498 "C++: enable builtin type 'bool'" },
501 "C++: enable exceptions" },
502 #if 0 // remove it till we have a robust design
508 "FORTRAN: program contains recursion" },
511 "C++: enable builtin type 'wchar_t'" },
514 "C++: enable namespaces" },
523 "Automatically set the \"restrict\" qualifier on some or all pointers" },
532 "C/C++: enable variable length arrays" },
535 "C++: enable explicit keyword" },
538 "C++: enable typename keyword" },
541 "C++: enable mutable keyword" },
544 "C/C++: enable macro expansion in pragmas" },
547 "C++: enable pragma pack" },
552 "Create a precompiled header for this compilation unit" },
555 "Create a precompiled header file named by this option" },
558 "Use the precompiled header file named by this option" },
561 "Create/Use from the directory named by this option" },
564 "C/C++: enable optimization of functions with calls to setjmp" },
570 "Size threshold for switching from stack to heap allocation" },
575 "C/C++: ignore carriage returns in source" },
629 "Options to assist debugging" },
631 "Options to control subprogram inlining" },
633 "Options to control internal flags for testing" },
635 "Options to control interprocedural analysis and optimization" },
637 "Options to control source language interpretation" },
639 "Options to control the listing file" },
641 "Options to control general optimization" },
644 "Options to control loop nest optimization" },
646 #if defined(BACK_END) || defined(QIKKI_BE)
648 "Options to control phase invocation and locations" },
651 "Options to specify the target machine characteristics" },
653 "Options to set or assert target environment characteristics" },
655 "Options to control internal WHIRL optimization" },
657 "Options to control internal VH WHIRL optimization" },
659 "Options to control listing of transformed f77 source" },
661 "Options to control listing of transformed C source" },
663 "Options to control program region extraction process" },
665 "Options to control listing mp transformations" },
773 #if defined(BACK_END) || defined(QIKKI_BE)
847 && ( platform_name ==
NULL || *platform_name == 0 ) )
941 #ifdef KEEP_WHIRLSTATS
943 extern void whirlstats();
954 #if !defined(SGI_FRONT_END_CPP)
961 if ( ! dev_warn_toggled ) {
963 dev_warn_toggled =
TRUE;
968 #ifdef KEEP_WHIRLSTATS
1000 Guaranteed_Small_GOT =
FALSE;
1002 Guaranteed_Small_GOT =
TRUE;
1005 if (Emit_Global_Data && Read_Global_Data) {
1007 FmtAssert (
FALSE, (
"can't specify options to both emit and read global data"));
1070 if (Library_Name !=
NULL) {
1100 if (Run_w2fc_early) {
1114 if (Gen_PIC_Call_Shared && Gen_PIC_Shared) Gen_PIC_Shared =
FALSE;
1143 Force_Mem_Formals = ( Opt_Level < 1 );
1149 if (!CG_memmove_inst_count_overridden)
1150 CG_memmove_inst_count = 8;
1151 if (! OPT_unroll_size_overridden)
1152 OPT_unroll_size = 20;
1188 DevWarn(
"Olimit < 10 is too small; resetting to Olimit=10");
1194 #if !defined(SGI_FRONT_END_CPP) && !defined(QIKKI_BE)
1267 Enable_GDSE = ((Opt_Level > 1) &&
1328 INT len = strlen (val);
1376 }
else if (
ux_strncasecmp( val,
"no_strongly_typed", len) == 0) {
1384 }
else if (
ux_strncasecmp( val,
"no_f90_pointer_alias", len) == 0) {
1386 }
else if (
ux_strncasecmp( val,
"f90_pointer_alias", len) == 0) {
1431 #define SKIPLIST_size(sl) ((sl)->size)
1432 #define SKIPLIST_kind_vec(sl) ((sl)->kind)
1433 #define SKIPLIST_kind(sl,i) ((SKIPKIND)((sl)->kind[i]))
1434 #define Set_SKIPLIST_kind(sl,i,v) (((sl)->kind[i]) = (mINT8)(v))
1435 #define SKIPLIST_val_vec(sl) ((sl)->val)
1436 #define SKIPLIST_val(sl,i) ((sl)->val[i])
1452 if ( skip ==
NULL ) {
1453 fprintf ( tf,
"SKIPLIST %s empty\n", lab );
1456 fprintf ( tf,
"SKIPLIST %s:\n", lab );
1471 fprintf ( tf,
"SKIPLIST %s end\n\n", lab );
1510 while ( *p !=
':' && *p != 0 ) {
1511 if ( *p ==
',' || *p ==
'-' ) {
1526 for ( count = 0, ol = olist;
1530 if ( !strncmp (
"skip_a",
OLIST_opt(ol), 6 ) ||
1531 !strncmp (
"region_skip_a",
OLIST_opt(ol), 13 ) ) {
1533 }
else if ( !strncmp (
"skip_b",
OLIST_opt(ol), 6 ) ||
1534 !strncmp (
"region_skip_b",
OLIST_opt(ol), 13 ) ) {
1544 while ( *p >=
'0' && *p <=
'9' ) ++p;
1552 while ( *p >=
'0' && *p <=
'9' ) ++p;
1554 while ( *p++ ==
',' ) {
1558 while ( *p >=
'0' && *p <=
'9' ) ++p;
1566 while ( *p >=
'0' && *p <=
'9' ) ++p;
1621 if ( ok )
return TRUE;
1648 char *cp = option+1;
1651 Tracing_Enabled =
TRUE;
1653 while ( cp && *cp ==
't' ) {
1656 switch ( *(cp-1) ) {
1679 if ( isdigit (*cp) ) {
1690 if ( isdigit (*cp) ) {
1694 Is_True(
FALSE,(
"Process_Trace_Option: regions don't have names"));
1709 if ( phase != 0 && (*cp ==
',' || *cp ==
'\0'))
1726 if ( *cp !=
',' && *cp !=
':' ) {
1740 extern BOOL trace_verbose;
1741 trace_verbose =
TRUE;
1758 if ( cp && *cp != 0 ) {
1788 char *bar =
SBar+12;
1790 fprintf ( f,
"\n%s%s%s Compiling %s (%s)\n%s%s",
1792 fprintf ( f,
"\n%s%s%s Options:\n%s%s", pfx, bar, pfx, pfx, bar );
1794 fprintf ( f,
"%s Target:%s, ISA:%s, Pointer Size:%d\n",
1797 fprintf ( f,
"%s -O%d\t(Optimization level)\n", pfx, Opt_Level );
1798 fprintf ( f,
"%s -g%d\t(Debug level)\n", pfx,
Debug_Level );
1801 fprintf ( f,
"%s -m2\t(Report advisories)\n", pfx );
1803 fprintf ( f,
"%s -m1\t(Report warnings)\n", pfx );
1805 fprintf ( f,
"%s -m0\t(Report errors only)\n", pfx );
1807 fprintf ( f,
"%s%s\n", pfx, bar );
1810 fprintf ( f,
"%s Group options are marked with '#' if changed,\n"
1811 "%s or with '=' if explicitly set to default value.\n",