neulab/tldr huggingface dataset:
-fno-gnu-unique On systems with recent GNU assembler and C library, the C++ compiler uses the "STB_GNU_UNIQUE" binding to make sure that definitions of template static data members and static local variables in inline functions are unique even in the presence of "RTLD_LOCAL"; this is necessary to avoid problems with a library used by two different "RTLD_LOCAL" plugins depending on a definition in one of them and therefore disagreeing with the other one about the binding of the symbol.  But this causes "dlclose" to be ignored for affected DSOs; if your program relies on reinitialization of a DSO via "dlclose" and "dlopen", you can use -fno-gnu-unique.
-fpcc-struct-return Return "short" "struct" and "union" values in memory like longer ones, rather than in registers.  This convention is less efficient, but it has the advantage of allowing intercallability between GCC- compiled files and files compiled with other compilers, particularly the Portable C Compiler (pcc).
The precise convention for returning structures in memory depends on the target configuration macros.
Short structures and unions are those whose size and alignment match that of some integer type.
Warning: code compiled with the -fpcc-struct-return switch is not binary compatible with code compiled with the -freg-struct-return switch.  Use it to conform to a non-default application binary interface.
-freg-struct-return Return "struct" and "union" values in registers when possible.  This is more efficient for small structures than -fpcc-struct-return.
If you specify neither -fpcc-struct-return nor -freg-struct-return, GCC defaults to whichever convention is standard for the target.  If there is no standard convention, GCC defaults to -fpcc-struct-return, except on targets where GCC is the principal compiler.  In those cases, we can choose the standard, and we chose the more efficient register return alternative.
Warning: code compiled with the -freg-struct-return switch is not binary compatible with code compiled with the -fpcc-struct-return switch.  Use it to conform to a non-default application binary interface.
-fshort-enums Allocate to an "enum" type only as many bytes as it needs for the declared range of possible values.  Specifically, the "enum" type is equivalent to the smallest integer type that has enough room.
Warning: the -fshort-enums switch causes GCC to generate code that is not binary compatible with code generated without that switch.  Use it to conform to a non-default application binary interface.
-fshort-wchar Override the underlying type for "wchar_t" to be "short unsigned int" instead of the default for the target.  This option is useful for building programs to run under WINE.
Warning: the -fshort-wchar switch causes GCC to generate code that is not binary compatible with code generated without that switch.  Use it to conform to a non-default application binary interface.
-fcommon In C code, this option controls the placement of global variables defined without an initializer, known as tentative definitions in the C standard.  Tentative definitions are distinct from declarations of a variable with the "extern" keyword, which do not allocate storage.
The default is -fno-common, which specifies that the compiler places uninitialized global variables in the BSS section of the object file. This inhibits the merging of tentative definitions by the linker so you get a multiple-definition error if the same variable is accidentally defined in more than one compilation unit.
The -fcommon places uninitialized global variables in a common block. This allows the linker to resolve all tentative definitions of the same variable in different compilation units to the same object, or to a non-tentative definition.  This behavior is inconsistent with C++, and on many targets implies a speed and code size penalty on global variable references.  It is mainly useful to enable legacy code to link without errors.
-fno-ident Ignore the "#ident" directive.
-finhibit-size-directive Don't output a ".size" assembler directive, or anything else that would cause trouble if the function is split in the middle, and the two halves are placed at locations far apart in memory.  This option is used when compiling crtstuff.c; you should not need to use it for anything else.
-fverbose-asm Put extra commentary information in the generated assembly code to make it more readable.  This option is generally only of use to those who actually need to read the generated assembly code (perhaps while debugging the compiler itself).
-fno-verbose-asm, the default, causes the extra information to be omitted and is useful when comparing two assembler files.
The added comments include:
*   information on the compiler version and command-line options,
*   the source code lines associated with the assembly instructions, in the form FILENAME:LINENUMBER:CONTENT OF LINE,
*   hints on which high-level expressions correspond to the various assembly instruction operands.
For example, given this C source file:
int test (int n) { int i; int total = 0;
for (i = 0; i < n; i++) total += i * i;
return total; }
compiling to (x86_64) assembly via -S and emitting the result direct to stdout via -o -
gcc -S test.c -fverbose-asm -Os -o -
gives output similar to this:
.file   "test.c" # GNU C11 (GCC) version 7.0.0 20160809 (experimental) (x86_64-pc-linux-gnu) [...snip...] # options passed: [...snip...]
.text .globl  test .type   test, @function test: .LFB0: .cfi_startproc # test.c:4:   int total = 0; xorl    %eax, %eax      # <retval> # test.c:6:   for (i = 0; i < n; i++) xorl    %edx, %edx      # i .L2: # test.c:6:   for (i = 0; i < n; i++) cmpl    %edi, %edx      # n, i jge     .L5     #, # test.c:7:     total += i * i; movl    %edx, %ecx      # i, tmp92 imull   %edx, %ecx      # i, tmp92 # test.c:6:   for (i = 0; i < n; i++) incl    %edx    # i # test.c:7:     total += i * i; addl    %ecx, %eax      # tmp92, <retval> jmp     .L2     # .L5: # test.c:10: } ret .cfi_endproc .LFE0: .size   test, .-test .ident  "GCC: (GNU) 7.0.0 20160809 (experimental)" .section        .note.GNU-stack,"",@progbits
The comments are intended for humans rather than machines and hence the precise format of the comments is subject to change.
-frecord-gcc-switches This switch causes the command line used to invoke the compiler to be recorded into the object file that is being created.  This switch is only implemented on some targets and the exact format of the recording is target and binary file format dependent, but it usually takes the form of a section containing ASCII text.  This switch is related to the -fverbose-asm switch, but that switch only records information in the assembler output file as comments, so it never reaches the object file.  See also -grecord-gcc-switches for another way of storing compiler options into the object file.
-fpic Generate position-independent code (PIC) suitable for use in a shared library, if supported for the target machine.  Such code accesses all constant addresses through a global offset table (GOT).  The dynamic loader resolves the GOT entries when the program starts (the dynamic loader is not part of GCC; it is part of the operating system).  If the GOT size for the linked executable exceeds a machine-specific maximum size, you get an error message from the linker indicating that -fpic does not work; in that case, recompile with -fPIC instead. (These maximums are 8k on the SPARC, 28k on AArch64 and 32k on the m68k and RS/6000.  The x86 has no such limit.)
Position-independent code requires special support, and therefore works only on certain machines.  For the x86, GCC supports PIC for System V but not for the Sun 386i.  Code generated for the IBM RS/6000 is always position-independent.
When this flag is set, the macros "__pic__" and "__PIC__" are defined to 1.
-fPIC If supported for the target machine, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table.  This option makes a difference on AArch64, m68k, PowerPC and SPARC.
Position-independent code requires special support, and therefore works only on certain machines.
When this flag is set, the macros "__pic__" and "__PIC__" are defined to 2.
-fpie -fPIE These options are similar to -fpic and -fPIC, but the generated position-independent code can be only linked into executables. Usually these options are used to compile code that will be linked using the -pie GCC option.
-fpie and -fPIE both define the macros "__pie__" and "__PIE__".  The macros have the value 1 for -fpie and 2 for -fPIE.
-fno-plt Do not use the PLT for external function calls in position- independent code.  Instead, load the callee address at call sites from the GOT and branch to it.  This leads to more efficient code by eliminating PLT stubs and exposing GOT loads to optimizations.  On architectures such as 32-bit x86 where PLT stubs expect the GOT pointer in a specific register, this gives more register allocation freedom to the compiler.  Lazy binding requires use of the PLT; with -fno-plt all external symbols are resolved at load time.
Alternatively, the function attribute "noplt" can be used to avoid calls through the PLT for specific external functions.
In position-dependent code, a few targets also convert calls to functions that are marked to not use the PLT to use the GOT instead.
-fno-jump-tables Do not use jump tables for switch statements even where it would be more efficient than other code generation strategies.  This option is of use in conjunction with -fpic or -fPIC for building code that forms part of a dynamic linker and cannot reference the address of a jump table.  On some targets, jump tables do not require a GOT and this option is not needed.
-fno-bit-tests Do not use bit tests for switch statements even where it would be more efficient than other code generation strategies.
-ffixed-reg Treat the register named reg as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role).
reg must be the name of a register.  The register names accepted are machine-specific and are defined in the "REGISTER_NAMES" macro in the machine description macro file.
This flag does not have a negative form, because it specifies a three-way choice.
-fcall-used-reg Treat the register named reg as an allocable register that is clobbered by function calls.  It may be allocated for temporaries or variables that do not live across a call.  Functions compiled this way do not save and restore the register reg.
It is an error to use this flag with the frame pointer or stack pointer.  Use of this flag for other registers that have fixed pervasive roles in the machine's execution model produces disastrous results.
-fcall-saved-reg Treat the register named reg as an allocable register saved by functions.  It may be allocated even for temporaries or variables that live across a call.  Functions compiled this way save and restore the register reg if they use it.
A different sort of disaster results from the use of this flag for a register in which function values may be returned.
-fpack-struct[=n] Without a value specified, pack all structure members together without holes.  When a value is specified (which must be a small power of two), pack structure members according to this value, representing the maximum alignment (that is, objects with default alignment requirements larger than this are output potentially unaligned at the next fitting location.
Warning: the -fpack-struct switch causes GCC to generate code that is not binary compatible with code generated without that switch. Additionally, it makes the code suboptimal.  Use it to conform to a non-default application binary interface.
-fleading-underscore This option and its counterpart, -fno-leading-underscore, forcibly change the way C symbols are represented in the object file.  One use is to help link with legacy assembly code.
Warning: the -fleading-underscore switch causes GCC to generate code that is not binary compatible with code generated without that switch.  Use it to conform to a non-default application binary interface.  Not all targets provide complete support for this switch.
-ftls-model=model Alter the thread-local storage model to be used.  The model argument should be one of global-dynamic, local-dynamic, initial-exec or local-exec.  Note that the choice is subject to optimization: the compiler may use a more efficient model for symbols not visible outside of the translation unit, or if -fpic is not given on the command line.
The default without -fpic is initial-exec; with -fpic the default is global-dynamic.
-ftrampolines For targets that normally need trampolines for nested functions, always generate them instead of using descriptors.  Otherwise, for targets that do not need them, like for example HP-PA or IA-64, do nothing.
A trampoline is a small piece of code that is created at run time on the stack when the address of a nested function is taken, and is used to call the nested function indirectly.  Therefore, it requires the stack to be made executable in order for the program to work properly.
-fno-trampolines is enabled by default on a language by language basis to let the compiler avoid generating them, if it computes that this is safe, and replace them with descriptors.  Descriptors are made up of data only, but the generated code must be prepared to deal with them.  As of this writing, -fno-trampolines is enabled by default only for Ada.
Moreover, code compiled with -ftrampolines and code compiled with -fno-trampolines are not binary compatible if nested functions are present.  This option must therefore be used on a program-wide basis and be manipulated with extreme care.
-fvisibility=[default|internal|hidden|protected] Set the default ELF image symbol visibility to the specified option---all symbols are marked with this unless overridden within the code.  Using this feature can very substantially improve linking and load times of shared object libraries, produce more optimized code, provide near-perfect API export and prevent symbol clashes.  It is strongly recommended that you use this in any shared objects you distribute.
Despite the nomenclature, default always means public; i.e., available to be linked against from outside the shared object. protected and internal are pretty useless in real-world usage so the only other commonly used option is hidden.  The default if -fvisibility isn't specified is default, i.e., make every symbol public.
A good explanation of the benefits offered by ensuring ELF symbols have the correct visibility is given by "How To Write Shared Libraries" by Ulrich Drepper (which can be found at <https://www.akkadia.org/drepper/>)---however a superior solution made possible by this option to marking things hidden when the default is public is to make the default hidden and mark things public.  This is the norm with DLLs on Windows and with -fvisibility=hidden and "__attribute__ ((visibility("default")))" instead of "__declspec(dllexport)" you get almost identical semantics with identical syntax.  This is a great boon to those working with cross-platform projects.
For those adding visibility support to existing code, you may find "#pragma GCC visibility" of use.  This works by you enclosing the declarations you wish to set visibility for with (for example) "#pragma GCC visibility push(hidden)" and "#pragma GCC visibility pop".  Bear in mind that symbol visibility should be viewed as part of the API interface contract and thus all new code should always specify visibility when it is not the default; i.e., declarations only for use within the local DSO should always be marked explicitly as hidden as so to avoid PLT indirection overheads---making this abundantly clear also aids readability and self-documentation of the code.  Note that due to ISO C++ specification requirements, "operator new" and "operator delete" must always be of default visibility.
Be aware that headers from outside your project, in particular system headers and headers from any other library you use, may not be expecting to be compiled with visibility other than the default.  You may need to explicitly say "#pragma GCC visibility push(default)" before including any such headers.
"extern" declarations are not affected by -fvisibility, so a lot of code can be recompiled with -fvisibility=hidden with no modifications.  However, this means that calls to "extern" functions with no explicit visibility use the PLT, so it is more effective to use "__attribute ((visibility))" and/or "#pragma GCC visibility" to tell the compiler which "extern" declarations should be treated as hidden.
Note that -fvisibility does affect C++ vague linkage entities. This means that, for instance, an exception class that is be thrown between DSOs must be explicitly marked with default visibility so that the type_info nodes are unified between the DSOs.
An overview of these techniques, their benefits and how to use them is at <http://gcc.gnu.org/wiki/Visibility>.
-fstrict-volatile-bitfields This option should be used if accesses to volatile bit-fields (or other structure fields, although the compiler usually honors those types anyway) should use a single access of the width of the field's type, aligned to a natural alignment if possible.  For example, targets with memory-mapped peripheral registers might require all such accesses to be 16 bits wide; with this flag you can declare all peripheral bit-fields as "unsigned short" (assuming short is 16 bits on these targets) to force GCC to use 16-bit accesses instead of, perhaps, a more efficient 32-bit access.
If this option is disabled, the compiler uses the most efficient instruction.  In the previous example, that might be a 32-bit load instruction, even though that accesses bytes that do not contain any portion of the bit-field, or memory-mapped registers unrelated to the one being updated.
In some cases, such as when the "packed" attribute is applied to a structure field, it may not be possible to access the field with a single read or write that is correctly aligned for the target machine.  In this case GCC falls back to generating multiple accesses rather than code that will fault or truncate the result at run time.
Note:  Due to restrictions of the C/C++11 memory model, write accesses are not allowed to touch non bit-field members.  It is therefore recommended to define all bits of the field's type as bit- field members.
The default value of this option is determined by the application binary interface for the target processor.
-fsync-libcalls This option controls whether any out-of-line instance of the "__sync" family of functions may be used to implement the C++11 "__atomic" family of functions.
The default value of this option is enabled, thus the only useful form of the option is -fno-sync-libcalls.  This option is used in the implementation of the libatomic runtime library.
GCC Developer Options This section describes command-line options that are primarily of interest to GCC developers, including options to support compiler testing and investigation of compiler bugs and compile-time performance problems. This includes options that produce debug dumps at various points in the compilation; that print statistics such as memory use and execution time; and that print information about GCC's configuration, such as where it searches for libraries.  You should rarely need to use any of these options for ordinary compilation and linking tasks.
Many developer options that cause GCC to dump output to a file take an optional =filename suffix. You can specify stdout or - to dump to standard output, and stderr for standard error.
If =filename is omitted, a default dump file name is constructed by concatenating the base dump file name, a pass number, phase letter, and pass name.  The base dump file name is the name of output file produced by the compiler if explicitly specified and not an executable; otherwise it is the source file name.  The pass number is determined by the order passes are registered with the compiler's pass manager.  This is generally the same as the order of execution, but passes registered by plugins, target-specific passes, or passes that are otherwise registered late are numbered higher than the pass named final, even if they are executed earlier.  The phase letter is one of i (inter-procedural analysis), l (language-specific), r (RTL), or t (tree).  The files are created in the directory of the output file.
-fcallgraph-info -fcallgraph-info=MARKERS Makes the compiler output callgraph information for the program, on a per-object-file basis.  The information is generated in the common VCG format.  It can be decorated with additional, per-node and/or per-edge information, if a list of comma-separated markers is additionally specified.  When the "su" marker is specified, the callgraph is decorated with stack usage information; it is equivalent to -fstack-usage.  When the "da" marker is specified, the callgraph is decorated with information about dynamically allocated objects.
When compiling with -flto, no callgraph information is output along with the object file.  At LTO link time, -fcallgraph-info may generate multiple callgraph information files next to intermediate LTO output files.
-dletters -fdump-rtl-pass -fdump-rtl-pass=filename Says to make debugging dumps during compilation at times specified by letters.  This is used for debugging the RTL-based passes of the compiler.
Some -dletters switches have different meaning when -E is used for preprocessing.
Debug dumps can be enabled with a -fdump-rtl switch or some -d option letters.  Here are the possible letters for use in pass and letters, and their meanings:
-fdump-rtl-alignments Dump after branch alignments have been computed.
-fdump-rtl-asmcons Dump after fixing rtl statements that have unsatisfied in/out constraints.
-fdump-rtl-auto_inc_dec Dump after auto-inc-dec discovery.  This pass is only run on architectures that have auto inc or auto dec instructions.
-fdump-rtl-barriers Dump after cleaning up the barrier instructions.
-fdump-rtl-bbpart Dump after partitioning hot and cold basic blocks.
-fdump-rtl-bbro Dump after block reordering.
-fdump-rtl-btl1 -fdump-rtl-btl2 -fdump-rtl-btl1 and -fdump-rtl-btl2 enable dumping after the two branch target load optimization passes.
-fdump-rtl-bypass Dump after jump bypassing and control flow optimizations.
-fdump-rtl-combine Dump after the RTL instruction combination pass.
-fdump-rtl-compgotos Dump after duplicating the computed gotos.
-fdump-rtl-ce1 -fdump-rtl-ce2 -fdump-rtl-ce3 -fdump-rtl-ce1, -fdump-rtl-ce2, and -fdump-rtl-ce3 enable dumping after the three if conversion passes.
-fdump-rtl-cprop_hardreg Dump after hard register copy propagation.
-fdump-rtl-csa Dump after combining stack adjustments.
-fdump-rtl-cse1 -fdump-rtl-cse2 -fdump-rtl-cse1 and -fdump-rtl-cse2 enable dumping after the two common subexpression elimination passes.
-fdump-rtl-dce Dump after the standalone dead code elimination passes.
-fdump-rtl-dbr Dump after delayed branch scheduling.
-fdump-rtl-dce1 -fdump-rtl-dce2 -fdump-rtl-dce1 and -fdump-rtl-dce2 enable dumping after the two dead store elimination passes.
-fdump-rtl-eh Dump after finalization of EH handling code.
-fdump-rtl-eh_ranges Dump after conversion of EH handling range regions.
-fdump-rtl-expand Dump after RTL generation.
-fdump-rtl-fwprop1 -fdump-rtl-fwprop2 -fdump-rtl-fwprop1 and -fdump-rtl-fwprop2 enable dumping after the two forward propagation passes.
-fdump-rtl-gcse1 -fdump-rtl-gcse2 -fdump-rtl-gcse1 and -fdump-rtl-gcse2 enable dumping after global common subexpression elimination.
-fdump-rtl-init-regs Dump after the initialization of the registers.
-fdump-rtl-initvals Dump after the computation of the initial value sets.
-fdump-rtl-into_cfglayout Dump after converting to cfglayout mode.
-fdump-rtl-ira Dump after iterated register allocation.
-fdump-rtl-jump Dump after the second jump optimization.
-fdump-rtl-loop2 -fdump-rtl-loop2 enables dumping after the rtl loop optimization passes.
-fdump-rtl-mach Dump after performing the machine dependent reorganization pass, if that pass exists.
-fdump-rtl-mode_sw Dump after removing redundant mode switches.
-fdump-rtl-rnreg Dump after register renumbering.
-fdump-rtl-outof_cfglayout Dump after converting from cfglayout mode.
-fdump-rtl-peephole2 Dump after the peephole pass.
-fdump-rtl-postreload Dump after post-reload optimizations.
-fdump-rtl-pro_and_epilogue Dump after generating the function prologues and epilogues.
-fdump-rtl-sched1 -fdump-rtl-sched2 -fdump-rtl-sched1 and -fdump-rtl-sched2 enable dumping after the basic block scheduling passes.
-fdump-rtl-ree Dump after sign/zero extension elimination.
-fdump-rtl-seqabstr Dump after common sequence discovery.
-fdump-rtl-shorten Dump after shortening branches.
-fdump-rtl-sibling Dump after sibling call optimizations.
-fdump-rtl-split1 -fdump-rtl-split2 -fdump-rtl-split3 -fdump-rtl-split4 -fdump-rtl-split5 These options enable dumping after five rounds of instruction splitting.
-fdump-rtl-sms Dump after modulo scheduling.  This pass is only run on some architectures.
-fdump-rtl-stack Dump after conversion from GCC's "flat register file" registers to the x87's stack-like registers.  This pass is only run on x86 variants.
-fdump-rtl-subreg1 -fdump-rtl-subreg2 -fdump-rtl-subreg1 and -fdump-rtl-subreg2 enable dumping after the two subreg expansion passes.
-fdump-rtl-unshare Dump after all rtl has been unshared.
-fdump-rtl-vartrack Dump after variable tracking.
-fdump-rtl-vregs Dump after converting virtual registers to hard registers.
-fdump-rtl-web Dump after live range splitting.
-fdump-rtl-regclass -fdump-rtl-subregs_of_mode_init -fdump-rtl-subregs_of_mode_finish -fdump-rtl-dfinit -fdump-rtl-dfinish These dumps are defined but always produce empty files.
-da -fdump-rtl-all Produce all the dumps listed above.
-dA Annotate the assembler output with miscellaneous debugging information.
-dD Dump all macro definitions, at the end of preprocessing, in addition to normal output.
-dH Produce a core dump whenever an error occurs.
-dp Annotate the assembler output with a comment indicating which pattern and alternative is used.  The length and cost of each instruction are also printed.
-dP Dump the RTL in the assembler output as a comment before each instruction.  Also turns on -dp annotation.
-dx Just generate RTL for a function instead of compiling it. Usually used with -fdump-rtl-expand.
-fdump-debug Dump debugging information generated during the debug generation phase.
-fdump-earlydebug Dump debugging information generated during the early debug generation phase.
-fdump-noaddr When doing debugging dumps, suppress address output.  This makes it more feasible to use diff on debugging dumps for compiler invocations with different compiler binaries and/or different text / bss / data / heap / stack / dso start locations.
-freport-bug Collect and dump debug information into a temporary file if an internal compiler error (ICE) occurs.
-fdump-unnumbered When doing debugging dumps, suppress instruction numbers and address output.  This makes it more feasible to use diff on debugging dumps for compiler invocations with different options, in particular with and without -g.
-fdump-unnumbered-links When doing debugging dumps (see -d option above), suppress instruction numbers for the links to the previous and next instructions in a sequence.
-fdump-ipa-switch -fdump-ipa-switch-options Control the dumping at various stages of inter-procedural analysis language tree to a file.  The file name is generated by appending a switch specific suffix to the source file name, and the file is created in the same directory as the output file.  The following dumps are possible:
all Enables all inter-procedural analysis dumps.
cgraph Dumps information about call-graph optimization, unused function removal, and inlining decisions.
inline Dump after function inlining.
Additionally, the options -optimized, -missed, -note, and -all can be provided, with the same meaning as for -fopt-info, defaulting to -optimized.
For example, -fdump-ipa-inline-optimized-missed will emit information on callsites that were inlined, along with callsites that were not inlined.
By default, the dump will contain messages about successful optimizations (equivalent to -optimized) together with low-level details about the analysis.
-fdump-lang Dump language-specific information.  The file name is made by appending .lang to the source file name.
-fdump-lang-all -fdump-lang-switch -fdump-lang-switch-options -fdump-lang-switch-options=filename Control the dumping of language-specific information.  The options and filename portions behave as described in the -fdump-tree option. The following switch values are accepted:
all Enable all language-specific dumps.
class Dump class hierarchy information.  Virtual table information is emitted unless 'slim' is specified.  This option is applicable to C++ only.
module Dump module information.  Options lineno (locations), graph (reachability), blocks (clusters), uid (serialization), alias (mergeable), asmname (Elrond), eh (mapper) & vops (macros) may provide additional information.  This option is applicable to C++ only.
raw Dump the raw internal tree data.  This option is applicable to C++ only.
-fdump-passes Print on stderr the list of optimization passes that are turned on and off by the current command-line options.
-fdump-statistics-option Enable and control dumping of pass statistics in a separate file. The file name is generated by appending a suffix ending in .statistics to the source file name, and the file is created in the same directory as the output file.  If the -option form is used, -stats causes counters to be summed over the whole compilation unit while -details dumps every event as the passes generate them.  The default with no option is to sum counters for each function compiled.
-fdump-tree-all -fdump-tree-switch -fdump-tree-switch-options -fdump-tree-switch-options=filename Control the dumping at various stages of processing the intermediate language tree to a file.  If the -options form is used, options is a list of - separated options which control the details of the dump. Not all options are applicable to all dumps; those that are not meaningful are ignored.  The following options are available
address Print the address of each node.  Usually this is not meaningful as it changes according to the environment and source file.  Its primary use is for tying up a dump file with a debug environment.
asmname If "DECL_ASSEMBLER_NAME" has been set for a given decl, use that in the dump instead of "DECL_NAME".  Its primary use is ease of use working backward from mangled names in the assembly file.
slim When dumping front-end intermediate representations, inhibit dumping of members of a scope or body of a function merely because that scope has been reached.  Only dump such items when they are directly reachable by some other path.
When dumping pretty-printed trees, this option inhibits dumping the bodies of control structures.
When dumping RTL, print the RTL in slim (condensed) form instead of the default LISP-like representation.
raw Print a raw representation of the tree.  By default, trees are pretty-printed into a C-like representation.
details Enable more detailed dumps (not honored by every dump option). Also include information from the optimization passes.
stats Enable dumping various statistics about the pass (not honored by every dump option).
blocks Enable showing basic block boundaries (disabled in raw dumps).
graph For each of the other indicated dump files (-fdump-rtl-pass), dump a representation of the control flow graph suitable for viewing with GraphViz to file.passid.pass.dot.  Each function in the file is pretty-printed as a subgraph, so that GraphViz can render them all in a single plot.
This option currently only works for RTL dumps, and the RTL is always dumped in slim form.
vops Enable showing virtual operands for every statement.
lineno Enable showing line numbers for statements.
uid Enable showing the unique ID ("DECL_UID") for each variable.
verbose Enable showing the tree dump for each statement.
eh  Enable showing the EH region number holding each statement.
scev Enable showing scalar evolution analysis details.
optimized Enable showing optimization information (only available in certain passes).
missed Enable showing missed optimization information (only available in certain passes).
note Enable other detailed optimization information (only available in certain passes).
all Turn on all options, except raw, slim, verbose and lineno.
optall Turn on all optimization options, i.e., optimized, missed, and note.
To determine what tree dumps are available or find the dump for a pass of interest follow the steps below.
1.  Invoke GCC with -fdump-passes and in the stderr output look for a code that corresponds to the pass you are interested in.  For example, the codes "tree-evrp", "tree-vrp1", and "tree-vrp2" correspond to the three Value Range Propagation passes.  The number at the end distinguishes distinct invocations of the same pass.
2.  To enable the creation of the dump file, append the pass code to the -fdump- option prefix and invoke GCC with it.  For example, to enable the dump from the Early Value Range Propagation pass, invoke GCC with the -fdump-tree-evrp option.  Optionally, you may specify the name of the dump file.  If you don't specify one, GCC creates as described below.
3.  Find the pass dump in a file whose name is composed of three components separated by a period: the name of the source file GCC was invoked to compile, a numeric suffix indicating the pass number followed by the letter t for tree passes (and the letter r for RTL passes), and finally the pass code.  For example, the Early VRP pass dump might be in a file named myfile.c.038t.evrp in the current working directory.  Note that the numeric codes are not stable and may change from one version of GCC to another.
-fopt-info -fopt-info-options -fopt-info-options=filename Controls optimization dumps from various optimization passes. If the -options form is used, options is a list of - separated option keywords to select the dump details and optimizations.
The options can be divided into three groups:
1.  options describing what kinds of messages should be emitted,
2.  options describing the verbosity of the dump, and
3.  options describing which optimizations should be included.
The options from each group can be freely mixed as they are non- overlapping. However, in case of any conflicts, the later options override the earlier options on the command line.
The following options control which kinds of messages should be emitted:
optimized Print information when an optimization is successfully applied. It is up to a pass to decide which information is relevant. For example, the vectorizer passes print the source location of loops which are successfully vectorized.
missed Print information about missed optimizations. Individual passes control which information to include in the output.
note Print verbose information about optimizations, such as certain transformations, more detailed messages about decisions etc.
all Print detailed optimization information. This includes optimized, missed, and note.
The following option controls the dump verbosity:
internals By default, only "high-level" messages are emitted. This option enables additional, more detailed, messages, which are likely to only be of interest to GCC developers.
One or more of the following option keywords can be used to describe a group of optimizations:
ipa Enable dumps from all interprocedural optimizations.
loop Enable dumps from all loop optimizations.
inline Enable dumps from all inlining optimizations.
omp Enable dumps from all OMP (Offloading and Multi Processing) optimizations.
vec Enable dumps from all vectorization optimizations.
optall Enable dumps from all optimizations. This is a superset of the optimization groups listed above.
If options is omitted, it defaults to optimized-optall, which means to dump messages about successful optimizations from all the passes, omitting messages that are treated as "internals".
If the filename is provided, then the dumps from all the applicable optimizations are concatenated into the filename.  Otherwise the dump is output onto stderr. Though multiple -fopt-info options are accepted, only one of them can include a filename. If other filenames are provided then all but the first such option are ignored.
Note that the output filename is overwritten in case of multiple translation units. If a combined output from multiple translation units is desired, stderr should be used instead.
In the following example, the optimization info is output to stderr:
gcc -O3 -fopt-info
This example:
gcc -O3 -fopt-info-missed=missed.all
outputs missed optimization report from all the passes into missed.all, and this one:
gcc -O2 -ftree-vectorize -fopt-info-vec-missed
prints information about missed optimization opportunities from vectorization passes on stderr.  Note that -fopt-info-vec-missed is equivalent to -fopt-info-missed-vec.  The order of the optimization group names and message types listed after -fopt-info does not matter.
As another example,
gcc -O3 -fopt-info-inline-optimized-missed=inline.txt
outputs information about missed optimizations as well as optimized locations from all the inlining passes into inline.txt.
Finally, consider:
gcc -fopt-info-vec-missed=vec.miss -fopt-info-loop-optimized=loop.opt
Here the two output filenames vec.miss and loop.opt are in conflict since only one output file is allowed. In this case, only the first option takes effect and the subsequent options are ignored. Thus only vec.miss is produced which contains dumps from the vectorizer about missed opportunities.
-fsave-optimization-record Write a SRCFILE.opt-record.json.gz file detailing what optimizations were performed, for those optimizations that support -fopt-info.
This option is experimental and the format of the data within the compressed JSON file is subject to change.
It is roughly equivalent to a machine-readable version of -fopt-info-all, as a collection of messages with source file, line number and column number, with the following additional data for each message:
*   the execution count of the code being optimized, along with metadata about whether this was from actual profile data, or just an estimate, allowing consumers to prioritize messages by code hotness,
*   the function name of the code being optimized, where applicable,
*   the "inlining chain" for the code being optimized, so that when a function is inlined into several different places (which might themselves be inlined), the reader can distinguish between the copies,
*   objects identifying those parts of the message that refer to expressions, statements or symbol-table nodes, which of these categories they are, and, when available, their source code location,
*   the GCC pass that emitted the message, and
*   the location in GCC's own code from which the message was emitted
Additionally, some messages are logically nested within other messages, reflecting implementation details of the optimization passes.
-fsched-verbose=n On targets that use instruction scheduling, this option controls the amount of debugging output the scheduler prints to the dump files.
For n greater than zero, -fsched-verbose outputs the same information as -fdump-rtl-sched1 and -fdump-rtl-sched2.  For n greater than one, it also output basic block probabilities, detailed ready list information and unit/insn info.  For n greater than two, it includes RTL at abort point, control-flow and regions info.  And for n over four, -fsched-verbose also includes dependence info.
-fenable-kind-pass -fdisable-kind-pass=range-list This is a set of options that are used to explicitly disable/enable optimization passes.  These options are intended for use for debugging GCC.  Compiler users should use regular options for enabling/disabling passes instead.
-fdisable-ipa-pass Disable IPA pass pass. pass is the pass name.  If the same pass is statically invoked in the compiler multiple times, the pass name should be appended with a sequential number starting from 1.
-fdisable-rtl-pass -fdisable-rtl-pass=range-list Disable RTL pass pass.  pass is the pass name.  If the same pass is statically invoked in the compiler multiple times, the pass name should be appended with a sequential number starting from 1. range-list is a comma-separated list of function ranges or assembler names.  Each range is a number pair separated by a colon.  The range is inclusive in both ends.  If the range is trivial, the number pair can be simplified as a single number. If the function's call graph node's uid falls within one of the specified ranges, the pass is disabled for that function.  The uid is shown in the function header of a dump file, and the pass names can be dumped by using option -fdump-passes.
-fdisable-tree-pass -fdisable-tree-pass=range-list Disable tree pass pass.  See -fdisable-rtl for the description of option arguments.
-fenable-ipa-pass Enable IPA pass pass.  pass is the pass name.  If the same pass is statically invoked in the compiler multiple times, the pass name should be appended with a sequential number starting from 1.
-fenable-rtl-pass -fenable-rtl-pass=range-list Enable RTL pass pass.  See -fdisable-rtl for option argument description and examples.
-fenable-tree-pass -fenable-tree-pass=range-list Enable tree pass pass.  See -fdisable-rtl for the description of option arguments.
Here are some examples showing uses of these options.
# disable ccp1 for all functions -fdisable-tree-ccp1 # disable complete unroll for function whose cgraph node uid is 1 -fenable-tree-cunroll=1 # disable gcse2 for functions at the following ranges [1,1], # [300,400], and [400,1000] # disable gcse2 for functions foo and foo2 -fdisable-rtl-gcse2=foo,foo2 # disable early inlining -fdisable-tree-einline # disable ipa inlining -fdisable-ipa-inline # enable tree full unroll -fenable-tree-unroll
-fchecking -fchecking=n Enable internal consistency checking.  The default depends on the compiler configuration.  -fchecking=2 enables further internal consistency checking that might affect code generation.
-frandom-seed=string This option provides a seed that GCC uses in place of random numbers in generating certain symbol names that have to be different in every compiled file.  It is also used to place unique stamps in coverage data files and the object files that produce them.  You can use the -frandom-seed option to produce reproducibly identical object files.
The string can either be a number (decimal, octal or hex) or an arbitrary string (in which case it's converted to a number by computing CRC32).
The string should be different for every file you compile.
-save-temps Store the usual "temporary" intermediate files permanently; name them as auxiliary output files, as specified described under -dumpbase and -dumpdir.
When used in combination with the -x command-line option, -save-temps is sensible enough to avoid overwriting an input source file with the same extension as an intermediate file.  The corresponding intermediate file may be obtained by renaming the source file before using -save-temps.
-save-temps=cwd Equivalent to -save-temps -dumpdir ./.
-save-temps=obj Equivalent to -save-temps -dumpdir outdir/, where outdir/ is the directory of the output file specified after the -o option, including any directory separators.  If the -o option is not used, the -save-temps=obj switch behaves like -save-temps=cwd.
-time[=file] Report the CPU time taken by each subprocess in the compilation sequence.  For C source files, this is the compiler proper and assembler (plus the linker if linking is done).
Without the specification of an output file, the output looks like this:
# cc1 0.12 0.01 # as 0.00 0.01
The first number on each line is the "user time", that is time spent executing the program itself.  The second number is "system time", time spent executing operating system routines on behalf of the program.  Both numbers are in seconds.
With the specification of an output file, the output is appended to the named file, and it looks like this:
0.12 0.01 cc1 <options> 0.00 0.01 as <options>
The "user time" and the "system time" are moved before the program name, and the options passed to the program are displayed, so that one can later tell what file was being compiled, and with which options.
-fdump-final-insns[=file] Dump the final internal representation (RTL) to file.  If the optional argument is omitted (or if file is "."), the name of the dump file is determined by appending ".gkd" to the dump base name, see -dumpbase.
-fcompare-debug[=opts] If no error occurs during compilation, run the compiler a second time, adding opts and -fcompare-debug-second to the arguments passed to the second compilation.  Dump the final internal representation in both compilations, and print an error if they differ.
If the equal sign is omitted, the default -gtoggle is used.
The environment variable GCC_COMPARE_DEBUG, if defined, non-empty and nonzero, implicitly enables -fcompare-debug.  If GCC_COMPARE_DEBUG is defined to a string starting with a dash, then it is used for opts, otherwise the default -gtoggle is used.
-fcompare-debug=, with the equal sign but without opts, is equivalent to -fno-compare-debug, which disables the dumping of the final representation and the second compilation, preventing even GCC_COMPARE_DEBUG from taking effect.
To verify full coverage during -fcompare-debug testing, set GCC_COMPARE_DEBUG to say -fcompare-debug-not-overridden, which GCC rejects as an invalid option in any actual compilation (rather than preprocessing, assembly or linking).  To get just a warning, setting GCC_COMPARE_DEBUG to -w%n-fcompare-debug not overridden will do.
-fcompare-debug-second This option is implicitly passed to the compiler for the second compilation requested by -fcompare-debug, along with options to silence warnings, and omitting other options that would cause the compiler to produce output to files or to standard output as a side effect.  Dump files and preserved temporary files are renamed so as to contain the ".gk" additional extension during the second compilation, to avoid overwriting those generated by the first.
When this option is passed to the compiler driver, it causes the first compilation to be skipped, which makes it useful for little other than debugging the compiler proper.
-gtoggle Turn off generation of debug info, if leaving out this option generates it, or turn it on at level 2 otherwise.  The position of this argument in the command line does not matter; it takes effect after all other options are processed, and it does so only once, no matter how many times it is given.  This is mainly intended to be used with -fcompare-debug.
-fvar-tracking-assignments-toggle Toggle -fvar-tracking-assignments, in the same way that -gtoggle toggles -g.
-Q  Makes the compiler print out each function name as it is compiled, and print some statistics about each pass when it finishes.
-ftime-report Makes the compiler print some statistics about the time consumed by each pass when it finishes.
-ftime-report-details Record the time consumed by infrastructure parts separately for each pass.
-fira-verbose=n Control the verbosity of the dump file for the integrated register allocator.  The default value is 5.  If the value n is greater or equal to 10, the dump output is sent to stderr using the same format as n minus 10.
-flto-report Prints a report with internal details on the workings of the link- time optimizer.  The contents of this report vary from version to version.  It is meant to be useful to GCC developers when processing object files in LTO mode (via -flto).
-flto-report-wpa Like -flto-report, but only print for the WPA phase of link-time optimization.
-fmem-report Makes the compiler print some statistics about permanent memory allocation when it finishes.
-fmem-report-wpa Makes the compiler print some statistics about permanent memory allocation for the WPA phase only.
-fpre-ipa-mem-report -fpost-ipa-mem-report Makes the compiler print some statistics about permanent memory allocation before or after interprocedural optimization.
-fprofile-report Makes the compiler print some statistics about consistency of the (estimated) profile and effect of individual passes.
-fstack-usage Makes the compiler output stack usage information for the program, on a per-function basis.  The filename for the dump is made by appending .su to the auxname.  auxname is generated from the name of the output file, if explicitly specified and it is not an executable, otherwise it is the basename of the source file.  An entry is made up of three fields: