⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 arm-linux-gcc.1

📁 gcc编译器 arm-2.95.3.tar.gz
💻 1
📖 第 1 页 / 共 5 页
字号:
.SpLevel 3 includes extra information, such as all the macro definitionspresent in the program.  Some debuggers support macro expansion whenyou use `\|\c.B \-g3\c\&\|'..TP.B \-pGenerate extra code to write profile information suitable for theanalysis program \c.B prof\c\&..TP.B \-pgGenerate extra code to write profile information suitable for theanalysis program \c.B gprof\c\&..TP.B \-aGenerate extra code to write profile information for basic blocks,which will record the number of times each basic block is executed.This data could be analyzed by a program like \c.B tcov\c\&.  Note,however, that the format of the data is not what \c.B tcov\c\& expects.Eventually GNU \c.B gprof\c\& should be extended to process this data..TP.B \-axGenerate extra code to read basic block profiling parameters from file `bb.in' and write profiling results to file `bb.out'.`bb.in' contains a list of functions. Whenever a function on the listis entered, profiling is turned on. When the outmost function is left,profiling is turned off. If a function name is prefixed with `-'the function is excluded from profiling. If a function name is notunique it can be disambiguated by writing`/path/filename.d:functionname'. `bb.out' will list some availablefilenames.Four function names have a special meaning:`__bb_jumps__' will cause jump frequencies to be written to `bb.out'.`__bb_trace__' will cause the sequence of basic blocks to be piped into `gzip' and written to file `bbtrace.gz'.`__bb_hidecall__' will cause call instructions to be excluded fromthe trace.`__bb_showret__' will cause return instructions to be included inthe trace..TP.BI "\-d" "letters"Says to make debugging dumps during compilation at times specified by.I letters\c\&.  This is used for debugging the compiler.  The file namesfor most of the dumps are made by appending a word to the source filename (e.g.  `\|\c.B foo.c.rtl\c\&\|' or `\|\c.B foo.c.jump\c\&\|')..TP.B \-dMDump all macro definitions, at the end of preprocessing, and write nooutput..TP.B \-dNDump all macro names, at the end of preprocessing..TP.B \-dDDump all macro definitions, at the end of preprocessing, in addition tonormal output..TP.B \-dyDump debugging information during parsing, to standard error..TP.B \-drDump after RTL generation, to `\|\c.I file\c.B \&.rtl\c\&\|'..TP.B \-dxJust generate RTL for a function instead of compiling it.  Usually usedwith `\|\c.B r\c\&\|'..TP.B \-djDump after first jump optimization, to `\|\c.I file\c.B \&.jump\c\&\|'..TP.B \-dsDump after CSE (including the jump optimization that sometimesfollows CSE), to `\|\c.I file\c.B \&.cse\c\&\|'..TP.B \-dLDump after loop optimization, to `\|\c.I file\c.B \&.loop\c\&\|'..TP.B \-dtDump after the second CSE pass (including the jump optimization thatsometimes follows CSE), to `\|\c.I file\c.B \&.cse2\c\&\|'..TP.B \-dfDump after flow analysis, to `\|\c.I file\c.B \&.flow\c\&\|'..TP.B \-dcDump after instruction combination, to `\|\c.I file\c.B \&.combine\c\&\|'..TP.B \-dSDump after the first instruction scheduling pass, to`\|\c.I file\c.B \&.sched\c\&\|'..TP.B \-dlDump after local register allocation, to `\|\c.I file\c.B \&.lreg\c\&\|'..TP.B \-dgDump after global register allocation, to `\|\c.I file\c.B \&.greg\c\&\|'..TP.B \-dRDump after the second instruction scheduling pass, to`\|\c.I file\c.B \&.sched2\c\&\|'..TP.B \-dJDump after last jump optimization, to `\|\c.I file\c.B \&.jump2\c\&\|'..TP.B \-ddDump after delayed branch scheduling, to `\|\c.I file\c.B \&.dbr\c\&\|'..TP.B \-dkDump after conversion from registers to stack, to `\|\c.I file\c.B \&.stack\c\&\|'..TP.B \-daProduce all the dumps listed above..TP.B \-dmPrint statistics on memory usage, at the end of the run, tostandard error..TP.B \-dpAnnotate the assembler output with a comment indicating whichpattern and alternative was used..TP.B \-fpretend\-floatWhen running a cross-compiler, pretend that the target machine uses thesame floating point format as the host machine.  This causes incorrectoutput of the actual floating constants, but the actual instructionsequence will probably be the same as GNU CC would make when running onthe target machine..TP.B \-save\-tempsStore the usual \*(lqtemporary\*(rq intermediate files permanently; place themin the current directory and name them based on the source file.  Thus,compiling `\|\c.B foo.c\c\&\|' with `\|\c.B \-c \-save\-temps\c\&\|' would produce files`\|\c.B foo.cpp\c\&\|' and `\|\c.B foo.s\c\&\|', as well as `\|\c.B foo.o\c\&\|'..TP.BI "\-print\-file\-name=" "library"Print the full absolute name of the library file \|\c.nh.I library.hy\&\| thatwould be used when linking\(em\&and do not do anything else.  With thisoption, GNU CC does not compile or link anything; it just prints thefile name..TP.B \-print\-libgcc\-file\-nameSame as `\|\c.B \-print\-file\-name=libgcc.a\c\&\|'..TP.BI "\-print\-prog\-name=" "program"Like `\|\c.B \-print\-file\-name\c\&\|', but searches for a program such as `\|\ccpp\c\&\|'..SH OPTIMIZATION OPTIONSThese options control various sorts of optimizations:.TP.B \-O.TP.B \-O1Optimize.  Optimizing compilation takes somewhat more time, and a lotmore memory for a large function..SpWithout `\|\c.B \-O\c\&\|', the compiler's goal is to reduce the cost ofcompilation and to make debugging produce the expected results.Statements are independent: if you stop the program with a breakpointbetween statements, you can then assign a new value to any variable orchange the program counter to any other statement in the function andget exactly the results you would expect from the source code..SpWithout `\|\c.B \-O\c\&\|', only variables declared \c.B register\c\& areallocated in registers.  The resulting compiled code is a little worsethan produced by PCC without `\|\c.B \-O\c\&\|'..SpWith `\|\c.B \-O\c\&\|', the compiler tries to reduce code size and executiontime..SpWhen you specify `\|\c.B \-O\c\&\|', the two options `\|\c.B \-fthread\-jumps\c\&\|' and `\|\c.B \-fdefer\-pop\c\&\|' are turned on.  On machines that have delay slots, the `\|\c.B \-fdelayed\-branch\c\&\|' option is turned on.  For those machines that can support debugging evenwithout a frame pointer, the `\|\c.B \-fomit\-frame\-pointer\c\&\|' option is turned on.  On some machines other flags may also be turned on..TP.B \-O2Optimize even more.  Nearly all supported optimizations that do notinvolve a space-speed tradeoff are performed.  Loop unrolling and functioninlining are not done, for example.  As compared to.B \-O\c\&,this option increases both compilation time and the performance of thegenerated code..TP.B \-O3Optimize yet more. This turns on everything.B \-O2does, along with also turning on.B \-finline\-functions..TP.B \-O0Do not optimize..SpIf you use multiple.B \-Ooptions, with or without level numbers, the last such option is theone that is effective..PPOptions of the form `\|\c.B \-f\c.I flag\c\&\c\&\|' specify machine-independentflags.  Most flags have both positive and negative forms; the negativeform of `\|\c.B \-ffoo\c\&\|' would be `\|\c.B \-fno\-foo\c\&\|'.  The following list showsonly one form\(em\&the one which is not the default.You can figure out the other form by either removing `\|\c.B no\-\c\&\|' oradding it..TP.B \-ffloat\-storeDo not store floating point variables in registers.  Thisprevents undesirable excess precision on machines such as the68000 where the floating registers (of the 68881) keep moreprecision than a \c.B double\c\& is supposed to have..SpFor most programs, the excess precision does only good, but a fewprograms rely on the precise definition of IEEE floating point.Use `\|\c.B \-ffloat\-store\c\&\|' for such programs..TP.B \-fmemoize\-lookups.TP.B \-fsave\-memoizedUse heuristics to compile faster (C++ only).  These heuristics are notenabled by default, since they are only effective for certain inputfiles.  Other input files compile more slowly..SpThe first time the compiler must build a call to a member function (orreference to a data member), it must (1) determine whether the classimplements member functions of that name; (2) resolve which memberfunction to call (which involves figuring out what sorts of typeconversions need to be made); and (3) check the visibility of the memberfunction to the caller.  All of this adds up to slower compilation.Normally, the second time a call is made to that member function (orreference to that data member), it must go through the same lengthyprocess again.  This means that code like this.Sp\&  cout << "This " << p << " has " << n << " legs.\en";.Spmakes six passes through all three steps.  By using a software cache,a \*(lqhit\*(rq significantly reduces this cost.  Unfortunately, using thecache introduces another layer of mechanisms which must be implemented,and so incurs its own overhead.  `\|\c.B \-fmemoize\-lookups\c\&\|' enablesthe software cache..SpBecause access privileges (visibility) to members and member functionsmay differ from one function context to the next,.B g++may need to flush the cache.  With the `\|\c.B \-fmemoize\-lookups\c\&\|' flag, the cache is flushed after everyfunction that is compiled.  The `\|\c\-fsave\-memoized\c\&\|' flag enables the same software cache, but when the compilerdetermines that the context of the last function compiled would yieldthe same access privileges of the next function to compile, itpreserves the cache.This is most helpful when defining many member functions for the sameclass: with the exception of member functions which are friends ofother classes, each member function has exactly the same accessprivileges as every other, and the cache need not be flushed..TP.B \-fno\-default\-inlineDon't make member functions inline by default merely because they aredefined inside the class scope (C++ only)..TP.B \-fno\-defer\-popAlways pop the arguments to each function call as soon as thatfunction returns.  For machines which must pop arguments after afunction call, the compiler normally lets arguments accumulate on thestack for several function calls and pops them all at once..TP.B \-fforce\-memForce memory operands to be copied into registers before doingarithmetic on them.  This may produce better code by making allmemory references potential common subexpressions.  When they arenot common subexpressions, instruction combination shouldeliminate the separate register-load.  I am interested in hearingabout the difference this makes..TP.B \-fforce\-addrForce memory address constants to be copied into registers beforedoing arithmetic on them.  This may produce better code just as`\|\c.B \-fforce\-mem\c\&\|' may.  I am interested in hearing about thedifference this makes..TP.B \-fomit\-frame\-pointerDon't keep the frame pointer in a register for functions thatdon't need one.  This avoids the instructions to save, set up andrestore frame pointers; it also makes an extra register availablein many functions.  \c.I It also makes debugging impossible on most machines\c\&..SpOn some machines, such as the Vax, this flag has no effect, becausethe standard calling sequence automatically handles the frame pointerand nothing is saved by pretending it doesn't exist.  Themachine-description macro \c.B FRAME_POINTER_REQUIRED\c\& controlswhether a target machine supports this flag..TP.B \-finline\-functionsIntegrate all simple functions into their callers.  The compilerheuristically decides which functions are simple enough to be worthintegrating in this way..SpIf all calls to a given function are integrated, and the function isdeclared \c.B static\c\&, then GCC normally does not output the function asassembler code in its own right..TP.B \-fcaller\-savesEnable values to be allocated in registers that will be clobbered byfunction calls, by emitting extra instructions to save and restore theregisters around such calls.  Such allocation is done only when itseems to result in better code than would otherwise be produced..SpThis option is enabled by default on certain machines, usually thosewhich have no call-preserved registers to use instead..TP.B \-fkeep\-inline\-functionsEven if all calls to a given function are integrated, and the functionis declared \c.B static\c\&, nevertheless output a separate run-timecallable version of the function..TP.B \-fno\-function\-cseDo not put function addresses in registers; make each instruction thatcalls a constant function contain the function's address explicitly..SpThis option results in less efficient code, but some strange hacksthat alter the assembler output may be confused by the optimizationsperformed when this option is not used..TP.B \-fno\-peepholeDisable any machine-specific peephole optimizations..TP.B \-ffast-mathThis option allows GCC to violate some ANSI or IEEE rules/specificationsin the interest of optimizing code for speed.  For example, it allowsthe compiler to assume arguments to the \c.B sqrt\c\& function arenon-negative numbers..SpThis option should never be turned on by any `\|\c.B \-O\c\&\|' option sinceit can result in incorrect output for programs which depend onan exact implementation of IEEE or ANSI rules/specifications formath functions..PPThe following options control specific optimizations.  The `\|\c.B \-O2\c\&\|'option turns on all of these optimizations except `\|\c.B \-funroll\-loops\c\&\|'and `\|\c.B \-funroll\-all\-loops\c\&\|'..PPThe `\|\c.B \-O\c\&\|' option usually turns onthe `\|\c.B \-fthread\-jumps\c\&\|' and `\|\c.B \-fdelayed\-branch\c\&\|' options, butspecific machines may change the default optimizations..PPYou can use the following flags in the rare cases when \*(lqfine-tuning\*(rqof optimizations to be performed is desired..TP.B \-fstrength\-reducePerform the optimizations of loop strength reduction andelimination of iteration variables..TP.B \-fthread\-jumpsPerform optimizations where we check to see if a jump branches to alocation where another comparison subsumed by the first is found.  Ifso, the first branch is redirected to either the destination of thesecond branch or a point immediately following it, depending on whetherthe condition is known to be true or false..TP.B \-funroll\-loopsPerform the optimization of loop unrolling.  This is only done for loopswhose number of iterations can be determined at compile time or run time..TP.B \-funroll\-all\-loopsPerform the optimization of loop unrolling.  This is done for all loops.This usually makes programs run more slowly..TP.B \-fcse\-follow\-jumpsIn common subexpression elimination, scan through jump instructionswhen the target of the jump is not reached by any other path.  Forexample, when CSE encounters an \c.B if\c\& statement with an.B else\c\& clause, CSE will follow the jump when the conditiontested is false..TP.B \-fcse\-skip\-blocksThis is similar to `\|\c.B \-fcse\-follow\-jumps\c\&\|', but causes CSE tofollow jumps which conditionally skip over blocks.  When CSEencounters a simple \c.B if\c\& statement with no else clause,`\|\c.B \-fcse\-skip\-blocks\c\&\|' causes CSE to follow the jump around thebody of the \c.B if\c\&..TP.B \-frerun\-cse\-after\-loopRe-run common subexpression elimination after loop optimizations has beenperformed..TP.B \-felide\-constructorsEl

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -