Optimize-Options.html 176 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>Using the GNU Compiler Collection (GCC): Optimize Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): Optimize Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): Optimize Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Invoking-GCC.html#Invoking-GCC" rel="up" title="Invoking GCC">
  30. <link href="Instrumentation-Options.html#Instrumentation-Options" rel="next" title="Instrumentation Options">
  31. <link href="Debugging-Options.html#Debugging-Options" rel="prev" title="Debugging Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="Optimize-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Instrumentation-Options.html#Instrumentation-Options" accesskey="n" rel="next">Instrumentation Options</a>, Previous: <a href="Debugging-Options.html#Debugging-Options" accesskey="p" rel="prev">Debugging Options</a>, Up: <a href="Invoking-GCC.html#Invoking-GCC" accesskey="u" rel="up">Invoking GCC</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="Options-That-Control-Optimization"></a>
  69. <h3 class="section">3.10 Options That Control Optimization</h3>
  70. <a name="index-optimize-options"></a>
  71. <a name="index-options_002c-optimization"></a>
  72. <p>These options control various sorts of optimizations.
  73. </p>
  74. <p>Without any optimization option, the compiler&rsquo;s goal is to reduce the
  75. cost of compilation and to make debugging produce the expected
  76. results. Statements are independent: if you stop the program with a
  77. breakpoint between statements, you can then assign a new value to any
  78. variable or change the program counter to any other statement in the
  79. function and get exactly the results you expect from the source
  80. code.
  81. </p>
  82. <p>Turning on optimization flags makes the compiler attempt to improve
  83. the performance and/or code size at the expense of compilation time
  84. and possibly the ability to debug the program.
  85. </p>
  86. <p>The compiler performs optimization based on the knowledge it has of the
  87. program. Compiling multiple files at once to a single output file mode allows
  88. the compiler to use information gained from all of the files when compiling
  89. each of them.
  90. </p>
  91. <p>Not all optimizations are controlled directly by a flag. Only
  92. optimizations that have a flag are listed in this section.
  93. </p>
  94. <p>Most optimizations are only enabled if an <samp>-O</samp> level is set on
  95. the command line. Otherwise they are disabled, even if individual
  96. optimization flags are specified.
  97. </p>
  98. <p>Depending on the target and how GCC was configured, a slightly different
  99. set of optimizations may be enabled at each <samp>-O</samp> level than
  100. those listed here. You can invoke GCC with <samp>-Q --help=optimizers</samp>
  101. to find out the exact set of optimizations that are enabled at each level.
  102. See <a href="Overall-Options.html#Overall-Options">Overall Options</a>, for examples.
  103. </p>
  104. <dl compact="compact">
  105. <dt><code>-O</code></dt>
  106. <dt><code>-O1</code></dt>
  107. <dd><a name="index-O"></a>
  108. <a name="index-O1"></a>
  109. <p>Optimize. Optimizing compilation takes somewhat more time, and a lot
  110. more memory for a large function.
  111. </p>
  112. <p>With <samp>-O</samp>, the compiler tries to reduce code size and execution
  113. time, without performing any optimizations that take a great deal of
  114. compilation time.
  115. </p>
  116. <p><samp>-O</samp> turns on the following optimization flags:
  117. </p><div class="smallexample">
  118. <pre class="smallexample">-fauto-inc-dec
  119. -fbranch-count-reg
  120. -fcombine-stack-adjustments
  121. -fcompare-elim
  122. -fcprop-registers
  123. -fdce
  124. -fdefer-pop
  125. -fdelayed-branch
  126. -fdse
  127. -fforward-propagate
  128. -fguess-branch-probability
  129. -fif-conversion2
  130. -fif-conversion
  131. -finline-functions-called-once
  132. -fipa-pure-const
  133. -fipa-profile
  134. -fipa-reference
  135. -fmerge-constants
  136. -fmove-loop-invariants
  137. -freorder-blocks
  138. -fshrink-wrap
  139. -fshrink-wrap-separate
  140. -fsplit-wide-types
  141. -fssa-backprop
  142. -fssa-phiopt
  143. -ftree-bit-ccp
  144. -ftree-ccp
  145. -ftree-ch
  146. -ftree-coalesce-vars
  147. -ftree-copy-prop
  148. -ftree-dce
  149. -ftree-dominator-opts
  150. -ftree-dse
  151. -ftree-forwprop
  152. -ftree-fre
  153. -ftree-phiprop
  154. -ftree-sink
  155. -ftree-slsr
  156. -ftree-sra
  157. -ftree-pta
  158. -ftree-ter
  159. -funit-at-a-time
  160. </pre></div>
  161. <p><samp>-O</samp> also turns on <samp>-fomit-frame-pointer</samp> on machines
  162. where doing so does not interfere with debugging.
  163. </p>
  164. </dd>
  165. <dt><code>-O2</code></dt>
  166. <dd><a name="index-O2"></a>
  167. <p>Optimize even more. GCC performs nearly all supported optimizations
  168. that do not involve a space-speed tradeoff.
  169. As compared to <samp>-O</samp>, this option increases both compilation time
  170. and the performance of the generated code.
  171. </p>
  172. <p><samp>-O2</samp> turns on all optimization flags specified by <samp>-O</samp>. It
  173. also turns on the following optimization flags:
  174. </p><div class="smallexample">
  175. <pre class="smallexample">-fthread-jumps
  176. -falign-functions -falign-jumps
  177. -falign-loops -falign-labels
  178. -fcaller-saves
  179. -fcrossjumping
  180. -fcse-follow-jumps -fcse-skip-blocks
  181. -fdelete-null-pointer-checks
  182. -fdevirtualize -fdevirtualize-speculatively
  183. -fexpensive-optimizations
  184. -fgcse -fgcse-lm
  185. -fhoist-adjacent-loads
  186. -finline-small-functions
  187. -findirect-inlining
  188. -fipa-cp
  189. -fipa-bit-cp
  190. -fipa-vrp
  191. -fipa-sra
  192. -fipa-icf
  193. -fisolate-erroneous-paths-dereference
  194. -flra-remat
  195. -foptimize-sibling-calls
  196. -foptimize-strlen
  197. -fpartial-inlining
  198. -fpeephole2
  199. -freorder-blocks-algorithm=stc
  200. -freorder-blocks-and-partition -freorder-functions
  201. -frerun-cse-after-loop
  202. -fsched-interblock -fsched-spec
  203. -fschedule-insns -fschedule-insns2
  204. -fstore-merging
  205. -fstrict-aliasing -fstrict-overflow
  206. -ftree-builtin-call-dce
  207. -ftree-switch-conversion -ftree-tail-merge
  208. -fcode-hoisting
  209. -ftree-pre
  210. -ftree-vrp
  211. -fipa-ra
  212. </pre></div>
  213. <p>Please note the warning under <samp>-fgcse</samp> about
  214. invoking <samp>-O2</samp> on programs that use computed gotos.
  215. </p>
  216. </dd>
  217. <dt><code>-O3</code></dt>
  218. <dd><a name="index-O3"></a>
  219. <p>Optimize yet more. <samp>-O3</samp> turns on all optimizations specified
  220. by <samp>-O2</samp> and also turns on the <samp>-finline-functions</samp>,
  221. <samp>-funswitch-loops</samp>, <samp>-fpredictive-commoning</samp>,
  222. <samp>-fgcse-after-reload</samp>, <samp>-ftree-loop-vectorize</samp>,
  223. <samp>-ftree-loop-distribute-patterns</samp>, <samp>-fsplit-paths</samp>
  224. <samp>-ftree-slp-vectorize</samp>, <samp>-fvect-cost-model</samp>,
  225. <samp>-ftree-partial-pre</samp>, <samp>-fpeel-loops</samp>
  226. and <samp>-fipa-cp-clone</samp> options.
  227. </p>
  228. </dd>
  229. <dt><code>-O0</code></dt>
  230. <dd><a name="index-O0"></a>
  231. <p>Reduce compilation time and make debugging produce the expected
  232. results. This is the default.
  233. </p>
  234. </dd>
  235. <dt><code>-Os</code></dt>
  236. <dd><a name="index-Os"></a>
  237. <p>Optimize for size. <samp>-Os</samp> enables all <samp>-O2</samp> optimizations that
  238. do not typically increase code size.
  239. </p>
  240. <p><samp>-Os</samp> disables the following optimization flags:
  241. </p><div class="smallexample">
  242. <pre class="smallexample">-falign-functions -falign-jumps -falign-loops
  243. -falign-labels -fprefetch-loop-arrays
  244. </pre></div>
  245. <p>It also enables <samp>-finline-functions</samp>, causes the compiler to tune for
  246. code size rather than execution speed, and performs further optimizations
  247. designed to reduce code size.
  248. </p>
  249. </dd>
  250. <dt><code>-Ofast</code></dt>
  251. <dd><a name="index-Ofast"></a>
  252. <p>Disregard strict standards compliance. <samp>-Ofast</samp> enables all
  253. <samp>-O3</samp> optimizations. It also enables optimizations that are not
  254. valid for all standard-compliant programs.
  255. It turns on <samp>-ffast-math</samp> and the Fortran-specific
  256. <samp>-fno-protect-parens</samp> and <samp>-fstack-arrays</samp>.
  257. </p>
  258. </dd>
  259. <dt><code>-Og</code></dt>
  260. <dd><a name="index-Og"></a>
  261. <p>Optimize debugging experience. <samp>-Og</samp> enables optimizations
  262. that do not interfere with debugging. It should be the optimization
  263. level of choice for the standard edit-compile-debug cycle, offering
  264. a reasonable level of optimization while maintaining fast compilation
  265. and a good debugging experience.
  266. </p></dd>
  267. </dl>
  268. <p>If you use multiple <samp>-O</samp> options, with or without level numbers,
  269. the last such option is the one that is effective.
  270. </p>
  271. <p>Options of the form <samp>-f<var>flag</var></samp> specify machine-independent
  272. flags. Most flags have both positive and negative forms; the negative
  273. form of <samp>-ffoo</samp> is <samp>-fno-foo</samp>. In the table
  274. below, only one of the forms is listed&mdash;the one you typically
  275. use. You can figure out the other form by either removing &lsquo;<samp>no-</samp>&rsquo;
  276. or adding it.
  277. </p>
  278. <p>The following options control specific optimizations. They are either
  279. activated by <samp>-O</samp> options or are related to ones that are. You
  280. can use the following flags in the rare cases when &ldquo;fine-tuning&rdquo; of
  281. optimizations to be performed is desired.
  282. </p>
  283. <dl compact="compact">
  284. <dt><code>-fno-defer-pop</code></dt>
  285. <dd><a name="index-fno_002ddefer_002dpop"></a>
  286. <p>Always pop the arguments to each function call as soon as that function
  287. returns. For machines that must pop arguments after a function call,
  288. the compiler normally lets arguments accumulate on the stack for several
  289. function calls and pops them all at once.
  290. </p>
  291. <p>Disabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  292. </p>
  293. </dd>
  294. <dt><code>-fforward-propagate</code></dt>
  295. <dd><a name="index-fforward_002dpropagate"></a>
  296. <p>Perform a forward propagation pass on RTL. The pass tries to combine two
  297. instructions and checks if the result can be simplified. If loop unrolling
  298. is active, two passes are performed and the second is scheduled after
  299. loop unrolling.
  300. </p>
  301. <p>This option is enabled by default at optimization levels <samp>-O</samp>,
  302. <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  303. </p>
  304. </dd>
  305. <dt><code>-ffp-contract=<var>style</var></code></dt>
  306. <dd><a name="index-ffp_002dcontract"></a>
  307. <p><samp>-ffp-contract=off</samp> disables floating-point expression contraction.
  308. <samp>-ffp-contract=fast</samp> enables floating-point expression contraction
  309. such as forming of fused multiply-add operations if the target has
  310. native support for them.
  311. <samp>-ffp-contract=on</samp> enables floating-point expression contraction
  312. if allowed by the language standard. This is currently not implemented
  313. and treated equal to <samp>-ffp-contract=off</samp>.
  314. </p>
  315. <p>The default is <samp>-ffp-contract=fast</samp>.
  316. </p>
  317. </dd>
  318. <dt><code>-fomit-frame-pointer</code></dt>
  319. <dd><a name="index-fomit_002dframe_002dpointer"></a>
  320. <p>Don&rsquo;t keep the frame pointer in a register for functions that
  321. don&rsquo;t need one. This avoids the instructions to save, set up and
  322. restore frame pointers; it also makes an extra register available
  323. in many functions. <strong>It also makes debugging impossible on
  324. some machines.</strong>
  325. </p>
  326. <p>On some machines, such as the VAX, this flag has no effect, because
  327. the standard calling sequence automatically handles the frame pointer
  328. and nothing is saved by pretending it doesn&rsquo;t exist. The
  329. machine-description macro <code>FRAME_POINTER_REQUIRED</code> controls
  330. whether a target machine supports this flag. See <a href="http://gcc.gnu.org/onlinedocs/gccint/Registers.html#Registers">Register
  331. Usage</a> in <cite>GNU Compiler Collection (GCC) Internals</cite>.
  332. </p>
  333. <p>The default setting (when not optimizing for
  334. size) for 32-bit GNU/Linux x86 and 32-bit Darwin x86 targets is
  335. <samp>-fomit-frame-pointer</samp>. You can configure GCC with the
  336. <samp>--enable-frame-pointer</samp> configure option to change the default.
  337. </p>
  338. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  339. </p>
  340. </dd>
  341. <dt><code>-foptimize-sibling-calls</code></dt>
  342. <dd><a name="index-foptimize_002dsibling_002dcalls"></a>
  343. <p>Optimize sibling and tail recursive calls.
  344. </p>
  345. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  346. </p>
  347. </dd>
  348. <dt><code>-foptimize-strlen</code></dt>
  349. <dd><a name="index-foptimize_002dstrlen"></a>
  350. <p>Optimize various standard C string functions (e.g. <code>strlen</code>,
  351. <code>strchr</code> or <code>strcpy</code>) and
  352. their <code>_FORTIFY_SOURCE</code> counterparts into faster alternatives.
  353. </p>
  354. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>.
  355. </p>
  356. </dd>
  357. <dt><code>-fno-inline</code></dt>
  358. <dd><a name="index-fno_002dinline"></a>
  359. <p>Do not expand any functions inline apart from those marked with
  360. the <code>always_inline</code> attribute. This is the default when not
  361. optimizing.
  362. </p>
  363. <p>Single functions can be exempted from inlining by marking them
  364. with the <code>noinline</code> attribute.
  365. </p>
  366. </dd>
  367. <dt><code>-finline-small-functions</code></dt>
  368. <dd><a name="index-finline_002dsmall_002dfunctions"></a>
  369. <p>Integrate functions into their callers when their body is smaller than expected
  370. function call code (so overall size of program gets smaller). The compiler
  371. heuristically decides which functions are simple enough to be worth integrating
  372. in this way. This inlining applies to all functions, even those not declared
  373. inline.
  374. </p>
  375. <p>Enabled at level <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  376. </p>
  377. </dd>
  378. <dt><code>-findirect-inlining</code></dt>
  379. <dd><a name="index-findirect_002dinlining"></a>
  380. <p>Inline also indirect calls that are discovered to be known at compile
  381. time thanks to previous inlining. This option has any effect only
  382. when inlining itself is turned on by the <samp>-finline-functions</samp>
  383. or <samp>-finline-small-functions</samp> options.
  384. </p>
  385. <p>Enabled at level <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  386. </p>
  387. </dd>
  388. <dt><code>-finline-functions</code></dt>
  389. <dd><a name="index-finline_002dfunctions"></a>
  390. <p>Consider all functions for inlining, even if they are not declared inline.
  391. The compiler heuristically decides which functions are worth integrating
  392. in this way.
  393. </p>
  394. <p>If all calls to a given function are integrated, and the function is
  395. declared <code>static</code>, then the function is normally not output as
  396. assembler code in its own right.
  397. </p>
  398. <p>Enabled at levels <samp>-O3</samp>, <samp>-Os</samp>. Also enabled
  399. by <samp>-fprofile-use</samp> and <samp>-fauto-profile</samp>.
  400. </p>
  401. </dd>
  402. <dt><code>-finline-functions-called-once</code></dt>
  403. <dd><a name="index-finline_002dfunctions_002dcalled_002donce"></a>
  404. <p>Consider all <code>static</code> functions called once for inlining into their
  405. caller even if they are not marked <code>inline</code>. If a call to a given
  406. function is integrated, then the function is not output as assembler code
  407. in its own right.
  408. </p>
  409. <p>Enabled at levels <samp>-O1</samp>, <samp>-O2</samp>, <samp>-O3</samp> and <samp>-Os</samp>.
  410. </p>
  411. </dd>
  412. <dt><code>-fearly-inlining</code></dt>
  413. <dd><a name="index-fearly_002dinlining"></a>
  414. <p>Inline functions marked by <code>always_inline</code> and functions whose body seems
  415. smaller than the function call overhead early before doing
  416. <samp>-fprofile-generate</samp> instrumentation and real inlining pass. Doing so
  417. makes profiling significantly cheaper and usually inlining faster on programs
  418. having large chains of nested wrapper functions.
  419. </p>
  420. <p>Enabled by default.
  421. </p>
  422. </dd>
  423. <dt><code>-fipa-sra</code></dt>
  424. <dd><a name="index-fipa_002dsra"></a>
  425. <p>Perform interprocedural scalar replacement of aggregates, removal of
  426. unused parameters and replacement of parameters passed by reference
  427. by parameters passed by value.
  428. </p>
  429. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp> and <samp>-Os</samp>.
  430. </p>
  431. </dd>
  432. <dt><code>-finline-limit=<var>n</var></code></dt>
  433. <dd><a name="index-finline_002dlimit"></a>
  434. <p>By default, GCC limits the size of functions that can be inlined. This flag
  435. allows coarse control of this limit. <var>n</var> is the size of functions that
  436. can be inlined in number of pseudo instructions.
  437. </p>
  438. <p>Inlining is actually controlled by a number of parameters, which may be
  439. specified individually by using <samp>--param <var>name</var>=<var>value</var></samp>.
  440. The <samp>-finline-limit=<var>n</var></samp> option sets some of these parameters
  441. as follows:
  442. </p>
  443. <dl compact="compact">
  444. <dt><code>max-inline-insns-single</code></dt>
  445. <dd><p>is set to <var>n</var>/2.
  446. </p></dd>
  447. <dt><code>max-inline-insns-auto</code></dt>
  448. <dd><p>is set to <var>n</var>/2.
  449. </p></dd>
  450. </dl>
  451. <p>See below for a documentation of the individual
  452. parameters controlling inlining and for the defaults of these parameters.
  453. </p>
  454. <p><em>Note:</em> there may be no value to <samp>-finline-limit</samp> that results
  455. in default behavior.
  456. </p>
  457. <p><em>Note:</em> pseudo instruction represents, in this particular context, an
  458. abstract measurement of function&rsquo;s size. In no way does it represent a count
  459. of assembly instructions and as such its exact meaning might change from one
  460. release to an another.
  461. </p>
  462. </dd>
  463. <dt><code>-fno-keep-inline-dllexport</code></dt>
  464. <dd><a name="index-fno_002dkeep_002dinline_002ddllexport"></a>
  465. <p>This is a more fine-grained version of <samp>-fkeep-inline-functions</samp>,
  466. which applies only to functions that are declared using the <code>dllexport</code>
  467. attribute or declspec. See <a href="Function-Attributes.html#Function-Attributes">Declaring Attributes of
  468. Functions</a>.
  469. </p>
  470. </dd>
  471. <dt><code>-fkeep-inline-functions</code></dt>
  472. <dd><a name="index-fkeep_002dinline_002dfunctions"></a>
  473. <p>In C, emit <code>static</code> functions that are declared <code>inline</code>
  474. into the object file, even if the function has been inlined into all
  475. of its callers. This switch does not affect functions using the
  476. <code>extern inline</code> extension in GNU C90. In C++, emit any and all
  477. inline functions into the object file.
  478. </p>
  479. </dd>
  480. <dt><code>-fkeep-static-functions</code></dt>
  481. <dd><a name="index-fkeep_002dstatic_002dfunctions"></a>
  482. <p>Emit <code>static</code> functions into the object file, even if the function
  483. is never used.
  484. </p>
  485. </dd>
  486. <dt><code>-fkeep-static-consts</code></dt>
  487. <dd><a name="index-fkeep_002dstatic_002dconsts"></a>
  488. <p>Emit variables declared <code>static const</code> when optimization isn&rsquo;t turned
  489. on, even if the variables aren&rsquo;t referenced.
  490. </p>
  491. <p>GCC enables this option by default. If you want to force the compiler to
  492. check if a variable is referenced, regardless of whether or not
  493. optimization is turned on, use the <samp>-fno-keep-static-consts</samp> option.
  494. </p>
  495. </dd>
  496. <dt><code>-fmerge-constants</code></dt>
  497. <dd><a name="index-fmerge_002dconstants"></a>
  498. <p>Attempt to merge identical constants (string constants and floating-point
  499. constants) across compilation units.
  500. </p>
  501. <p>This option is the default for optimized compilation if the assembler and
  502. linker support it. Use <samp>-fno-merge-constants</samp> to inhibit this
  503. behavior.
  504. </p>
  505. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  506. </p>
  507. </dd>
  508. <dt><code>-fmerge-all-constants</code></dt>
  509. <dd><a name="index-fmerge_002dall_002dconstants"></a>
  510. <p>Attempt to merge identical constants and identical variables.
  511. </p>
  512. <p>This option implies <samp>-fmerge-constants</samp>. In addition to
  513. <samp>-fmerge-constants</samp> this considers e.g. even constant initialized
  514. arrays or initialized constant variables with integral or floating-point
  515. types. Languages like C or C++ require each variable, including multiple
  516. instances of the same variable in recursive calls, to have distinct locations,
  517. so using this option results in non-conforming
  518. behavior.
  519. </p>
  520. </dd>
  521. <dt><code>-fmodulo-sched</code></dt>
  522. <dd><a name="index-fmodulo_002dsched"></a>
  523. <p>Perform swing modulo scheduling immediately before the first scheduling
  524. pass. This pass looks at innermost loops and reorders their
  525. instructions by overlapping different iterations.
  526. </p>
  527. </dd>
  528. <dt><code>-fmodulo-sched-allow-regmoves</code></dt>
  529. <dd><a name="index-fmodulo_002dsched_002dallow_002dregmoves"></a>
  530. <p>Perform more aggressive SMS-based modulo scheduling with register moves
  531. allowed. By setting this flag certain anti-dependences edges are
  532. deleted, which triggers the generation of reg-moves based on the
  533. life-range analysis. This option is effective only with
  534. <samp>-fmodulo-sched</samp> enabled.
  535. </p>
  536. </dd>
  537. <dt><code>-fno-branch-count-reg</code></dt>
  538. <dd><a name="index-fno_002dbranch_002dcount_002dreg"></a>
  539. <p>Avoid running a pass scanning for opportunities to use &ldquo;decrement and
  540. branch&rdquo; instructions on a count register instead of generating sequences
  541. of instructions that decrement a register, compare it against zero, and
  542. then branch based upon the result. This option is only meaningful on
  543. architectures that support such instructions, which include x86, PowerPC,
  544. IA-64 and S/390. Note that the <samp>-fno-branch-count-reg</samp> option
  545. doesn&rsquo;t remove the decrement and branch instructions from the generated
  546. instruction stream introduced by other optimization passes.
  547. </p>
  548. <p>Enabled by default at <samp>-O1</samp> and higher.
  549. </p>
  550. <p>The default is <samp>-fbranch-count-reg</samp>.
  551. </p>
  552. </dd>
  553. <dt><code>-fno-function-cse</code></dt>
  554. <dd><a name="index-fno_002dfunction_002dcse"></a>
  555. <p>Do not put function addresses in registers; make each instruction that
  556. calls a constant function contain the function&rsquo;s address explicitly.
  557. </p>
  558. <p>This option results in less efficient code, but some strange hacks
  559. that alter the assembler output may be confused by the optimizations
  560. performed when this option is not used.
  561. </p>
  562. <p>The default is <samp>-ffunction-cse</samp>
  563. </p>
  564. </dd>
  565. <dt><code>-fno-zero-initialized-in-bss</code></dt>
  566. <dd><a name="index-fno_002dzero_002dinitialized_002din_002dbss"></a>
  567. <p>If the target supports a BSS section, GCC by default puts variables that
  568. are initialized to zero into BSS. This can save space in the resulting
  569. code.
  570. </p>
  571. <p>This option turns off this behavior because some programs explicitly
  572. rely on variables going to the data section&mdash;e.g., so that the
  573. resulting executable can find the beginning of that section and/or make
  574. assumptions based on that.
  575. </p>
  576. <p>The default is <samp>-fzero-initialized-in-bss</samp>.
  577. </p>
  578. </dd>
  579. <dt><code>-fthread-jumps</code></dt>
  580. <dd><a name="index-fthread_002djumps"></a>
  581. <p>Perform optimizations that check to see if a jump branches to a
  582. location where another comparison subsumed by the first is found. If
  583. so, the first branch is redirected to either the destination of the
  584. second branch or a point immediately following it, depending on whether
  585. the condition is known to be true or false.
  586. </p>
  587. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  588. </p>
  589. </dd>
  590. <dt><code>-fsplit-wide-types</code></dt>
  591. <dd><a name="index-fsplit_002dwide_002dtypes"></a>
  592. <p>When using a type that occupies multiple registers, such as <code>long
  593. long</code> on a 32-bit system, split the registers apart and allocate them
  594. independently. This normally generates better code for those types,
  595. but may make debugging more difficult.
  596. </p>
  597. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>,
  598. <samp>-Os</samp>.
  599. </p>
  600. </dd>
  601. <dt><code>-fcse-follow-jumps</code></dt>
  602. <dd><a name="index-fcse_002dfollow_002djumps"></a>
  603. <p>In common subexpression elimination (CSE), scan through jump instructions
  604. when the target of the jump is not reached by any other path. For
  605. example, when CSE encounters an <code>if</code> statement with an
  606. <code>else</code> clause, CSE follows the jump when the condition
  607. tested is false.
  608. </p>
  609. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  610. </p>
  611. </dd>
  612. <dt><code>-fcse-skip-blocks</code></dt>
  613. <dd><a name="index-fcse_002dskip_002dblocks"></a>
  614. <p>This is similar to <samp>-fcse-follow-jumps</samp>, but causes CSE to
  615. follow jumps that conditionally skip over blocks. When CSE
  616. encounters a simple <code>if</code> statement with no else clause,
  617. <samp>-fcse-skip-blocks</samp> causes CSE to follow the jump around the
  618. body of the <code>if</code>.
  619. </p>
  620. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  621. </p>
  622. </dd>
  623. <dt><code>-frerun-cse-after-loop</code></dt>
  624. <dd><a name="index-frerun_002dcse_002dafter_002dloop"></a>
  625. <p>Re-run common subexpression elimination after loop optimizations are
  626. performed.
  627. </p>
  628. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  629. </p>
  630. </dd>
  631. <dt><code>-fgcse</code></dt>
  632. <dd><a name="index-fgcse"></a>
  633. <p>Perform a global common subexpression elimination pass.
  634. This pass also performs global constant and copy propagation.
  635. </p>
  636. <p><em>Note:</em> When compiling a program using computed gotos, a GCC
  637. extension, you may get better run-time performance if you disable
  638. the global common subexpression elimination pass by adding
  639. <samp>-fno-gcse</samp> to the command line.
  640. </p>
  641. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  642. </p>
  643. </dd>
  644. <dt><code>-fgcse-lm</code></dt>
  645. <dd><a name="index-fgcse_002dlm"></a>
  646. <p>When <samp>-fgcse-lm</samp> is enabled, global common subexpression elimination
  647. attempts to move loads that are only killed by stores into themselves. This
  648. allows a loop containing a load/store sequence to be changed to a load outside
  649. the loop, and a copy/store within the loop.
  650. </p>
  651. <p>Enabled by default when <samp>-fgcse</samp> is enabled.
  652. </p>
  653. </dd>
  654. <dt><code>-fgcse-sm</code></dt>
  655. <dd><a name="index-fgcse_002dsm"></a>
  656. <p>When <samp>-fgcse-sm</samp> is enabled, a store motion pass is run after
  657. global common subexpression elimination. This pass attempts to move
  658. stores out of loops. When used in conjunction with <samp>-fgcse-lm</samp>,
  659. loops containing a load/store sequence can be changed to a load before
  660. the loop and a store after the loop.
  661. </p>
  662. <p>Not enabled at any optimization level.
  663. </p>
  664. </dd>
  665. <dt><code>-fgcse-las</code></dt>
  666. <dd><a name="index-fgcse_002dlas"></a>
  667. <p>When <samp>-fgcse-las</samp> is enabled, the global common subexpression
  668. elimination pass eliminates redundant loads that come after stores to the
  669. same memory location (both partial and full redundancies).
  670. </p>
  671. <p>Not enabled at any optimization level.
  672. </p>
  673. </dd>
  674. <dt><code>-fgcse-after-reload</code></dt>
  675. <dd><a name="index-fgcse_002dafter_002dreload"></a>
  676. <p>When <samp>-fgcse-after-reload</samp> is enabled, a redundant load elimination
  677. pass is performed after reload. The purpose of this pass is to clean up
  678. redundant spilling.
  679. </p>
  680. </dd>
  681. <dt><code>-faggressive-loop-optimizations</code></dt>
  682. <dd><a name="index-faggressive_002dloop_002doptimizations"></a>
  683. <p>This option tells the loop optimizer to use language constraints to
  684. derive bounds for the number of iterations of a loop. This assumes that
  685. loop code does not invoke undefined behavior by for example causing signed
  686. integer overflows or out-of-bound array accesses. The bounds for the
  687. number of iterations of a loop are used to guide loop unrolling and peeling
  688. and loop exit test optimizations.
  689. This option is enabled by default.
  690. </p>
  691. </dd>
  692. <dt><code>-funconstrained-commons</code></dt>
  693. <dd><a name="index-funconstrained_002dcommons"></a>
  694. <p>This option tells the compiler that variables declared in common blocks
  695. (e.g. Fortran) may later be overridden with longer trailing arrays. This
  696. prevents certain optimizations that depend on knowing the array bounds.
  697. </p>
  698. </dd>
  699. <dt><code>-fcrossjumping</code></dt>
  700. <dd><a name="index-fcrossjumping"></a>
  701. <p>Perform cross-jumping transformation.
  702. This transformation unifies equivalent code and saves code size. The
  703. resulting code may or may not perform better than without cross-jumping.
  704. </p>
  705. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  706. </p>
  707. </dd>
  708. <dt><code>-fauto-inc-dec</code></dt>
  709. <dd><a name="index-fauto_002dinc_002ddec"></a>
  710. <p>Combine increments or decrements of addresses with memory accesses.
  711. This pass is always skipped on architectures that do not have
  712. instructions to support this. Enabled by default at <samp>-O</samp> and
  713. higher on architectures that support this.
  714. </p>
  715. </dd>
  716. <dt><code>-fdce</code></dt>
  717. <dd><a name="index-fdce"></a>
  718. <p>Perform dead code elimination (DCE) on RTL.
  719. Enabled by default at <samp>-O</samp> and higher.
  720. </p>
  721. </dd>
  722. <dt><code>-fdse</code></dt>
  723. <dd><a name="index-fdse"></a>
  724. <p>Perform dead store elimination (DSE) on RTL.
  725. Enabled by default at <samp>-O</samp> and higher.
  726. </p>
  727. </dd>
  728. <dt><code>-fif-conversion</code></dt>
  729. <dd><a name="index-fif_002dconversion"></a>
  730. <p>Attempt to transform conditional jumps into branch-less equivalents. This
  731. includes use of conditional moves, min, max, set flags and abs instructions, and
  732. some tricks doable by standard arithmetics. The use of conditional execution
  733. on chips where it is available is controlled by <samp>-fif-conversion2</samp>.
  734. </p>
  735. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  736. </p>
  737. </dd>
  738. <dt><code>-fif-conversion2</code></dt>
  739. <dd><a name="index-fif_002dconversion2"></a>
  740. <p>Use conditional execution (where available) to transform conditional jumps into
  741. branch-less equivalents.
  742. </p>
  743. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  744. </p>
  745. </dd>
  746. <dt><code>-fdeclone-ctor-dtor</code></dt>
  747. <dd><a name="index-fdeclone_002dctor_002ddtor"></a>
  748. <p>The C++ ABI requires multiple entry points for constructors and
  749. destructors: one for a base subobject, one for a complete object, and
  750. one for a virtual destructor that calls operator delete afterwards.
  751. For a hierarchy with virtual bases, the base and complete variants are
  752. clones, which means two copies of the function. With this option, the
  753. base and complete variants are changed to be thunks that call a common
  754. implementation.
  755. </p>
  756. <p>Enabled by <samp>-Os</samp>.
  757. </p>
  758. </dd>
  759. <dt><code>-fdelete-null-pointer-checks</code></dt>
  760. <dd><a name="index-fdelete_002dnull_002dpointer_002dchecks"></a>
  761. <p>Assume that programs cannot safely dereference null pointers, and that
  762. no code or data element resides at address zero.
  763. This option enables simple constant
  764. folding optimizations at all optimization levels. In addition, other
  765. optimization passes in GCC use this flag to control global dataflow
  766. analyses that eliminate useless checks for null pointers; these assume
  767. that a memory access to address zero always results in a trap, so
  768. that if a pointer is checked after it has already been dereferenced,
  769. it cannot be null.
  770. </p>
  771. <p>Note however that in some environments this assumption is not true.
  772. Use <samp>-fno-delete-null-pointer-checks</samp> to disable this optimization
  773. for programs that depend on that behavior.
  774. </p>
  775. <p>This option is enabled by default on most targets. On Nios II ELF, it
  776. defaults to off. On AVR and CR16, this option is completely disabled.
  777. </p>
  778. <p>Passes that use the dataflow information
  779. are enabled independently at different optimization levels.
  780. </p>
  781. </dd>
  782. <dt><code>-fdevirtualize</code></dt>
  783. <dd><a name="index-fdevirtualize"></a>
  784. <p>Attempt to convert calls to virtual functions to direct calls. This
  785. is done both within a procedure and interprocedurally as part of
  786. indirect inlining (<samp>-findirect-inlining</samp>) and interprocedural constant
  787. propagation (<samp>-fipa-cp</samp>).
  788. Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  789. </p>
  790. </dd>
  791. <dt><code>-fdevirtualize-speculatively</code></dt>
  792. <dd><a name="index-fdevirtualize_002dspeculatively"></a>
  793. <p>Attempt to convert calls to virtual functions to speculative direct calls.
  794. Based on the analysis of the type inheritance graph, determine for a given call
  795. the set of likely targets. If the set is small, preferably of size 1, change
  796. the call into a conditional deciding between direct and indirect calls. The
  797. speculative calls enable more optimizations, such as inlining. When they seem
  798. useless after further optimization, they are converted back into original form.
  799. </p>
  800. </dd>
  801. <dt><code>-fdevirtualize-at-ltrans</code></dt>
  802. <dd><a name="index-fdevirtualize_002dat_002dltrans"></a>
  803. <p>Stream extra information needed for aggressive devirtualization when running
  804. the link-time optimizer in local transformation mode.
  805. This option enables more devirtualization but
  806. significantly increases the size of streamed data. For this reason it is
  807. disabled by default.
  808. </p>
  809. </dd>
  810. <dt><code>-fexpensive-optimizations</code></dt>
  811. <dd><a name="index-fexpensive_002doptimizations"></a>
  812. <p>Perform a number of minor optimizations that are relatively expensive.
  813. </p>
  814. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  815. </p>
  816. </dd>
  817. <dt><code>-free</code></dt>
  818. <dd><a name="index-free"></a>
  819. <p>Attempt to remove redundant extension instructions. This is especially
  820. helpful for the x86-64 architecture, which implicitly zero-extends in 64-bit
  821. registers after writing to their lower 32-bit half.
  822. </p>
  823. <p>Enabled for Alpha, AArch64 and x86 at levels <samp>-O2</samp>,
  824. <samp>-O3</samp>, <samp>-Os</samp>.
  825. </p>
  826. </dd>
  827. <dt><code>-fno-lifetime-dse</code></dt>
  828. <dd><a name="index-fno_002dlifetime_002ddse"></a>
  829. <p>In C++ the value of an object is only affected by changes within its
  830. lifetime: when the constructor begins, the object has an indeterminate
  831. value, and any changes during the lifetime of the object are dead when
  832. the object is destroyed. Normally dead store elimination will take
  833. advantage of this; if your code relies on the value of the object
  834. storage persisting beyond the lifetime of the object, you can use this
  835. flag to disable this optimization. To preserve stores before the
  836. constructor starts (e.g. because your operator new clears the object
  837. storage) but still treat the object as dead after the destructor you,
  838. can use <samp>-flifetime-dse=1</samp>. The default behavior can be
  839. explicitly selected with <samp>-flifetime-dse=2</samp>.
  840. <samp>-flifetime-dse=0</samp> is equivalent to <samp>-fno-lifetime-dse</samp>.
  841. </p>
  842. </dd>
  843. <dt><code>-flive-range-shrinkage</code></dt>
  844. <dd><a name="index-flive_002drange_002dshrinkage"></a>
  845. <p>Attempt to decrease register pressure through register live range
  846. shrinkage. This is helpful for fast processors with small or moderate
  847. size register sets.
  848. </p>
  849. </dd>
  850. <dt><code>-fira-algorithm=<var>algorithm</var></code></dt>
  851. <dd><a name="index-fira_002dalgorithm"></a>
  852. <p>Use the specified coloring algorithm for the integrated register
  853. allocator. The <var>algorithm</var> argument can be &lsquo;<samp>priority</samp>&rsquo;, which
  854. specifies Chow&rsquo;s priority coloring, or &lsquo;<samp>CB</samp>&rsquo;, which specifies
  855. Chaitin-Briggs coloring. Chaitin-Briggs coloring is not implemented
  856. for all architectures, but for those targets that do support it, it is
  857. the default because it generates better code.
  858. </p>
  859. </dd>
  860. <dt><code>-fira-region=<var>region</var></code></dt>
  861. <dd><a name="index-fira_002dregion"></a>
  862. <p>Use specified regions for the integrated register allocator. The
  863. <var>region</var> argument should be one of the following:
  864. </p>
  865. <dl compact="compact">
  866. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  867. <dd><p>Use all loops as register allocation regions.
  868. This can give the best results for machines with a small and/or
  869. irregular register set.
  870. </p>
  871. </dd>
  872. <dt>&lsquo;<samp>mixed</samp>&rsquo;</dt>
  873. <dd><p>Use all loops except for loops with small register pressure
  874. as the regions. This value usually gives
  875. the best results in most cases and for most architectures,
  876. and is enabled by default when compiling with optimization for speed
  877. (<samp>-O</samp>, <samp>-O2</samp>, &hellip;).
  878. </p>
  879. </dd>
  880. <dt>&lsquo;<samp>one</samp>&rsquo;</dt>
  881. <dd><p>Use all functions as a single region.
  882. This typically results in the smallest code size, and is enabled by default for
  883. <samp>-Os</samp> or <samp>-O0</samp>.
  884. </p>
  885. </dd>
  886. </dl>
  887. </dd>
  888. <dt><code>-fira-hoist-pressure</code></dt>
  889. <dd><a name="index-fira_002dhoist_002dpressure"></a>
  890. <p>Use IRA to evaluate register pressure in the code hoisting pass for
  891. decisions to hoist expressions. This option usually results in smaller
  892. code, but it can slow the compiler down.
  893. </p>
  894. <p>This option is enabled at level <samp>-Os</samp> for all targets.
  895. </p>
  896. </dd>
  897. <dt><code>-fira-loop-pressure</code></dt>
  898. <dd><a name="index-fira_002dloop_002dpressure"></a>
  899. <p>Use IRA to evaluate register pressure in loops for decisions to move
  900. loop invariants. This option usually results in generation
  901. of faster and smaller code on machines with large register files (&gt;= 32
  902. registers), but it can slow the compiler down.
  903. </p>
  904. <p>This option is enabled at level <samp>-O3</samp> for some targets.
  905. </p>
  906. </dd>
  907. <dt><code>-fno-ira-share-save-slots</code></dt>
  908. <dd><a name="index-fno_002dira_002dshare_002dsave_002dslots"></a>
  909. <p>Disable sharing of stack slots used for saving call-used hard
  910. registers living through a call. Each hard register gets a
  911. separate stack slot, and as a result function stack frames are
  912. larger.
  913. </p>
  914. </dd>
  915. <dt><code>-fno-ira-share-spill-slots</code></dt>
  916. <dd><a name="index-fno_002dira_002dshare_002dspill_002dslots"></a>
  917. <p>Disable sharing of stack slots allocated for pseudo-registers. Each
  918. pseudo-register that does not get a hard register gets a separate
  919. stack slot, and as a result function stack frames are larger.
  920. </p>
  921. </dd>
  922. <dt><code>-flra-remat</code></dt>
  923. <dd><a name="index-flra_002dremat"></a>
  924. <p>Enable CFG-sensitive rematerialization in LRA. Instead of loading
  925. values of spilled pseudos, LRA tries to rematerialize (recalculate)
  926. values if it is profitable.
  927. </p>
  928. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  929. </p>
  930. </dd>
  931. <dt><code>-fdelayed-branch</code></dt>
  932. <dd><a name="index-fdelayed_002dbranch"></a>
  933. <p>If supported for the target machine, attempt to reorder instructions
  934. to exploit instruction slots available after delayed branch
  935. instructions.
  936. </p>
  937. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  938. </p>
  939. </dd>
  940. <dt><code>-fschedule-insns</code></dt>
  941. <dd><a name="index-fschedule_002dinsns"></a>
  942. <p>If supported for the target machine, attempt to reorder instructions to
  943. eliminate execution stalls due to required data being unavailable. This
  944. helps machines that have slow floating point or memory load instructions
  945. by allowing other instructions to be issued until the result of the load
  946. or floating-point instruction is required.
  947. </p>
  948. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>.
  949. </p>
  950. </dd>
  951. <dt><code>-fschedule-insns2</code></dt>
  952. <dd><a name="index-fschedule_002dinsns2"></a>
  953. <p>Similar to <samp>-fschedule-insns</samp>, but requests an additional pass of
  954. instruction scheduling after register allocation has been done. This is
  955. especially useful on machines with a relatively small number of
  956. registers and where memory load instructions take more than one cycle.
  957. </p>
  958. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  959. </p>
  960. </dd>
  961. <dt><code>-fno-sched-interblock</code></dt>
  962. <dd><a name="index-fno_002dsched_002dinterblock"></a>
  963. <p>Don&rsquo;t schedule instructions across basic blocks. This is normally
  964. enabled by default when scheduling before register allocation, i.e.
  965. with <samp>-fschedule-insns</samp> or at <samp>-O2</samp> or higher.
  966. </p>
  967. </dd>
  968. <dt><code>-fno-sched-spec</code></dt>
  969. <dd><a name="index-fno_002dsched_002dspec"></a>
  970. <p>Don&rsquo;t allow speculative motion of non-load instructions. This is normally
  971. enabled by default when scheduling before register allocation, i.e.
  972. with <samp>-fschedule-insns</samp> or at <samp>-O2</samp> or higher.
  973. </p>
  974. </dd>
  975. <dt><code>-fsched-pressure</code></dt>
  976. <dd><a name="index-fsched_002dpressure"></a>
  977. <p>Enable register pressure sensitive insn scheduling before register
  978. allocation. This only makes sense when scheduling before register
  979. allocation is enabled, i.e. with <samp>-fschedule-insns</samp> or at
  980. <samp>-O2</samp> or higher. Usage of this option can improve the
  981. generated code and decrease its size by preventing register pressure
  982. increase above the number of available hard registers and subsequent
  983. spills in register allocation.
  984. </p>
  985. </dd>
  986. <dt><code>-fsched-spec-load</code></dt>
  987. <dd><a name="index-fsched_002dspec_002dload"></a>
  988. <p>Allow speculative motion of some load instructions. This only makes
  989. sense when scheduling before register allocation, i.e. with
  990. <samp>-fschedule-insns</samp> or at <samp>-O2</samp> or higher.
  991. </p>
  992. </dd>
  993. <dt><code>-fsched-spec-load-dangerous</code></dt>
  994. <dd><a name="index-fsched_002dspec_002dload_002ddangerous"></a>
  995. <p>Allow speculative motion of more load instructions. This only makes
  996. sense when scheduling before register allocation, i.e. with
  997. <samp>-fschedule-insns</samp> or at <samp>-O2</samp> or higher.
  998. </p>
  999. </dd>
  1000. <dt><code>-fsched-stalled-insns</code></dt>
  1001. <dt><code>-fsched-stalled-insns=<var>n</var></code></dt>
  1002. <dd><a name="index-fsched_002dstalled_002dinsns"></a>
  1003. <p>Define how many insns (if any) can be moved prematurely from the queue
  1004. of stalled insns into the ready list during the second scheduling pass.
  1005. <samp>-fno-sched-stalled-insns</samp> means that no insns are moved
  1006. prematurely, <samp>-fsched-stalled-insns=0</samp> means there is no limit
  1007. on how many queued insns can be moved prematurely.
  1008. <samp>-fsched-stalled-insns</samp> without a value is equivalent to
  1009. <samp>-fsched-stalled-insns=1</samp>.
  1010. </p>
  1011. </dd>
  1012. <dt><code>-fsched-stalled-insns-dep</code></dt>
  1013. <dt><code>-fsched-stalled-insns-dep=<var>n</var></code></dt>
  1014. <dd><a name="index-fsched_002dstalled_002dinsns_002ddep"></a>
  1015. <p>Define how many insn groups (cycles) are examined for a dependency
  1016. on a stalled insn that is a candidate for premature removal from the queue
  1017. of stalled insns. This has an effect only during the second scheduling pass,
  1018. and only if <samp>-fsched-stalled-insns</samp> is used.
  1019. <samp>-fno-sched-stalled-insns-dep</samp> is equivalent to
  1020. <samp>-fsched-stalled-insns-dep=0</samp>.
  1021. <samp>-fsched-stalled-insns-dep</samp> without a value is equivalent to
  1022. <samp>-fsched-stalled-insns-dep=1</samp>.
  1023. </p>
  1024. </dd>
  1025. <dt><code>-fsched2-use-superblocks</code></dt>
  1026. <dd><a name="index-fsched2_002duse_002dsuperblocks"></a>
  1027. <p>When scheduling after register allocation, use superblock scheduling.
  1028. This allows motion across basic block boundaries,
  1029. resulting in faster schedules. This option is experimental, as not all machine
  1030. descriptions used by GCC model the CPU closely enough to avoid unreliable
  1031. results from the algorithm.
  1032. </p>
  1033. <p>This only makes sense when scheduling after register allocation, i.e. with
  1034. <samp>-fschedule-insns2</samp> or at <samp>-O2</samp> or higher.
  1035. </p>
  1036. </dd>
  1037. <dt><code>-fsched-group-heuristic</code></dt>
  1038. <dd><a name="index-fsched_002dgroup_002dheuristic"></a>
  1039. <p>Enable the group heuristic in the scheduler. This heuristic favors
  1040. the instruction that belongs to a schedule group. This is enabled
  1041. by default when scheduling is enabled, i.e. with <samp>-fschedule-insns</samp>
  1042. or <samp>-fschedule-insns2</samp> or at <samp>-O2</samp> or higher.
  1043. </p>
  1044. </dd>
  1045. <dt><code>-fsched-critical-path-heuristic</code></dt>
  1046. <dd><a name="index-fsched_002dcritical_002dpath_002dheuristic"></a>
  1047. <p>Enable the critical-path heuristic in the scheduler. This heuristic favors
  1048. instructions on the critical path. This is enabled by default when
  1049. scheduling is enabled, i.e. with <samp>-fschedule-insns</samp>
  1050. or <samp>-fschedule-insns2</samp> or at <samp>-O2</samp> or higher.
  1051. </p>
  1052. </dd>
  1053. <dt><code>-fsched-spec-insn-heuristic</code></dt>
  1054. <dd><a name="index-fsched_002dspec_002dinsn_002dheuristic"></a>
  1055. <p>Enable the speculative instruction heuristic in the scheduler. This
  1056. heuristic favors speculative instructions with greater dependency weakness.
  1057. This is enabled by default when scheduling is enabled, i.e.
  1058. with <samp>-fschedule-insns</samp> or <samp>-fschedule-insns2</samp>
  1059. or at <samp>-O2</samp> or higher.
  1060. </p>
  1061. </dd>
  1062. <dt><code>-fsched-rank-heuristic</code></dt>
  1063. <dd><a name="index-fsched_002drank_002dheuristic"></a>
  1064. <p>Enable the rank heuristic in the scheduler. This heuristic favors
  1065. the instruction belonging to a basic block with greater size or frequency.
  1066. This is enabled by default when scheduling is enabled, i.e.
  1067. with <samp>-fschedule-insns</samp> or <samp>-fschedule-insns2</samp> or
  1068. at <samp>-O2</samp> or higher.
  1069. </p>
  1070. </dd>
  1071. <dt><code>-fsched-last-insn-heuristic</code></dt>
  1072. <dd><a name="index-fsched_002dlast_002dinsn_002dheuristic"></a>
  1073. <p>Enable the last-instruction heuristic in the scheduler. This heuristic
  1074. favors the instruction that is less dependent on the last instruction
  1075. scheduled. This is enabled by default when scheduling is enabled,
  1076. i.e. with <samp>-fschedule-insns</samp> or <samp>-fschedule-insns2</samp> or
  1077. at <samp>-O2</samp> or higher.
  1078. </p>
  1079. </dd>
  1080. <dt><code>-fsched-dep-count-heuristic</code></dt>
  1081. <dd><a name="index-fsched_002ddep_002dcount_002dheuristic"></a>
  1082. <p>Enable the dependent-count heuristic in the scheduler. This heuristic
  1083. favors the instruction that has more instructions depending on it.
  1084. This is enabled by default when scheduling is enabled, i.e.
  1085. with <samp>-fschedule-insns</samp> or <samp>-fschedule-insns2</samp> or
  1086. at <samp>-O2</samp> or higher.
  1087. </p>
  1088. </dd>
  1089. <dt><code>-freschedule-modulo-scheduled-loops</code></dt>
  1090. <dd><a name="index-freschedule_002dmodulo_002dscheduled_002dloops"></a>
  1091. <p>Modulo scheduling is performed before traditional scheduling. If a loop
  1092. is modulo scheduled, later scheduling passes may change its schedule.
  1093. Use this option to control that behavior.
  1094. </p>
  1095. </dd>
  1096. <dt><code>-fselective-scheduling</code></dt>
  1097. <dd><a name="index-fselective_002dscheduling"></a>
  1098. <p>Schedule instructions using selective scheduling algorithm. Selective
  1099. scheduling runs instead of the first scheduler pass.
  1100. </p>
  1101. </dd>
  1102. <dt><code>-fselective-scheduling2</code></dt>
  1103. <dd><a name="index-fselective_002dscheduling2"></a>
  1104. <p>Schedule instructions using selective scheduling algorithm. Selective
  1105. scheduling runs instead of the second scheduler pass.
  1106. </p>
  1107. </dd>
  1108. <dt><code>-fsel-sched-pipelining</code></dt>
  1109. <dd><a name="index-fsel_002dsched_002dpipelining"></a>
  1110. <p>Enable software pipelining of innermost loops during selective scheduling.
  1111. This option has no effect unless one of <samp>-fselective-scheduling</samp> or
  1112. <samp>-fselective-scheduling2</samp> is turned on.
  1113. </p>
  1114. </dd>
  1115. <dt><code>-fsel-sched-pipelining-outer-loops</code></dt>
  1116. <dd><a name="index-fsel_002dsched_002dpipelining_002douter_002dloops"></a>
  1117. <p>When pipelining loops during selective scheduling, also pipeline outer loops.
  1118. This option has no effect unless <samp>-fsel-sched-pipelining</samp> is turned on.
  1119. </p>
  1120. </dd>
  1121. <dt><code>-fsemantic-interposition</code></dt>
  1122. <dd><a name="index-fsemantic_002dinterposition"></a>
  1123. <p>Some object formats, like ELF, allow interposing of symbols by the
  1124. dynamic linker.
  1125. This means that for symbols exported from the DSO, the compiler cannot perform
  1126. interprocedural propagation, inlining and other optimizations in anticipation
  1127. that the function or variable in question may change. While this feature is
  1128. useful, for example, to rewrite memory allocation functions by a debugging
  1129. implementation, it is expensive in the terms of code quality.
  1130. With <samp>-fno-semantic-interposition</samp> the compiler assumes that
  1131. if interposition happens for functions the overwriting function will have
  1132. precisely the same semantics (and side effects).
  1133. Similarly if interposition happens
  1134. for variables, the constructor of the variable will be the same. The flag
  1135. has no effect for functions explicitly declared inline
  1136. (where it is never allowed for interposition to change semantics)
  1137. and for symbols explicitly declared weak.
  1138. </p>
  1139. </dd>
  1140. <dt><code>-fshrink-wrap</code></dt>
  1141. <dd><a name="index-fshrink_002dwrap"></a>
  1142. <p>Emit function prologues only before parts of the function that need it,
  1143. rather than at the top of the function. This flag is enabled by default at
  1144. <samp>-O</samp> and higher.
  1145. </p>
  1146. </dd>
  1147. <dt><code>-fshrink-wrap-separate</code></dt>
  1148. <dd><a name="index-fshrink_002dwrap_002dseparate"></a>
  1149. <p>Shrink-wrap separate parts of the prologue and epilogue separately, so that
  1150. those parts are only executed when needed.
  1151. This option is on by default, but has no effect unless <samp>-fshrink-wrap</samp>
  1152. is also turned on and the target supports this.
  1153. </p>
  1154. </dd>
  1155. <dt><code>-fcaller-saves</code></dt>
  1156. <dd><a name="index-fcaller_002dsaves"></a>
  1157. <p>Enable allocation of values to registers that are clobbered by
  1158. function calls, by emitting extra instructions to save and restore the
  1159. registers around such calls. Such allocation is done only when it
  1160. seems to result in better code.
  1161. </p>
  1162. <p>This option is always enabled by default on certain machines, usually
  1163. those which have no call-preserved registers to use instead.
  1164. </p>
  1165. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  1166. </p>
  1167. </dd>
  1168. <dt><code>-fcombine-stack-adjustments</code></dt>
  1169. <dd><a name="index-fcombine_002dstack_002dadjustments"></a>
  1170. <p>Tracks stack adjustments (pushes and pops) and stack memory references
  1171. and then tries to find ways to combine them.
  1172. </p>
  1173. <p>Enabled by default at <samp>-O1</samp> and higher.
  1174. </p>
  1175. </dd>
  1176. <dt><code>-fipa-ra</code></dt>
  1177. <dd><a name="index-fipa_002dra"></a>
  1178. <p>Use caller save registers for allocation if those registers are not used by
  1179. any called function. In that case it is not necessary to save and restore
  1180. them around calls. This is only possible if called functions are part of
  1181. same compilation unit as current function and they are compiled before it.
  1182. </p>
  1183. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>, however the option
  1184. is disabled if generated code will be instrumented for profiling
  1185. (<samp>-p</samp>, or <samp>-pg</samp>) or if callee&rsquo;s register usage cannot be known
  1186. exactly (this happens on targets that do not expose prologues
  1187. and epilogues in RTL).
  1188. </p>
  1189. </dd>
  1190. <dt><code>-fconserve-stack</code></dt>
  1191. <dd><a name="index-fconserve_002dstack"></a>
  1192. <p>Attempt to minimize stack usage. The compiler attempts to use less
  1193. stack space, even if that makes the program slower. This option
  1194. implies setting the <samp>large-stack-frame</samp> parameter to 100
  1195. and the <samp>large-stack-frame-growth</samp> parameter to 400.
  1196. </p>
  1197. </dd>
  1198. <dt><code>-ftree-reassoc</code></dt>
  1199. <dd><a name="index-ftree_002dreassoc"></a>
  1200. <p>Perform reassociation on trees. This flag is enabled by default
  1201. at <samp>-O</samp> and higher.
  1202. </p>
  1203. </dd>
  1204. <dt><code>-fcode-hoisting</code></dt>
  1205. <dd><a name="index-fcode_002dhoisting"></a>
  1206. <p>Perform code hoisting. Code hoisting tries to move the
  1207. evaluation of expressions executed on all paths to the function exit
  1208. as early as possible. This is especially useful as a code size
  1209. optimization, but it often helps for code speed as well.
  1210. This flag is enabled by default at <samp>-O2</samp> and higher.
  1211. </p>
  1212. </dd>
  1213. <dt><code>-ftree-pre</code></dt>
  1214. <dd><a name="index-ftree_002dpre"></a>
  1215. <p>Perform partial redundancy elimination (PRE) on trees. This flag is
  1216. enabled by default at <samp>-O2</samp> and <samp>-O3</samp>.
  1217. </p>
  1218. </dd>
  1219. <dt><code>-ftree-partial-pre</code></dt>
  1220. <dd><a name="index-ftree_002dpartial_002dpre"></a>
  1221. <p>Make partial redundancy elimination (PRE) more aggressive. This flag is
  1222. enabled by default at <samp>-O3</samp>.
  1223. </p>
  1224. </dd>
  1225. <dt><code>-ftree-forwprop</code></dt>
  1226. <dd><a name="index-ftree_002dforwprop"></a>
  1227. <p>Perform forward propagation on trees. This flag is enabled by default
  1228. at <samp>-O</samp> and higher.
  1229. </p>
  1230. </dd>
  1231. <dt><code>-ftree-fre</code></dt>
  1232. <dd><a name="index-ftree_002dfre"></a>
  1233. <p>Perform full redundancy elimination (FRE) on trees. The difference
  1234. between FRE and PRE is that FRE only considers expressions
  1235. that are computed on all paths leading to the redundant computation.
  1236. This analysis is faster than PRE, though it exposes fewer redundancies.
  1237. This flag is enabled by default at <samp>-O</samp> and higher.
  1238. </p>
  1239. </dd>
  1240. <dt><code>-ftree-phiprop</code></dt>
  1241. <dd><a name="index-ftree_002dphiprop"></a>
  1242. <p>Perform hoisting of loads from conditional pointers on trees. This
  1243. pass is enabled by default at <samp>-O</samp> and higher.
  1244. </p>
  1245. </dd>
  1246. <dt><code>-fhoist-adjacent-loads</code></dt>
  1247. <dd><a name="index-fhoist_002dadjacent_002dloads"></a>
  1248. <p>Speculatively hoist loads from both branches of an if-then-else if the
  1249. loads are from adjacent locations in the same structure and the target
  1250. architecture has a conditional move instruction. This flag is enabled
  1251. by default at <samp>-O2</samp> and higher.
  1252. </p>
  1253. </dd>
  1254. <dt><code>-ftree-copy-prop</code></dt>
  1255. <dd><a name="index-ftree_002dcopy_002dprop"></a>
  1256. <p>Perform copy propagation on trees. This pass eliminates unnecessary
  1257. copy operations. This flag is enabled by default at <samp>-O</samp> and
  1258. higher.
  1259. </p>
  1260. </dd>
  1261. <dt><code>-fipa-pure-const</code></dt>
  1262. <dd><a name="index-fipa_002dpure_002dconst"></a>
  1263. <p>Discover which functions are pure or constant.
  1264. Enabled by default at <samp>-O</samp> and higher.
  1265. </p>
  1266. </dd>
  1267. <dt><code>-fipa-reference</code></dt>
  1268. <dd><a name="index-fipa_002dreference"></a>
  1269. <p>Discover which static variables do not escape the
  1270. compilation unit.
  1271. Enabled by default at <samp>-O</samp> and higher.
  1272. </p>
  1273. </dd>
  1274. <dt><code>-fipa-pta</code></dt>
  1275. <dd><a name="index-fipa_002dpta"></a>
  1276. <p>Perform interprocedural pointer analysis and interprocedural modification
  1277. and reference analysis. This option can cause excessive memory and
  1278. compile-time usage on large compilation units. It is not enabled by
  1279. default at any optimization level.
  1280. </p>
  1281. </dd>
  1282. <dt><code>-fipa-profile</code></dt>
  1283. <dd><a name="index-fipa_002dprofile"></a>
  1284. <p>Perform interprocedural profile propagation. The functions called only from
  1285. cold functions are marked as cold. Also functions executed once (such as
  1286. <code>cold</code>, <code>noreturn</code>, static constructors or destructors) are identified. Cold
  1287. functions and loop less parts of functions executed once are then optimized for
  1288. size.
  1289. Enabled by default at <samp>-O</samp> and higher.
  1290. </p>
  1291. </dd>
  1292. <dt><code>-fipa-cp</code></dt>
  1293. <dd><a name="index-fipa_002dcp"></a>
  1294. <p>Perform interprocedural constant propagation.
  1295. This optimization analyzes the program to determine when values passed
  1296. to functions are constants and then optimizes accordingly.
  1297. This optimization can substantially increase performance
  1298. if the application has constants passed to functions.
  1299. This flag is enabled by default at <samp>-O2</samp>, <samp>-Os</samp> and <samp>-O3</samp>.
  1300. </p>
  1301. </dd>
  1302. <dt><code>-fipa-cp-clone</code></dt>
  1303. <dd><a name="index-fipa_002dcp_002dclone"></a>
  1304. <p>Perform function cloning to make interprocedural constant propagation stronger.
  1305. When enabled, interprocedural constant propagation performs function cloning
  1306. when externally visible function can be called with constant arguments.
  1307. Because this optimization can create multiple copies of functions,
  1308. it may significantly increase code size
  1309. (see <samp>--param ipcp-unit-growth=<var>value</var></samp>).
  1310. This flag is enabled by default at <samp>-O3</samp>.
  1311. </p>
  1312. </dd>
  1313. <dt><code>-fipa-bit-cp</code></dt>
  1314. <dd><a name="index-_002dfipa_002dbit_002dcp"></a>
  1315. <p>When enabled, perform interprocedural bitwise constant
  1316. propagation. This flag is enabled by default at <samp>-O2</samp>. It
  1317. requires that <samp>-fipa-cp</samp> is enabled.
  1318. </p>
  1319. </dd>
  1320. <dt><code>-fipa-vrp</code></dt>
  1321. <dd><a name="index-_002dfipa_002dvrp"></a>
  1322. <p>When enabled, perform interprocedural propagation of value
  1323. ranges. This flag is enabled by default at <samp>-O2</samp>. It requires
  1324. that <samp>-fipa-cp</samp> is enabled.
  1325. </p>
  1326. </dd>
  1327. <dt><code>-fipa-icf</code></dt>
  1328. <dd><a name="index-fipa_002dicf"></a>
  1329. <p>Perform Identical Code Folding for functions and read-only variables.
  1330. The optimization reduces code size and may disturb unwind stacks by replacing
  1331. a function by equivalent one with a different name. The optimization works
  1332. more effectively with link-time optimization enabled.
  1333. </p>
  1334. <p>Nevertheless the behavior is similar to Gold Linker ICF optimization, GCC ICF
  1335. works on different levels and thus the optimizations are not same - there are
  1336. equivalences that are found only by GCC and equivalences found only by Gold.
  1337. </p>
  1338. <p>This flag is enabled by default at <samp>-O2</samp> and <samp>-Os</samp>.
  1339. </p>
  1340. </dd>
  1341. <dt><code>-fisolate-erroneous-paths-dereference</code></dt>
  1342. <dd><a name="index-fisolate_002derroneous_002dpaths_002ddereference"></a>
  1343. <p>Detect paths that trigger erroneous or undefined behavior due to
  1344. dereferencing a null pointer. Isolate those paths from the main control
  1345. flow and turn the statement with erroneous or undefined behavior into a trap.
  1346. This flag is enabled by default at <samp>-O2</samp> and higher and depends on
  1347. <samp>-fdelete-null-pointer-checks</samp> also being enabled.
  1348. </p>
  1349. </dd>
  1350. <dt><code>-fisolate-erroneous-paths-attribute</code></dt>
  1351. <dd><a name="index-fisolate_002derroneous_002dpaths_002dattribute"></a>
  1352. <p>Detect paths that trigger erroneous or undefined behavior due to a null value
  1353. being used in a way forbidden by a <code>returns_nonnull</code> or <code>nonnull</code>
  1354. attribute. Isolate those paths from the main control flow and turn the
  1355. statement with erroneous or undefined behavior into a trap. This is not
  1356. currently enabled, but may be enabled by <samp>-O2</samp> in the future.
  1357. </p>
  1358. </dd>
  1359. <dt><code>-ftree-sink</code></dt>
  1360. <dd><a name="index-ftree_002dsink"></a>
  1361. <p>Perform forward store motion on trees. This flag is
  1362. enabled by default at <samp>-O</samp> and higher.
  1363. </p>
  1364. </dd>
  1365. <dt><code>-ftree-bit-ccp</code></dt>
  1366. <dd><a name="index-ftree_002dbit_002dccp"></a>
  1367. <p>Perform sparse conditional bit constant propagation on trees and propagate
  1368. pointer alignment information.
  1369. This pass only operates on local scalar variables and is enabled by default
  1370. at <samp>-O</samp> and higher. It requires that <samp>-ftree-ccp</samp> is enabled.
  1371. </p>
  1372. </dd>
  1373. <dt><code>-ftree-ccp</code></dt>
  1374. <dd><a name="index-ftree_002dccp"></a>
  1375. <p>Perform sparse conditional constant propagation (CCP) on trees. This
  1376. pass only operates on local scalar variables and is enabled by default
  1377. at <samp>-O</samp> and higher.
  1378. </p>
  1379. </dd>
  1380. <dt><code>-fssa-backprop</code></dt>
  1381. <dd><a name="index-fssa_002dbackprop"></a>
  1382. <p>Propagate information about uses of a value up the definition chain
  1383. in order to simplify the definitions. For example, this pass strips
  1384. sign operations if the sign of a value never matters. The flag is
  1385. enabled by default at <samp>-O</samp> and higher.
  1386. </p>
  1387. </dd>
  1388. <dt><code>-fssa-phiopt</code></dt>
  1389. <dd><a name="index-fssa_002dphiopt"></a>
  1390. <p>Perform pattern matching on SSA PHI nodes to optimize conditional
  1391. code. This pass is enabled by default at <samp>-O</samp> and higher.
  1392. </p>
  1393. </dd>
  1394. <dt><code>-ftree-switch-conversion</code></dt>
  1395. <dd><a name="index-ftree_002dswitch_002dconversion"></a>
  1396. <p>Perform conversion of simple initializations in a switch to
  1397. initializations from a scalar array. This flag is enabled by default
  1398. at <samp>-O2</samp> and higher.
  1399. </p>
  1400. </dd>
  1401. <dt><code>-ftree-tail-merge</code></dt>
  1402. <dd><a name="index-ftree_002dtail_002dmerge"></a>
  1403. <p>Look for identical code sequences. When found, replace one with a jump to the
  1404. other. This optimization is known as tail merging or cross jumping. This flag
  1405. is enabled by default at <samp>-O2</samp> and higher. The compilation time
  1406. in this pass can
  1407. be limited using <samp>max-tail-merge-comparisons</samp> parameter and
  1408. <samp>max-tail-merge-iterations</samp> parameter.
  1409. </p>
  1410. </dd>
  1411. <dt><code>-ftree-dce</code></dt>
  1412. <dd><a name="index-ftree_002ddce"></a>
  1413. <p>Perform dead code elimination (DCE) on trees. This flag is enabled by
  1414. default at <samp>-O</samp> and higher.
  1415. </p>
  1416. </dd>
  1417. <dt><code>-ftree-builtin-call-dce</code></dt>
  1418. <dd><a name="index-ftree_002dbuiltin_002dcall_002ddce"></a>
  1419. <p>Perform conditional dead code elimination (DCE) for calls to built-in functions
  1420. that may set <code>errno</code> but are otherwise side-effect free. This flag is
  1421. enabled by default at <samp>-O2</samp> and higher if <samp>-Os</samp> is not also
  1422. specified.
  1423. </p>
  1424. </dd>
  1425. <dt><code>-ftree-dominator-opts</code></dt>
  1426. <dd><a name="index-ftree_002ddominator_002dopts"></a>
  1427. <p>Perform a variety of simple scalar cleanups (constant/copy
  1428. propagation, redundancy elimination, range propagation and expression
  1429. simplification) based on a dominator tree traversal. This also
  1430. performs jump threading (to reduce jumps to jumps). This flag is
  1431. enabled by default at <samp>-O</samp> and higher.
  1432. </p>
  1433. </dd>
  1434. <dt><code>-ftree-dse</code></dt>
  1435. <dd><a name="index-ftree_002ddse"></a>
  1436. <p>Perform dead store elimination (DSE) on trees. A dead store is a store into
  1437. a memory location that is later overwritten by another store without
  1438. any intervening loads. In this case the earlier store can be deleted. This
  1439. flag is enabled by default at <samp>-O</samp> and higher.
  1440. </p>
  1441. </dd>
  1442. <dt><code>-ftree-ch</code></dt>
  1443. <dd><a name="index-ftree_002dch"></a>
  1444. <p>Perform loop header copying on trees. This is beneficial since it increases
  1445. effectiveness of code motion optimizations. It also saves one jump. This flag
  1446. is enabled by default at <samp>-O</samp> and higher. It is not enabled
  1447. for <samp>-Os</samp>, since it usually increases code size.
  1448. </p>
  1449. </dd>
  1450. <dt><code>-ftree-loop-optimize</code></dt>
  1451. <dd><a name="index-ftree_002dloop_002doptimize"></a>
  1452. <p>Perform loop optimizations on trees. This flag is enabled by default
  1453. at <samp>-O</samp> and higher.
  1454. </p>
  1455. </dd>
  1456. <dt><code>-ftree-loop-linear</code></dt>
  1457. <dt><code>-floop-interchange</code></dt>
  1458. <dt><code>-floop-strip-mine</code></dt>
  1459. <dt><code>-floop-block</code></dt>
  1460. <dt><code>-floop-unroll-and-jam</code></dt>
  1461. <dd><a name="index-ftree_002dloop_002dlinear"></a>
  1462. <a name="index-floop_002dinterchange"></a>
  1463. <a name="index-floop_002dstrip_002dmine"></a>
  1464. <a name="index-floop_002dblock"></a>
  1465. <a name="index-floop_002dunroll_002dand_002djam"></a>
  1466. <p>Perform loop nest optimizations. Same as
  1467. <samp>-floop-nest-optimize</samp>. To use this code transformation, GCC has
  1468. to be configured with <samp>--with-isl</samp> to enable the Graphite loop
  1469. transformation infrastructure.
  1470. </p>
  1471. </dd>
  1472. <dt><code>-fgraphite-identity</code></dt>
  1473. <dd><a name="index-fgraphite_002didentity"></a>
  1474. <p>Enable the identity transformation for graphite. For every SCoP we generate
  1475. the polyhedral representation and transform it back to gimple. Using
  1476. <samp>-fgraphite-identity</samp> we can check the costs or benefits of the
  1477. GIMPLE -&gt; GRAPHITE -&gt; GIMPLE transformation. Some minimal optimizations
  1478. are also performed by the code generator isl, like index splitting and
  1479. dead code elimination in loops.
  1480. </p>
  1481. </dd>
  1482. <dt><code>-floop-nest-optimize</code></dt>
  1483. <dd><a name="index-floop_002dnest_002doptimize"></a>
  1484. <p>Enable the isl based loop nest optimizer. This is a generic loop nest
  1485. optimizer based on the Pluto optimization algorithms. It calculates a loop
  1486. structure optimized for data-locality and parallelism. This option
  1487. is experimental.
  1488. </p>
  1489. </dd>
  1490. <dt><code>-floop-parallelize-all</code></dt>
  1491. <dd><a name="index-floop_002dparallelize_002dall"></a>
  1492. <p>Use the Graphite data dependence analysis to identify loops that can
  1493. be parallelized. Parallelize all the loops that can be analyzed to
  1494. not contain loop carried dependences without checking that it is
  1495. profitable to parallelize the loops.
  1496. </p>
  1497. </dd>
  1498. <dt><code>-ftree-coalesce-vars</code></dt>
  1499. <dd><a name="index-ftree_002dcoalesce_002dvars"></a>
  1500. <p>While transforming the program out of the SSA representation, attempt to
  1501. reduce copying by coalescing versions of different user-defined
  1502. variables, instead of just compiler temporaries. This may severely
  1503. limit the ability to debug an optimized program compiled with
  1504. <samp>-fno-var-tracking-assignments</samp>. In the negated form, this flag
  1505. prevents SSA coalescing of user variables. This option is enabled by
  1506. default if optimization is enabled, and it does very little otherwise.
  1507. </p>
  1508. </dd>
  1509. <dt><code>-ftree-loop-if-convert</code></dt>
  1510. <dd><a name="index-ftree_002dloop_002dif_002dconvert"></a>
  1511. <p>Attempt to transform conditional jumps in the innermost loops to
  1512. branch-less equivalents. The intent is to remove control-flow from
  1513. the innermost loops in order to improve the ability of the
  1514. vectorization pass to handle these loops. This is enabled by default
  1515. if vectorization is enabled.
  1516. </p>
  1517. </dd>
  1518. <dt><code>-ftree-loop-distribution</code></dt>
  1519. <dd><a name="index-ftree_002dloop_002ddistribution"></a>
  1520. <p>Perform loop distribution. This flag can improve cache performance on
  1521. big loop bodies and allow further loop optimizations, like
  1522. parallelization or vectorization, to take place. For example, the loop
  1523. </p><div class="smallexample">
  1524. <pre class="smallexample">DO I = 1, N
  1525. A(I) = B(I) + C
  1526. D(I) = E(I) * F
  1527. ENDDO
  1528. </pre></div>
  1529. <p>is transformed to
  1530. </p><div class="smallexample">
  1531. <pre class="smallexample">DO I = 1, N
  1532. A(I) = B(I) + C
  1533. ENDDO
  1534. DO I = 1, N
  1535. D(I) = E(I) * F
  1536. ENDDO
  1537. </pre></div>
  1538. </dd>
  1539. <dt><code>-ftree-loop-distribute-patterns</code></dt>
  1540. <dd><a name="index-ftree_002dloop_002ddistribute_002dpatterns"></a>
  1541. <p>Perform loop distribution of patterns that can be code generated with
  1542. calls to a library. This flag is enabled by default at <samp>-O3</samp>.
  1543. </p>
  1544. <p>This pass distributes the initialization loops and generates a call to
  1545. memset zero. For example, the loop
  1546. </p><div class="smallexample">
  1547. <pre class="smallexample">DO I = 1, N
  1548. A(I) = 0
  1549. B(I) = A(I) + I
  1550. ENDDO
  1551. </pre></div>
  1552. <p>is transformed to
  1553. </p><div class="smallexample">
  1554. <pre class="smallexample">DO I = 1, N
  1555. A(I) = 0
  1556. ENDDO
  1557. DO I = 1, N
  1558. B(I) = A(I) + I
  1559. ENDDO
  1560. </pre></div>
  1561. <p>and the initialization loop is transformed into a call to memset zero.
  1562. </p>
  1563. </dd>
  1564. <dt><code>-ftree-loop-im</code></dt>
  1565. <dd><a name="index-ftree_002dloop_002dim"></a>
  1566. <p>Perform loop invariant motion on trees. This pass moves only invariants that
  1567. are hard to handle at RTL level (function calls, operations that expand to
  1568. nontrivial sequences of insns). With <samp>-funswitch-loops</samp> it also moves
  1569. operands of conditions that are invariant out of the loop, so that we can use
  1570. just trivial invariantness analysis in loop unswitching. The pass also includes
  1571. store motion.
  1572. </p>
  1573. </dd>
  1574. <dt><code>-ftree-loop-ivcanon</code></dt>
  1575. <dd><a name="index-ftree_002dloop_002divcanon"></a>
  1576. <p>Create a canonical counter for number of iterations in loops for which
  1577. determining number of iterations requires complicated analysis. Later
  1578. optimizations then may determine the number easily. Useful especially
  1579. in connection with unrolling.
  1580. </p>
  1581. </dd>
  1582. <dt><code>-fivopts</code></dt>
  1583. <dd><a name="index-fivopts"></a>
  1584. <p>Perform induction variable optimizations (strength reduction, induction
  1585. variable merging and induction variable elimination) on trees.
  1586. </p>
  1587. </dd>
  1588. <dt><code>-ftree-parallelize-loops=n</code></dt>
  1589. <dd><a name="index-ftree_002dparallelize_002dloops"></a>
  1590. <p>Parallelize loops, i.e., split their iteration space to run in n threads.
  1591. This is only possible for loops whose iterations are independent
  1592. and can be arbitrarily reordered. The optimization is only
  1593. profitable on multiprocessor machines, for loops that are CPU-intensive,
  1594. rather than constrained e.g. by memory bandwidth. This option
  1595. implies <samp>-pthread</samp>, and thus is only supported on targets
  1596. that have support for <samp>-pthread</samp>.
  1597. </p>
  1598. </dd>
  1599. <dt><code>-ftree-pta</code></dt>
  1600. <dd><a name="index-ftree_002dpta"></a>
  1601. <p>Perform function-local points-to analysis on trees. This flag is
  1602. enabled by default at <samp>-O</samp> and higher.
  1603. </p>
  1604. </dd>
  1605. <dt><code>-ftree-sra</code></dt>
  1606. <dd><a name="index-ftree_002dsra"></a>
  1607. <p>Perform scalar replacement of aggregates. This pass replaces structure
  1608. references with scalars to prevent committing structures to memory too
  1609. early. This flag is enabled by default at <samp>-O</samp> and higher.
  1610. </p>
  1611. </dd>
  1612. <dt><code>-fstore-merging</code></dt>
  1613. <dd><a name="index-fstore_002dmerging"></a>
  1614. <p>Perform merging of narrow stores to consecutive memory addresses. This pass
  1615. merges contiguous stores of immediate values narrower than a word into fewer
  1616. wider stores to reduce the number of instructions. This is enabled by default
  1617. at <samp>-O2</samp> and higher as well as <samp>-Os</samp>.
  1618. </p>
  1619. </dd>
  1620. <dt><code>-ftree-ter</code></dt>
  1621. <dd><a name="index-ftree_002dter"></a>
  1622. <p>Perform temporary expression replacement during the SSA-&gt;normal phase. Single
  1623. use/single def temporaries are replaced at their use location with their
  1624. defining expression. This results in non-GIMPLE code, but gives the expanders
  1625. much more complex trees to work on resulting in better RTL generation. This is
  1626. enabled by default at <samp>-O</samp> and higher.
  1627. </p>
  1628. </dd>
  1629. <dt><code>-ftree-slsr</code></dt>
  1630. <dd><a name="index-ftree_002dslsr"></a>
  1631. <p>Perform straight-line strength reduction on trees. This recognizes related
  1632. expressions involving multiplications and replaces them by less expensive
  1633. calculations when possible. This is enabled by default at <samp>-O</samp> and
  1634. higher.
  1635. </p>
  1636. </dd>
  1637. <dt><code>-ftree-vectorize</code></dt>
  1638. <dd><a name="index-ftree_002dvectorize"></a>
  1639. <p>Perform vectorization on trees. This flag enables <samp>-ftree-loop-vectorize</samp>
  1640. and <samp>-ftree-slp-vectorize</samp> if not explicitly specified.
  1641. </p>
  1642. </dd>
  1643. <dt><code>-ftree-loop-vectorize</code></dt>
  1644. <dd><a name="index-ftree_002dloop_002dvectorize"></a>
  1645. <p>Perform loop vectorization on trees. This flag is enabled by default at
  1646. <samp>-O3</samp> and when <samp>-ftree-vectorize</samp> is enabled.
  1647. </p>
  1648. </dd>
  1649. <dt><code>-ftree-slp-vectorize</code></dt>
  1650. <dd><a name="index-ftree_002dslp_002dvectorize"></a>
  1651. <p>Perform basic block vectorization on trees. This flag is enabled by default at
  1652. <samp>-O3</samp> and when <samp>-ftree-vectorize</samp> is enabled.
  1653. </p>
  1654. </dd>
  1655. <dt><code>-fvect-cost-model=<var>model</var></code></dt>
  1656. <dd><a name="index-fvect_002dcost_002dmodel"></a>
  1657. <p>Alter the cost model used for vectorization. The <var>model</var> argument
  1658. should be one of &lsquo;<samp>unlimited</samp>&rsquo;, &lsquo;<samp>dynamic</samp>&rsquo; or &lsquo;<samp>cheap</samp>&rsquo;.
  1659. With the &lsquo;<samp>unlimited</samp>&rsquo; model the vectorized code-path is assumed
  1660. to be profitable while with the &lsquo;<samp>dynamic</samp>&rsquo; model a runtime check
  1661. guards the vectorized code-path to enable it only for iteration
  1662. counts that will likely execute faster than when executing the original
  1663. scalar loop. The &lsquo;<samp>cheap</samp>&rsquo; model disables vectorization of
  1664. loops where doing so would be cost prohibitive for example due to
  1665. required runtime checks for data dependence or alignment but otherwise
  1666. is equal to the &lsquo;<samp>dynamic</samp>&rsquo; model.
  1667. The default cost model depends on other optimization flags and is
  1668. either &lsquo;<samp>dynamic</samp>&rsquo; or &lsquo;<samp>cheap</samp>&rsquo;.
  1669. </p>
  1670. </dd>
  1671. <dt><code>-fsimd-cost-model=<var>model</var></code></dt>
  1672. <dd><a name="index-fsimd_002dcost_002dmodel"></a>
  1673. <p>Alter the cost model used for vectorization of loops marked with the OpenMP
  1674. or Cilk Plus simd directive. The <var>model</var> argument should be one of
  1675. &lsquo;<samp>unlimited</samp>&rsquo;, &lsquo;<samp>dynamic</samp>&rsquo;, &lsquo;<samp>cheap</samp>&rsquo;. All values of <var>model</var>
  1676. have the same meaning as described in <samp>-fvect-cost-model</samp> and by
  1677. default a cost model defined with <samp>-fvect-cost-model</samp> is used.
  1678. </p>
  1679. </dd>
  1680. <dt><code>-ftree-vrp</code></dt>
  1681. <dd><a name="index-ftree_002dvrp"></a>
  1682. <p>Perform Value Range Propagation on trees. This is similar to the
  1683. constant propagation pass, but instead of values, ranges of values are
  1684. propagated. This allows the optimizers to remove unnecessary range
  1685. checks like array bound checks and null pointer checks. This is
  1686. enabled by default at <samp>-O2</samp> and higher. Null pointer check
  1687. elimination is only done if <samp>-fdelete-null-pointer-checks</samp> is
  1688. enabled.
  1689. </p>
  1690. </dd>
  1691. <dt><code>-fsplit-paths</code></dt>
  1692. <dd><a name="index-fsplit_002dpaths"></a>
  1693. <p>Split paths leading to loop backedges. This can improve dead code
  1694. elimination and common subexpression elimination. This is enabled by
  1695. default at <samp>-O2</samp> and above.
  1696. </p>
  1697. </dd>
  1698. <dt><code>-fsplit-ivs-in-unroller</code></dt>
  1699. <dd><a name="index-fsplit_002divs_002din_002dunroller"></a>
  1700. <p>Enables expression of values of induction variables in later iterations
  1701. of the unrolled loop using the value in the first iteration. This breaks
  1702. long dependency chains, thus improving efficiency of the scheduling passes.
  1703. </p>
  1704. <p>A combination of <samp>-fweb</samp> and CSE is often sufficient to obtain the
  1705. same effect. However, that is not reliable in cases where the loop body
  1706. is more complicated than a single basic block. It also does not work at all
  1707. on some architectures due to restrictions in the CSE pass.
  1708. </p>
  1709. <p>This optimization is enabled by default.
  1710. </p>
  1711. </dd>
  1712. <dt><code>-fvariable-expansion-in-unroller</code></dt>
  1713. <dd><a name="index-fvariable_002dexpansion_002din_002dunroller"></a>
  1714. <p>With this option, the compiler creates multiple copies of some
  1715. local variables when unrolling a loop, which can result in superior code.
  1716. </p>
  1717. </dd>
  1718. <dt><code>-fpartial-inlining</code></dt>
  1719. <dd><a name="index-fpartial_002dinlining"></a>
  1720. <p>Inline parts of functions. This option has any effect only
  1721. when inlining itself is turned on by the <samp>-finline-functions</samp>
  1722. or <samp>-finline-small-functions</samp> options.
  1723. </p>
  1724. <p>Enabled at level <samp>-O2</samp>.
  1725. </p>
  1726. </dd>
  1727. <dt><code>-fpredictive-commoning</code></dt>
  1728. <dd><a name="index-fpredictive_002dcommoning"></a>
  1729. <p>Perform predictive commoning optimization, i.e., reusing computations
  1730. (especially memory loads and stores) performed in previous
  1731. iterations of loops.
  1732. </p>
  1733. <p>This option is enabled at level <samp>-O3</samp>.
  1734. </p>
  1735. </dd>
  1736. <dt><code>-fprefetch-loop-arrays</code></dt>
  1737. <dd><a name="index-fprefetch_002dloop_002darrays"></a>
  1738. <p>If supported by the target machine, generate instructions to prefetch
  1739. memory to improve the performance of loops that access large arrays.
  1740. </p>
  1741. <p>This option may generate better or worse code; results are highly
  1742. dependent on the structure of loops within the source code.
  1743. </p>
  1744. <p>Disabled at level <samp>-Os</samp>.
  1745. </p>
  1746. </dd>
  1747. <dt><code>-fno-printf-return-value</code></dt>
  1748. <dd><a name="index-fno_002dprintf_002dreturn_002dvalue"></a>
  1749. <p>Do not substitute constants for known return value of formatted output
  1750. functions such as <code>sprintf</code>, <code>snprintf</code>, <code>vsprintf</code>, and
  1751. <code>vsnprintf</code> (but not <code>printf</code> of <code>fprintf</code>). This
  1752. transformation allows GCC to optimize or even eliminate branches based
  1753. on the known return value of these functions called with arguments that
  1754. are either constant, or whose values are known to be in a range that
  1755. makes determining the exact return value possible. For example, when
  1756. <samp>-fprintf-return-value</samp> is in effect, both the branch and the
  1757. body of the <code>if</code> statement (but not the call to <code>snprint</code>)
  1758. can be optimized away when <code>i</code> is a 32-bit or smaller integer
  1759. because the return value is guaranteed to be at most 8.
  1760. </p>
  1761. <div class="smallexample">
  1762. <pre class="smallexample">char buf[9];
  1763. if (snprintf (buf, &quot;%08x&quot;, i) &gt;= sizeof buf)
  1764. &hellip;
  1765. </pre></div>
  1766. <p>The <samp>-fprintf-return-value</samp> option relies on other optimizations
  1767. and yields best results with <samp>-O2</samp>. It works in tandem with the
  1768. <samp>-Wformat-overflow</samp> and <samp>-Wformat-truncation</samp> options.
  1769. The <samp>-fprintf-return-value</samp> option is enabled by default.
  1770. </p>
  1771. </dd>
  1772. <dt><code>-fno-peephole</code></dt>
  1773. <dt><code>-fno-peephole2</code></dt>
  1774. <dd><a name="index-fno_002dpeephole"></a>
  1775. <a name="index-fno_002dpeephole2"></a>
  1776. <p>Disable any machine-specific peephole optimizations. The difference
  1777. between <samp>-fno-peephole</samp> and <samp>-fno-peephole2</samp> is in how they
  1778. are implemented in the compiler; some targets use one, some use the
  1779. other, a few use both.
  1780. </p>
  1781. <p><samp>-fpeephole</samp> is enabled by default.
  1782. <samp>-fpeephole2</samp> enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  1783. </p>
  1784. </dd>
  1785. <dt><code>-fno-guess-branch-probability</code></dt>
  1786. <dd><a name="index-fno_002dguess_002dbranch_002dprobability"></a>
  1787. <p>Do not guess branch probabilities using heuristics.
  1788. </p>
  1789. <p>GCC uses heuristics to guess branch probabilities if they are
  1790. not provided by profiling feedback (<samp>-fprofile-arcs</samp>). These
  1791. heuristics are based on the control flow graph. If some branch probabilities
  1792. are specified by <code>__builtin_expect</code>, then the heuristics are
  1793. used to guess branch probabilities for the rest of the control flow graph,
  1794. taking the <code>__builtin_expect</code> info into account. The interactions
  1795. between the heuristics and <code>__builtin_expect</code> can be complex, and in
  1796. some cases, it may be useful to disable the heuristics so that the effects
  1797. of <code>__builtin_expect</code> are easier to understand.
  1798. </p>
  1799. <p>The default is <samp>-fguess-branch-probability</samp> at levels
  1800. <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  1801. </p>
  1802. </dd>
  1803. <dt><code>-freorder-blocks</code></dt>
  1804. <dd><a name="index-freorder_002dblocks"></a>
  1805. <p>Reorder basic blocks in the compiled function in order to reduce number of
  1806. taken branches and improve code locality.
  1807. </p>
  1808. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  1809. </p>
  1810. </dd>
  1811. <dt><code>-freorder-blocks-algorithm=<var>algorithm</var></code></dt>
  1812. <dd><a name="index-freorder_002dblocks_002dalgorithm"></a>
  1813. <p>Use the specified algorithm for basic block reordering. The
  1814. <var>algorithm</var> argument can be &lsquo;<samp>simple</samp>&rsquo;, which does not increase
  1815. code size (except sometimes due to secondary effects like alignment),
  1816. or &lsquo;<samp>stc</samp>&rsquo;, the &ldquo;software trace cache&rdquo; algorithm, which tries to
  1817. put all often executed code together, minimizing the number of branches
  1818. executed by making extra copies of code.
  1819. </p>
  1820. <p>The default is &lsquo;<samp>simple</samp>&rsquo; at levels <samp>-O</samp>, <samp>-Os</samp>, and
  1821. &lsquo;<samp>stc</samp>&rsquo; at levels <samp>-O2</samp>, <samp>-O3</samp>.
  1822. </p>
  1823. </dd>
  1824. <dt><code>-freorder-blocks-and-partition</code></dt>
  1825. <dd><a name="index-freorder_002dblocks_002dand_002dpartition"></a>
  1826. <p>In addition to reordering basic blocks in the compiled function, in order
  1827. to reduce number of taken branches, partitions hot and cold basic blocks
  1828. into separate sections of the assembly and <samp>.o</samp> files, to improve
  1829. paging and cache locality performance.
  1830. </p>
  1831. <p>This optimization is automatically turned off in the presence of
  1832. exception handling, for linkonce sections, for functions with a user-defined
  1833. section attribute and on any architecture that does not support named
  1834. sections.
  1835. </p>
  1836. <p>Enabled for x86 at levels <samp>-O2</samp>, <samp>-O3</samp>.
  1837. </p>
  1838. </dd>
  1839. <dt><code>-freorder-functions</code></dt>
  1840. <dd><a name="index-freorder_002dfunctions"></a>
  1841. <p>Reorder functions in the object file in order to
  1842. improve code locality. This is implemented by using special
  1843. subsections <code>.text.hot</code> for most frequently executed functions and
  1844. <code>.text.unlikely</code> for unlikely executed functions. Reordering is done by
  1845. the linker so object file format must support named sections and linker must
  1846. place them in a reasonable way.
  1847. </p>
  1848. <p>Also profile feedback must be available to make this option effective. See
  1849. <samp>-fprofile-arcs</samp> for details.
  1850. </p>
  1851. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  1852. </p>
  1853. </dd>
  1854. <dt><code>-fstrict-aliasing</code></dt>
  1855. <dd><a name="index-fstrict_002daliasing"></a>
  1856. <p>Allow the compiler to assume the strictest aliasing rules applicable to
  1857. the language being compiled. For C (and C++), this activates
  1858. optimizations based on the type of expressions. In particular, an
  1859. object of one type is assumed never to reside at the same address as an
  1860. object of a different type, unless the types are almost the same. For
  1861. example, an <code>unsigned int</code> can alias an <code>int</code>, but not a
  1862. <code>void*</code> or a <code>double</code>. A character type may alias any other
  1863. type.
  1864. </p>
  1865. <a name="Type_002dpunning"></a><p>Pay special attention to code like this:
  1866. </p><div class="smallexample">
  1867. <pre class="smallexample">union a_union {
  1868. int i;
  1869. double d;
  1870. };
  1871. int f() {
  1872. union a_union t;
  1873. t.d = 3.0;
  1874. return t.i;
  1875. }
  1876. </pre></div>
  1877. <p>The practice of reading from a different union member than the one most
  1878. recently written to (called &ldquo;type-punning&rdquo;) is common. Even with
  1879. <samp>-fstrict-aliasing</samp>, type-punning is allowed, provided the memory
  1880. is accessed through the union type. So, the code above works as
  1881. expected. See <a href="Structures-unions-enumerations-and-bit_002dfields-implementation.html#Structures-unions-enumerations-and-bit_002dfields-implementation">Structures unions enumerations and bit-fields implementation</a>. However, this code might not:
  1882. </p><div class="smallexample">
  1883. <pre class="smallexample">int f() {
  1884. union a_union t;
  1885. int* ip;
  1886. t.d = 3.0;
  1887. ip = &amp;t.i;
  1888. return *ip;
  1889. }
  1890. </pre></div>
  1891. <p>Similarly, access by taking the address, casting the resulting pointer
  1892. and dereferencing the result has undefined behavior, even if the cast
  1893. uses a union type, e.g.:
  1894. </p><div class="smallexample">
  1895. <pre class="smallexample">int f() {
  1896. double d = 3.0;
  1897. return ((union a_union *) &amp;d)-&gt;i;
  1898. }
  1899. </pre></div>
  1900. <p>The <samp>-fstrict-aliasing</samp> option is enabled at levels
  1901. <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  1902. </p>
  1903. </dd>
  1904. <dt><code>-fstrict-overflow</code></dt>
  1905. <dd><a name="index-fstrict_002doverflow"></a>
  1906. <p>Allow the compiler to assume strict signed overflow rules, depending
  1907. on the language being compiled. For C (and C++) this means that
  1908. overflow when doing arithmetic with signed numbers is undefined, which
  1909. means that the compiler may assume that it does not happen. This
  1910. permits various optimizations. For example, the compiler assumes
  1911. that an expression like <code>i + 10 &gt; i</code> is always true for
  1912. signed <code>i</code>. This assumption is only valid if signed overflow is
  1913. undefined, as the expression is false if <code>i + 10</code> overflows when
  1914. using twos complement arithmetic. When this option is in effect any
  1915. attempt to determine whether an operation on signed numbers
  1916. overflows must be written carefully to not actually involve overflow.
  1917. </p>
  1918. <p>This option also allows the compiler to assume strict pointer
  1919. semantics: given a pointer to an object, if adding an offset to that
  1920. pointer does not produce a pointer to the same object, the addition is
  1921. undefined. This permits the compiler to conclude that <code>p + u &gt;
  1922. p</code> is always true for a pointer <code>p</code> and unsigned integer
  1923. <code>u</code>. This assumption is only valid because pointer wraparound is
  1924. undefined, as the expression is false if <code>p + u</code> overflows using
  1925. twos complement arithmetic.
  1926. </p>
  1927. <p>See also the <samp>-fwrapv</samp> option. Using <samp>-fwrapv</samp> means
  1928. that integer signed overflow is fully defined: it wraps. When
  1929. <samp>-fwrapv</samp> is used, there is no difference between
  1930. <samp>-fstrict-overflow</samp> and <samp>-fno-strict-overflow</samp> for
  1931. integers. With <samp>-fwrapv</samp> certain types of overflow are
  1932. permitted. For example, if the compiler gets an overflow when doing
  1933. arithmetic on constants, the overflowed value can still be used with
  1934. <samp>-fwrapv</samp>, but not otherwise.
  1935. </p>
  1936. <p>The <samp>-fstrict-overflow</samp> option is enabled at levels
  1937. <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  1938. </p>
  1939. </dd>
  1940. <dt><code>-falign-functions</code></dt>
  1941. <dt><code>-falign-functions=<var>n</var></code></dt>
  1942. <dd><a name="index-falign_002dfunctions"></a>
  1943. <p>Align the start of functions to the next power-of-two greater than
  1944. <var>n</var>, skipping up to <var>n</var> bytes. For instance,
  1945. <samp>-falign-functions=32</samp> aligns functions to the next 32-byte
  1946. boundary, but <samp>-falign-functions=24</samp> aligns to the next
  1947. 32-byte boundary only if this can be done by skipping 23 bytes or less.
  1948. </p>
  1949. <p><samp>-fno-align-functions</samp> and <samp>-falign-functions=1</samp> are
  1950. equivalent and mean that functions are not aligned.
  1951. </p>
  1952. <p>Some assemblers only support this flag when <var>n</var> is a power of two;
  1953. in that case, it is rounded up.
  1954. </p>
  1955. <p>If <var>n</var> is not specified or is zero, use a machine-dependent default.
  1956. The maximum allowed <var>n</var> option value is 65536.
  1957. </p>
  1958. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>.
  1959. </p>
  1960. </dd>
  1961. <dt><code>-flimit-function-alignment</code></dt>
  1962. <dd><p>If this option is enabled, the compiler tries to avoid unnecessarily
  1963. overaligning functions. It attempts to instruct the assembler to align
  1964. by the amount specified by <samp>-falign-functions</samp>, but not to
  1965. skip more bytes than the size of the function.
  1966. </p>
  1967. </dd>
  1968. <dt><code>-falign-labels</code></dt>
  1969. <dt><code>-falign-labels=<var>n</var></code></dt>
  1970. <dd><a name="index-falign_002dlabels"></a>
  1971. <p>Align all branch targets to a power-of-two boundary, skipping up to
  1972. <var>n</var> bytes like <samp>-falign-functions</samp>. This option can easily
  1973. make code slower, because it must insert dummy operations for when the
  1974. branch target is reached in the usual flow of the code.
  1975. </p>
  1976. <p><samp>-fno-align-labels</samp> and <samp>-falign-labels=1</samp> are
  1977. equivalent and mean that labels are not aligned.
  1978. </p>
  1979. <p>If <samp>-falign-loops</samp> or <samp>-falign-jumps</samp> are applicable and
  1980. are greater than this value, then their values are used instead.
  1981. </p>
  1982. <p>If <var>n</var> is not specified or is zero, use a machine-dependent default
  1983. which is very likely to be &lsquo;<samp>1</samp>&rsquo;, meaning no alignment.
  1984. The maximum allowed <var>n</var> option value is 65536.
  1985. </p>
  1986. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>.
  1987. </p>
  1988. </dd>
  1989. <dt><code>-falign-loops</code></dt>
  1990. <dt><code>-falign-loops=<var>n</var></code></dt>
  1991. <dd><a name="index-falign_002dloops"></a>
  1992. <p>Align loops to a power-of-two boundary, skipping up to <var>n</var> bytes
  1993. like <samp>-falign-functions</samp>. If the loops are
  1994. executed many times, this makes up for any execution of the dummy
  1995. operations.
  1996. </p>
  1997. <p><samp>-fno-align-loops</samp> and <samp>-falign-loops=1</samp> are
  1998. equivalent and mean that loops are not aligned.
  1999. The maximum allowed <var>n</var> option value is 65536.
  2000. </p>
  2001. <p>If <var>n</var> is not specified or is zero, use a machine-dependent default.
  2002. </p>
  2003. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>.
  2004. </p>
  2005. </dd>
  2006. <dt><code>-falign-jumps</code></dt>
  2007. <dt><code>-falign-jumps=<var>n</var></code></dt>
  2008. <dd><a name="index-falign_002djumps"></a>
  2009. <p>Align branch targets to a power-of-two boundary, for branch targets
  2010. where the targets can only be reached by jumping, skipping up to <var>n</var>
  2011. bytes like <samp>-falign-functions</samp>. In this case, no dummy operations
  2012. need be executed.
  2013. </p>
  2014. <p><samp>-fno-align-jumps</samp> and <samp>-falign-jumps=1</samp> are
  2015. equivalent and mean that loops are not aligned.
  2016. </p>
  2017. <p>If <var>n</var> is not specified or is zero, use a machine-dependent default.
  2018. The maximum allowed <var>n</var> option value is 65536.
  2019. </p>
  2020. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>.
  2021. </p>
  2022. </dd>
  2023. <dt><code>-funit-at-a-time</code></dt>
  2024. <dd><a name="index-funit_002dat_002da_002dtime"></a>
  2025. <p>This option is left for compatibility reasons. <samp>-funit-at-a-time</samp>
  2026. has no effect, while <samp>-fno-unit-at-a-time</samp> implies
  2027. <samp>-fno-toplevel-reorder</samp> and <samp>-fno-section-anchors</samp>.
  2028. </p>
  2029. <p>Enabled by default.
  2030. </p>
  2031. </dd>
  2032. <dt><code>-fno-toplevel-reorder</code></dt>
  2033. <dd><a name="index-fno_002dtoplevel_002dreorder"></a>
  2034. <p>Do not reorder top-level functions, variables, and <code>asm</code>
  2035. statements. Output them in the same order that they appear in the
  2036. input file. When this option is used, unreferenced static variables
  2037. are not removed. This option is intended to support existing code
  2038. that relies on a particular ordering. For new code, it is better to
  2039. use attributes when possible.
  2040. </p>
  2041. <p>Enabled at level <samp>-O0</samp>. When disabled explicitly, it also implies
  2042. <samp>-fno-section-anchors</samp>, which is otherwise enabled at <samp>-O0</samp> on some
  2043. targets.
  2044. </p>
  2045. </dd>
  2046. <dt><code>-fweb</code></dt>
  2047. <dd><a name="index-fweb"></a>
  2048. <p>Constructs webs as commonly used for register allocation purposes and assign
  2049. each web individual pseudo register. This allows the register allocation pass
  2050. to operate on pseudos directly, but also strengthens several other optimization
  2051. passes, such as CSE, loop optimizer and trivial dead code remover. It can,
  2052. however, make debugging impossible, since variables no longer stay in a
  2053. &ldquo;home register&rdquo;.
  2054. </p>
  2055. <p>Enabled by default with <samp>-funroll-loops</samp>.
  2056. </p>
  2057. </dd>
  2058. <dt><code>-fwhole-program</code></dt>
  2059. <dd><a name="index-fwhole_002dprogram"></a>
  2060. <p>Assume that the current compilation unit represents the whole program being
  2061. compiled. All public functions and variables with the exception of <code>main</code>
  2062. and those merged by attribute <code>externally_visible</code> become static functions
  2063. and in effect are optimized more aggressively by interprocedural optimizers.
  2064. </p>
  2065. <p>This option should not be used in combination with <samp>-flto</samp>.
  2066. Instead relying on a linker plugin should provide safer and more precise
  2067. information.
  2068. </p>
  2069. </dd>
  2070. <dt><code>-flto[=<var>n</var>]</code></dt>
  2071. <dd><a name="index-flto"></a>
  2072. <p>This option runs the standard link-time optimizer. When invoked
  2073. with source code, it generates GIMPLE (one of GCC&rsquo;s internal
  2074. representations) and writes it to special ELF sections in the object
  2075. file. When the object files are linked together, all the function
  2076. bodies are read from these ELF sections and instantiated as if they
  2077. had been part of the same translation unit.
  2078. </p>
  2079. <p>To use the link-time optimizer, <samp>-flto</samp> and optimization
  2080. options should be specified at compile time and during the final link.
  2081. It is recommended that you compile all the files participating in the
  2082. same link with the same options and also specify those options at
  2083. link time.
  2084. For example:
  2085. </p>
  2086. <div class="smallexample">
  2087. <pre class="smallexample">gcc -c -O2 -flto foo.c
  2088. gcc -c -O2 -flto bar.c
  2089. gcc -o myprog -flto -O2 foo.o bar.o
  2090. </pre></div>
  2091. <p>The first two invocations to GCC save a bytecode representation
  2092. of GIMPLE into special ELF sections inside <samp>foo.o</samp> and
  2093. <samp>bar.o</samp>. The final invocation reads the GIMPLE bytecode from
  2094. <samp>foo.o</samp> and <samp>bar.o</samp>, merges the two files into a single
  2095. internal image, and compiles the result as usual. Since both
  2096. <samp>foo.o</samp> and <samp>bar.o</samp> are merged into a single image, this
  2097. causes all the interprocedural analyses and optimizations in GCC to
  2098. work across the two files as if they were a single one. This means,
  2099. for example, that the inliner is able to inline functions in
  2100. <samp>bar.o</samp> into functions in <samp>foo.o</samp> and vice-versa.
  2101. </p>
  2102. <p>Another (simpler) way to enable link-time optimization is:
  2103. </p>
  2104. <div class="smallexample">
  2105. <pre class="smallexample">gcc -o myprog -flto -O2 foo.c bar.c
  2106. </pre></div>
  2107. <p>The above generates bytecode for <samp>foo.c</samp> and <samp>bar.c</samp>,
  2108. merges them together into a single GIMPLE representation and optimizes
  2109. them as usual to produce <samp>myprog</samp>.
  2110. </p>
  2111. <p>The only important thing to keep in mind is that to enable link-time
  2112. optimizations you need to use the GCC driver to perform the link step.
  2113. GCC then automatically performs link-time optimization if any of the
  2114. objects involved were compiled with the <samp>-flto</samp> command-line option.
  2115. You generally
  2116. should specify the optimization options to be used for link-time
  2117. optimization though GCC tries to be clever at guessing an
  2118. optimization level to use from the options used at compile time
  2119. if you fail to specify one at link time. You can always override
  2120. the automatic decision to do link-time optimization
  2121. by passing <samp>-fno-lto</samp> to the link command.
  2122. </p>
  2123. <p>To make whole program optimization effective, it is necessary to make
  2124. certain whole program assumptions. The compiler needs to know
  2125. what functions and variables can be accessed by libraries and runtime
  2126. outside of the link-time optimized unit. When supported by the linker,
  2127. the linker plugin (see <samp>-fuse-linker-plugin</samp>) passes information
  2128. to the compiler about used and externally visible symbols. When
  2129. the linker plugin is not available, <samp>-fwhole-program</samp> should be
  2130. used to allow the compiler to make these assumptions, which leads
  2131. to more aggressive optimization decisions.
  2132. </p>
  2133. <p>When <samp>-fuse-linker-plugin</samp> is not enabled, when a file is
  2134. compiled with <samp>-flto</samp>, the generated object file is larger than
  2135. a regular object file because it contains GIMPLE bytecodes and the usual
  2136. final code (see <samp>-ffat-lto-objects</samp>. This means that
  2137. object files with LTO information can be linked as normal object
  2138. files; if <samp>-fno-lto</samp> is passed to the linker, no
  2139. interprocedural optimizations are applied. Note that when
  2140. <samp>-fno-fat-lto-objects</samp> is enabled the compile stage is faster
  2141. but you cannot perform a regular, non-LTO link on them.
  2142. </p>
  2143. <p>Additionally, the optimization flags used to compile individual files
  2144. are not necessarily related to those used at link time. For instance,
  2145. </p>
  2146. <div class="smallexample">
  2147. <pre class="smallexample">gcc -c -O0 -ffat-lto-objects -flto foo.c
  2148. gcc -c -O0 -ffat-lto-objects -flto bar.c
  2149. gcc -o myprog -O3 foo.o bar.o
  2150. </pre></div>
  2151. <p>This produces individual object files with unoptimized assembler
  2152. code, but the resulting binary <samp>myprog</samp> is optimized at
  2153. <samp>-O3</samp>. If, instead, the final binary is generated with
  2154. <samp>-fno-lto</samp>, then <samp>myprog</samp> is not optimized.
  2155. </p>
  2156. <p>When producing the final binary, GCC only
  2157. applies link-time optimizations to those files that contain bytecode.
  2158. Therefore, you can mix and match object files and libraries with
  2159. GIMPLE bytecodes and final object code. GCC automatically selects
  2160. which files to optimize in LTO mode and which files to link without
  2161. further processing.
  2162. </p>
  2163. <p>There are some code generation flags preserved by GCC when
  2164. generating bytecodes, as they need to be used during the final link
  2165. stage. Generally options specified at link time override those
  2166. specified at compile time.
  2167. </p>
  2168. <p>If you do not specify an optimization level option <samp>-O</samp> at
  2169. link time, then GCC uses the highest optimization level
  2170. used when compiling the object files.
  2171. </p>
  2172. <p>Currently, the following options and their settings are taken from
  2173. the first object file that explicitly specifies them:
  2174. <samp>-fPIC</samp>, <samp>-fpic</samp>, <samp>-fpie</samp>, <samp>-fcommon</samp>,
  2175. <samp>-fexceptions</samp>, <samp>-fnon-call-exceptions</samp>, <samp>-fgnu-tm</samp>
  2176. and all the <samp>-m</samp> target flags.
  2177. </p>
  2178. <p>Certain ABI-changing flags are required to match in all compilation units,
  2179. and trying to override this at link time with a conflicting value
  2180. is ignored. This includes options such as <samp>-freg-struct-return</samp>
  2181. and <samp>-fpcc-struct-return</samp>.
  2182. </p>
  2183. <p>Other options such as <samp>-ffp-contract</samp>, <samp>-fno-strict-overflow</samp>,
  2184. <samp>-fwrapv</samp>, <samp>-fno-trapv</samp> or <samp>-fno-strict-aliasing</samp>
  2185. are passed through to the link stage and merged conservatively for
  2186. conflicting translation units. Specifically
  2187. <samp>-fno-strict-overflow</samp>, <samp>-fwrapv</samp> and <samp>-fno-trapv</samp> take
  2188. precedence; and for example <samp>-ffp-contract=off</samp> takes precedence
  2189. over <samp>-ffp-contract=fast</samp>. You can override them at link time.
  2190. </p>
  2191. <p>If LTO encounters objects with C linkage declared with incompatible
  2192. types in separate translation units to be linked together (undefined
  2193. behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be
  2194. issued. The behavior is still undefined at run time. Similar
  2195. diagnostics may be raised for other languages.
  2196. </p>
  2197. <p>Another feature of LTO is that it is possible to apply interprocedural
  2198. optimizations on files written in different languages:
  2199. </p>
  2200. <div class="smallexample">
  2201. <pre class="smallexample">gcc -c -flto foo.c
  2202. g++ -c -flto bar.cc
  2203. gfortran -c -flto baz.f90
  2204. g++ -o myprog -flto -O3 foo.o bar.o baz.o -lgfortran
  2205. </pre></div>
  2206. <p>Notice that the final link is done with <code>g++</code> to get the C++
  2207. runtime libraries and <samp>-lgfortran</samp> is added to get the Fortran
  2208. runtime libraries. In general, when mixing languages in LTO mode, you
  2209. should use the same link command options as when mixing languages in a
  2210. regular (non-LTO) compilation.
  2211. </p>
  2212. <p>If object files containing GIMPLE bytecode are stored in a library archive, say
  2213. <samp>libfoo.a</samp>, it is possible to extract and use them in an LTO link if you
  2214. are using a linker with plugin support. To create static libraries suitable
  2215. for LTO, use <code>gcc-ar</code> and <code>gcc-ranlib</code> instead of <code>ar</code>
  2216. and <code>ranlib</code>;
  2217. to show the symbols of object files with GIMPLE bytecode, use
  2218. <code>gcc-nm</code>. Those commands require that <code>ar</code>, <code>ranlib</code>
  2219. and <code>nm</code> have been compiled with plugin support. At link time, use the the
  2220. flag <samp>-fuse-linker-plugin</samp> to ensure that the library participates in
  2221. the LTO optimization process:
  2222. </p>
  2223. <div class="smallexample">
  2224. <pre class="smallexample">gcc -o myprog -O2 -flto -fuse-linker-plugin a.o b.o -lfoo
  2225. </pre></div>
  2226. <p>With the linker plugin enabled, the linker extracts the needed
  2227. GIMPLE files from <samp>libfoo.a</samp> and passes them on to the running GCC
  2228. to make them part of the aggregated GIMPLE image to be optimized.
  2229. </p>
  2230. <p>If you are not using a linker with plugin support and/or do not
  2231. enable the linker plugin, then the objects inside <samp>libfoo.a</samp>
  2232. are extracted and linked as usual, but they do not participate
  2233. in the LTO optimization process. In order to make a static library suitable
  2234. for both LTO optimization and usual linkage, compile its object files with
  2235. <samp>-flto</samp> <samp>-ffat-lto-objects</samp>.
  2236. </p>
  2237. <p>Link-time optimizations do not require the presence of the whole program to
  2238. operate. If the program does not require any symbols to be exported, it is
  2239. possible to combine <samp>-flto</samp> and <samp>-fwhole-program</samp> to allow
  2240. the interprocedural optimizers to use more aggressive assumptions which may
  2241. lead to improved optimization opportunities.
  2242. Use of <samp>-fwhole-program</samp> is not needed when linker plugin is
  2243. active (see <samp>-fuse-linker-plugin</samp>).
  2244. </p>
  2245. <p>The current implementation of LTO makes no
  2246. attempt to generate bytecode that is portable between different
  2247. types of hosts. The bytecode files are versioned and there is a
  2248. strict version check, so bytecode files generated in one version of
  2249. GCC do not work with an older or newer version of GCC.
  2250. </p>
  2251. <p>Link-time optimization does not work well with generation of debugging
  2252. information. Combining <samp>-flto</samp> with
  2253. <samp>-g</samp> is currently experimental and expected to produce unexpected
  2254. results.
  2255. </p>
  2256. <p>If you specify the optional <var>n</var>, the optimization and code
  2257. generation done at link time is executed in parallel using <var>n</var>
  2258. parallel jobs by utilizing an installed <code>make</code> program. The
  2259. environment variable <code>MAKE</code> may be used to override the program
  2260. used. The default value for <var>n</var> is 1.
  2261. </p>
  2262. <p>You can also specify <samp>-flto=jobserver</samp> to use GNU make&rsquo;s
  2263. job server mode to determine the number of parallel jobs. This
  2264. is useful when the Makefile calling GCC is already executing in parallel.
  2265. You must prepend a &lsquo;<samp>+</samp>&rsquo; to the command recipe in the parent Makefile
  2266. for this to work. This option likely only works if <code>MAKE</code> is
  2267. GNU make.
  2268. </p>
  2269. </dd>
  2270. <dt><code>-flto-partition=<var>alg</var></code></dt>
  2271. <dd><a name="index-flto_002dpartition"></a>
  2272. <p>Specify the partitioning algorithm used by the link-time optimizer.
  2273. The value is either &lsquo;<samp>1to1</samp>&rsquo; to specify a partitioning mirroring
  2274. the original source files or &lsquo;<samp>balanced</samp>&rsquo; to specify partitioning
  2275. into equally sized chunks (whenever possible) or &lsquo;<samp>max</samp>&rsquo; to create
  2276. new partition for every symbol where possible. Specifying &lsquo;<samp>none</samp>&rsquo;
  2277. as an algorithm disables partitioning and streaming completely.
  2278. The default value is &lsquo;<samp>balanced</samp>&rsquo;. While &lsquo;<samp>1to1</samp>&rsquo; can be used
  2279. as an workaround for various code ordering issues, the &lsquo;<samp>max</samp>&rsquo;
  2280. partitioning is intended for internal testing only.
  2281. The value &lsquo;<samp>one</samp>&rsquo; specifies that exactly one partition should be
  2282. used while the value &lsquo;<samp>none</samp>&rsquo; bypasses partitioning and executes
  2283. the link-time optimization step directly from the WPA phase.
  2284. </p>
  2285. </dd>
  2286. <dt><code>-flto-odr-type-merging</code></dt>
  2287. <dd><a name="index-flto_002dodr_002dtype_002dmerging"></a>
  2288. <p>Enable streaming of mangled types names of C++ types and their unification
  2289. at link time. This increases size of LTO object files, but enables
  2290. diagnostics about One Definition Rule violations.
  2291. </p>
  2292. </dd>
  2293. <dt><code>-flto-compression-level=<var>n</var></code></dt>
  2294. <dd><a name="index-flto_002dcompression_002dlevel"></a>
  2295. <p>This option specifies the level of compression used for intermediate
  2296. language written to LTO object files, and is only meaningful in
  2297. conjunction with LTO mode (<samp>-flto</samp>). Valid
  2298. values are 0 (no compression) to 9 (maximum compression). Values
  2299. outside this range are clamped to either 0 or 9. If the option is not
  2300. given, a default balanced compression setting is used.
  2301. </p>
  2302. </dd>
  2303. <dt><code>-fuse-linker-plugin</code></dt>
  2304. <dd><a name="index-fuse_002dlinker_002dplugin"></a>
  2305. <p>Enables the use of a linker plugin during link-time optimization. This
  2306. option relies on plugin support in the linker, which is available in gold
  2307. or in GNU ld 2.21 or newer.
  2308. </p>
  2309. <p>This option enables the extraction of object files with GIMPLE bytecode out
  2310. of library archives. This improves the quality of optimization by exposing
  2311. more code to the link-time optimizer. This information specifies what
  2312. symbols can be accessed externally (by non-LTO object or during dynamic
  2313. linking). Resulting code quality improvements on binaries (and shared
  2314. libraries that use hidden visibility) are similar to <samp>-fwhole-program</samp>.
  2315. See <samp>-flto</samp> for a description of the effect of this flag and how to
  2316. use it.
  2317. </p>
  2318. <p>This option is enabled by default when LTO support in GCC is enabled
  2319. and GCC was configured for use with
  2320. a linker supporting plugins (GNU ld 2.21 or newer or gold).
  2321. </p>
  2322. </dd>
  2323. <dt><code>-ffat-lto-objects</code></dt>
  2324. <dd><a name="index-ffat_002dlto_002dobjects"></a>
  2325. <p>Fat LTO objects are object files that contain both the intermediate language
  2326. and the object code. This makes them usable for both LTO linking and normal
  2327. linking. This option is effective only when compiling with <samp>-flto</samp>
  2328. and is ignored at link time.
  2329. </p>
  2330. <p><samp>-fno-fat-lto-objects</samp> improves compilation time over plain LTO, but
  2331. requires the complete toolchain to be aware of LTO. It requires a linker with
  2332. linker plugin support for basic functionality. Additionally,
  2333. <code>nm</code>, <code>ar</code> and <code>ranlib</code>
  2334. need to support linker plugins to allow a full-featured build environment
  2335. (capable of building static libraries etc). GCC provides the <code>gcc-ar</code>,
  2336. <code>gcc-nm</code>, <code>gcc-ranlib</code> wrappers to pass the right options
  2337. to these tools. With non fat LTO makefiles need to be modified to use them.
  2338. </p>
  2339. <p>The default is <samp>-fno-fat-lto-objects</samp> on targets with linker plugin
  2340. support.
  2341. </p>
  2342. </dd>
  2343. <dt><code>-fcompare-elim</code></dt>
  2344. <dd><a name="index-fcompare_002delim"></a>
  2345. <p>After register allocation and post-register allocation instruction splitting,
  2346. identify arithmetic instructions that compute processor flags similar to a
  2347. comparison operation based on that arithmetic. If possible, eliminate the
  2348. explicit comparison operation.
  2349. </p>
  2350. <p>This pass only applies to certain targets that cannot explicitly represent
  2351. the comparison operation before register allocation is complete.
  2352. </p>
  2353. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  2354. </p>
  2355. </dd>
  2356. <dt><code>-fcprop-registers</code></dt>
  2357. <dd><a name="index-fcprop_002dregisters"></a>
  2358. <p>After register allocation and post-register allocation instruction splitting,
  2359. perform a copy-propagation pass to try to reduce scheduling dependencies
  2360. and occasionally eliminate the copy.
  2361. </p>
  2362. <p>Enabled at levels <samp>-O</samp>, <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  2363. </p>
  2364. </dd>
  2365. <dt><code>-fprofile-correction</code></dt>
  2366. <dd><a name="index-fprofile_002dcorrection"></a>
  2367. <p>Profiles collected using an instrumented binary for multi-threaded programs may
  2368. be inconsistent due to missed counter updates. When this option is specified,
  2369. GCC uses heuristics to correct or smooth out such inconsistencies. By
  2370. default, GCC emits an error message when an inconsistent profile is detected.
  2371. </p>
  2372. </dd>
  2373. <dt><code>-fprofile-use</code></dt>
  2374. <dt><code>-fprofile-use=<var>path</var></code></dt>
  2375. <dd><a name="index-fprofile_002duse"></a>
  2376. <p>Enable profile feedback-directed optimizations,
  2377. and the following optimizations
  2378. which are generally profitable only with profile feedback available:
  2379. <samp>-fbranch-probabilities</samp>, <samp>-fvpt</samp>,
  2380. <samp>-funroll-loops</samp>, <samp>-fpeel-loops</samp>, <samp>-ftracer</samp>,
  2381. <samp>-ftree-vectorize</samp>, and <samp>ftree-loop-distribute-patterns</samp>.
  2382. </p>
  2383. <p>Before you can use this option, you must first generate profiling information.
  2384. See <a href="Instrumentation-Options.html#Instrumentation-Options">Instrumentation Options</a>, for information about the
  2385. <samp>-fprofile-generate</samp> option.
  2386. </p>
  2387. <p>By default, GCC emits an error message if the feedback profiles do not
  2388. match the source code. This error can be turned into a warning by using
  2389. <samp>-Wcoverage-mismatch</samp>. Note this may result in poorly optimized
  2390. code.
  2391. </p>
  2392. <p>If <var>path</var> is specified, GCC looks at the <var>path</var> to find
  2393. the profile feedback data files. See <samp>-fprofile-dir</samp>.
  2394. </p>
  2395. </dd>
  2396. <dt><code>-fauto-profile</code></dt>
  2397. <dt><code>-fauto-profile=<var>path</var></code></dt>
  2398. <dd><a name="index-fauto_002dprofile"></a>
  2399. <p>Enable sampling-based feedback-directed optimizations,
  2400. and the following optimizations
  2401. which are generally profitable only with profile feedback available:
  2402. <samp>-fbranch-probabilities</samp>, <samp>-fvpt</samp>,
  2403. <samp>-funroll-loops</samp>, <samp>-fpeel-loops</samp>, <samp>-ftracer</samp>,
  2404. <samp>-ftree-vectorize</samp>,
  2405. <samp>-finline-functions</samp>, <samp>-fipa-cp</samp>, <samp>-fipa-cp-clone</samp>,
  2406. <samp>-fpredictive-commoning</samp>, <samp>-funswitch-loops</samp>,
  2407. <samp>-fgcse-after-reload</samp>, and <samp>-ftree-loop-distribute-patterns</samp>.
  2408. </p>
  2409. <p><var>path</var> is the name of a file containing AutoFDO profile information.
  2410. If omitted, it defaults to <samp>fbdata.afdo</samp> in the current directory.
  2411. </p>
  2412. <p>Producing an AutoFDO profile data file requires running your program
  2413. with the <code>perf</code> utility on a supported GNU/Linux target system.
  2414. For more information, see <a href="https://perf.wiki.kernel.org/">https://perf.wiki.kernel.org/</a>.
  2415. </p>
  2416. <p>E.g.
  2417. </p><div class="smallexample">
  2418. <pre class="smallexample">perf record -e br_inst_retired:near_taken -b -o perf.data \
  2419. -- your_program
  2420. </pre></div>
  2421. <p>Then use the <code>create_gcov</code> tool to convert the raw profile data
  2422. to a format that can be used by GCC.&nbsp; You must also supply the
  2423. unstripped binary for your program to this tool.
  2424. See <a href="https://github.com/google/autofdo">https://github.com/google/autofdo</a>.
  2425. </p>
  2426. <p>E.g.
  2427. </p><div class="smallexample">
  2428. <pre class="smallexample">create_gcov --binary=your_program.unstripped --profile=perf.data \
  2429. --gcov=profile.afdo
  2430. </pre></div>
  2431. </dd>
  2432. </dl>
  2433. <p>The following options control compiler behavior regarding floating-point
  2434. arithmetic. These options trade off between speed and
  2435. correctness. All must be specifically enabled.
  2436. </p>
  2437. <dl compact="compact">
  2438. <dt><code>-ffloat-store</code></dt>
  2439. <dd><a name="index-ffloat_002dstore"></a>
  2440. <p>Do not store floating-point variables in registers, and inhibit other
  2441. options that might change whether a floating-point value is taken from a
  2442. register or memory.
  2443. </p>
  2444. <a name="index-floating_002dpoint-precision"></a>
  2445. <p>This option prevents undesirable excess precision on machines such as
  2446. the 68000 where the floating registers (of the 68881) keep more
  2447. precision than a <code>double</code> is supposed to have. Similarly for the
  2448. x86 architecture. For most programs, the excess precision does only
  2449. good, but a few programs rely on the precise definition of IEEE floating
  2450. point. Use <samp>-ffloat-store</samp> for such programs, after modifying
  2451. them to store all pertinent intermediate computations into variables.
  2452. </p>
  2453. </dd>
  2454. <dt><code>-fexcess-precision=<var>style</var></code></dt>
  2455. <dd><a name="index-fexcess_002dprecision"></a>
  2456. <p>This option allows further control over excess precision on machines
  2457. where floating-point operations occur in a format with more precision or
  2458. range than the IEEE standard and interchange floating-point types. By
  2459. default, <samp>-fexcess-precision=fast</samp> is in effect; this means that
  2460. operations may be carried out in a wider precision than the types specified
  2461. in the source if that would result in faster code, and it is unpredictable
  2462. when rounding to the types specified in the source code takes place.
  2463. When compiling C, if <samp>-fexcess-precision=standard</samp> is specified then
  2464. excess precision follows the rules specified in ISO C99; in particular,
  2465. both casts and assignments cause values to be rounded to their
  2466. semantic types (whereas <samp>-ffloat-store</samp> only affects
  2467. assignments). This option is enabled by default for C if a strict
  2468. conformance option such as <samp>-std=c99</samp> is used.
  2469. <samp>-ffast-math</samp> enables <samp>-fexcess-precision=fast</samp> by default
  2470. regardless of whether a strict conformance option is used.
  2471. </p>
  2472. <a name="index-mfpmath"></a>
  2473. <p><samp>-fexcess-precision=standard</samp> is not implemented for languages
  2474. other than C. On the x86, it has no effect if <samp>-mfpmath=sse</samp>
  2475. or <samp>-mfpmath=sse+387</samp> is specified; in the former case, IEEE
  2476. semantics apply without excess precision, and in the latter, rounding
  2477. is unpredictable.
  2478. </p>
  2479. </dd>
  2480. <dt><code>-ffast-math</code></dt>
  2481. <dd><a name="index-ffast_002dmath"></a>
  2482. <p>Sets the options <samp>-fno-math-errno</samp>, <samp>-funsafe-math-optimizations</samp>,
  2483. <samp>-ffinite-math-only</samp>, <samp>-fno-rounding-math</samp>,
  2484. <samp>-fno-signaling-nans</samp>, <samp>-fcx-limited-range</samp> and
  2485. <samp>-fexcess-precision=fast</samp>.
  2486. </p>
  2487. <p>This option causes the preprocessor macro <code>__FAST_MATH__</code> to be defined.
  2488. </p>
  2489. <p>This option is not turned on by any <samp>-O</samp> option besides
  2490. <samp>-Ofast</samp> since it can result in incorrect output for programs
  2491. that depend on an exact implementation of IEEE or ISO rules/specifications
  2492. for math functions. It may, however, yield faster code for programs
  2493. that do not require the guarantees of these specifications.
  2494. </p>
  2495. </dd>
  2496. <dt><code>-fno-math-errno</code></dt>
  2497. <dd><a name="index-fno_002dmath_002derrno"></a>
  2498. <p>Do not set <code>errno</code> after calling math functions that are executed
  2499. with a single instruction, e.g., <code>sqrt</code>. A program that relies on
  2500. IEEE exceptions for math error handling may want to use this flag
  2501. for speed while maintaining IEEE arithmetic compatibility.
  2502. </p>
  2503. <p>This option is not turned on by any <samp>-O</samp> option since
  2504. it can result in incorrect output for programs that depend on
  2505. an exact implementation of IEEE or ISO rules/specifications for
  2506. math functions. It may, however, yield faster code for programs
  2507. that do not require the guarantees of these specifications.
  2508. </p>
  2509. <p>The default is <samp>-fmath-errno</samp>.
  2510. </p>
  2511. <p>On Darwin systems, the math library never sets <code>errno</code>. There is
  2512. therefore no reason for the compiler to consider the possibility that
  2513. it might, and <samp>-fno-math-errno</samp> is the default.
  2514. </p>
  2515. </dd>
  2516. <dt><code>-funsafe-math-optimizations</code></dt>
  2517. <dd><a name="index-funsafe_002dmath_002doptimizations"></a>
  2518. <p>Allow optimizations for floating-point arithmetic that (a) assume
  2519. that arguments and results are valid and (b) may violate IEEE or
  2520. ANSI standards. When used at link time, it may include libraries
  2521. or startup files that change the default FPU control word or other
  2522. similar optimizations.
  2523. </p>
  2524. <p>This option is not turned on by any <samp>-O</samp> option since
  2525. it can result in incorrect output for programs that depend on
  2526. an exact implementation of IEEE or ISO rules/specifications for
  2527. math functions. It may, however, yield faster code for programs
  2528. that do not require the guarantees of these specifications.
  2529. Enables <samp>-fno-signed-zeros</samp>, <samp>-fno-trapping-math</samp>,
  2530. <samp>-fassociative-math</samp> and <samp>-freciprocal-math</samp>.
  2531. </p>
  2532. <p>The default is <samp>-fno-unsafe-math-optimizations</samp>.
  2533. </p>
  2534. </dd>
  2535. <dt><code>-fassociative-math</code></dt>
  2536. <dd><a name="index-fassociative_002dmath"></a>
  2537. <p>Allow re-association of operands in series of floating-point operations.
  2538. This violates the ISO C and C++ language standard by possibly changing
  2539. computation result. NOTE: re-ordering may change the sign of zero as
  2540. well as ignore NaNs and inhibit or create underflow or overflow (and
  2541. thus cannot be used on code that relies on rounding behavior like
  2542. <code>(x + 2**52) - 2**52</code>. May also reorder floating-point comparisons
  2543. and thus may not be used when ordered comparisons are required.
  2544. This option requires that both <samp>-fno-signed-zeros</samp> and
  2545. <samp>-fno-trapping-math</samp> be in effect. Moreover, it doesn&rsquo;t make
  2546. much sense with <samp>-frounding-math</samp>. For Fortran the option
  2547. is automatically enabled when both <samp>-fno-signed-zeros</samp> and
  2548. <samp>-fno-trapping-math</samp> are in effect.
  2549. </p>
  2550. <p>The default is <samp>-fno-associative-math</samp>.
  2551. </p>
  2552. </dd>
  2553. <dt><code>-freciprocal-math</code></dt>
  2554. <dd><a name="index-freciprocal_002dmath"></a>
  2555. <p>Allow the reciprocal of a value to be used instead of dividing by
  2556. the value if this enables optimizations. For example <code>x / y</code>
  2557. can be replaced with <code>x * (1/y)</code>, which is useful if <code>(1/y)</code>
  2558. is subject to common subexpression elimination. Note that this loses
  2559. precision and increases the number of flops operating on the value.
  2560. </p>
  2561. <p>The default is <samp>-fno-reciprocal-math</samp>.
  2562. </p>
  2563. </dd>
  2564. <dt><code>-ffinite-math-only</code></dt>
  2565. <dd><a name="index-ffinite_002dmath_002donly"></a>
  2566. <p>Allow optimizations for floating-point arithmetic that assume
  2567. that arguments and results are not NaNs or +-Infs.
  2568. </p>
  2569. <p>This option is not turned on by any <samp>-O</samp> option since
  2570. it can result in incorrect output for programs that depend on
  2571. an exact implementation of IEEE or ISO rules/specifications for
  2572. math functions. It may, however, yield faster code for programs
  2573. that do not require the guarantees of these specifications.
  2574. </p>
  2575. <p>The default is <samp>-fno-finite-math-only</samp>.
  2576. </p>
  2577. </dd>
  2578. <dt><code>-fno-signed-zeros</code></dt>
  2579. <dd><a name="index-fno_002dsigned_002dzeros"></a>
  2580. <p>Allow optimizations for floating-point arithmetic that ignore the
  2581. signedness of zero. IEEE arithmetic specifies the behavior of
  2582. distinct +0.0 and -0.0 values, which then prohibits simplification
  2583. of expressions such as x+0.0 or 0.0*x (even with <samp>-ffinite-math-only</samp>).
  2584. This option implies that the sign of a zero result isn&rsquo;t significant.
  2585. </p>
  2586. <p>The default is <samp>-fsigned-zeros</samp>.
  2587. </p>
  2588. </dd>
  2589. <dt><code>-fno-trapping-math</code></dt>
  2590. <dd><a name="index-fno_002dtrapping_002dmath"></a>
  2591. <p>Compile code assuming that floating-point operations cannot generate
  2592. user-visible traps. These traps include division by zero, overflow,
  2593. underflow, inexact result and invalid operation. This option requires
  2594. that <samp>-fno-signaling-nans</samp> be in effect. Setting this option may
  2595. allow faster code if one relies on &ldquo;non-stop&rdquo; IEEE arithmetic, for example.
  2596. </p>
  2597. <p>This option should never be turned on by any <samp>-O</samp> option since
  2598. it can result in incorrect output for programs that depend on
  2599. an exact implementation of IEEE or ISO rules/specifications for
  2600. math functions.
  2601. </p>
  2602. <p>The default is <samp>-ftrapping-math</samp>.
  2603. </p>
  2604. </dd>
  2605. <dt><code>-frounding-math</code></dt>
  2606. <dd><a name="index-frounding_002dmath"></a>
  2607. <p>Disable transformations and optimizations that assume default floating-point
  2608. rounding behavior. This is round-to-zero for all floating point
  2609. to integer conversions, and round-to-nearest for all other arithmetic
  2610. truncations. This option should be specified for programs that change
  2611. the FP rounding mode dynamically, or that may be executed with a
  2612. non-default rounding mode. This option disables constant folding of
  2613. floating-point expressions at compile time (which may be affected by
  2614. rounding mode) and arithmetic transformations that are unsafe in the
  2615. presence of sign-dependent rounding modes.
  2616. </p>
  2617. <p>The default is <samp>-fno-rounding-math</samp>.
  2618. </p>
  2619. <p>This option is experimental and does not currently guarantee to
  2620. disable all GCC optimizations that are affected by rounding mode.
  2621. Future versions of GCC may provide finer control of this setting
  2622. using C99&rsquo;s <code>FENV_ACCESS</code> pragma. This command-line option
  2623. will be used to specify the default state for <code>FENV_ACCESS</code>.
  2624. </p>
  2625. </dd>
  2626. <dt><code>-fsignaling-nans</code></dt>
  2627. <dd><a name="index-fsignaling_002dnans"></a>
  2628. <p>Compile code assuming that IEEE signaling NaNs may generate user-visible
  2629. traps during floating-point operations. Setting this option disables
  2630. optimizations that may change the number of exceptions visible with
  2631. signaling NaNs. This option implies <samp>-ftrapping-math</samp>.
  2632. </p>
  2633. <p>This option causes the preprocessor macro <code>__SUPPORT_SNAN__</code> to
  2634. be defined.
  2635. </p>
  2636. <p>The default is <samp>-fno-signaling-nans</samp>.
  2637. </p>
  2638. <p>This option is experimental and does not currently guarantee to
  2639. disable all GCC optimizations that affect signaling NaN behavior.
  2640. </p>
  2641. </dd>
  2642. <dt><code>-fno-fp-int-builtin-inexact</code></dt>
  2643. <dd><a name="index-fno_002dfp_002dint_002dbuiltin_002dinexact"></a>
  2644. <p>Do not allow the built-in functions <code>ceil</code>, <code>floor</code>,
  2645. <code>round</code> and <code>trunc</code>, and their <code>float</code> and <code>long
  2646. double</code> variants, to generate code that raises the &ldquo;inexact&rdquo;
  2647. floating-point exception for noninteger arguments. ISO C99 and C11
  2648. allow these functions to raise the &ldquo;inexact&rdquo; exception, but ISO/IEC
  2649. TS 18661-1:2014, the C bindings to IEEE 754-2008, does not allow these
  2650. functions to do so.
  2651. </p>
  2652. <p>The default is <samp>-ffp-int-builtin-inexact</samp>, allowing the
  2653. exception to be raised. This option does nothing unless
  2654. <samp>-ftrapping-math</samp> is in effect.
  2655. </p>
  2656. <p>Even if <samp>-fno-fp-int-builtin-inexact</samp> is used, if the functions
  2657. generate a call to a library function then the &ldquo;inexact&rdquo; exception
  2658. may be raised if the library implementation does not follow TS 18661.
  2659. </p>
  2660. </dd>
  2661. <dt><code>-fsingle-precision-constant</code></dt>
  2662. <dd><a name="index-fsingle_002dprecision_002dconstant"></a>
  2663. <p>Treat floating-point constants as single precision instead of
  2664. implicitly converting them to double-precision constants.
  2665. </p>
  2666. </dd>
  2667. <dt><code>-fcx-limited-range</code></dt>
  2668. <dd><a name="index-fcx_002dlimited_002drange"></a>
  2669. <p>When enabled, this option states that a range reduction step is not
  2670. needed when performing complex division. Also, there is no checking
  2671. whether the result of a complex multiplication or division is <code>NaN
  2672. + I*NaN</code>, with an attempt to rescue the situation in that case. The
  2673. default is <samp>-fno-cx-limited-range</samp>, but is enabled by
  2674. <samp>-ffast-math</samp>.
  2675. </p>
  2676. <p>This option controls the default setting of the ISO C99
  2677. <code>CX_LIMITED_RANGE</code> pragma. Nevertheless, the option applies to
  2678. all languages.
  2679. </p>
  2680. </dd>
  2681. <dt><code>-fcx-fortran-rules</code></dt>
  2682. <dd><a name="index-fcx_002dfortran_002drules"></a>
  2683. <p>Complex multiplication and division follow Fortran rules. Range
  2684. reduction is done as part of complex division, but there is no checking
  2685. whether the result of a complex multiplication or division is <code>NaN
  2686. + I*NaN</code>, with an attempt to rescue the situation in that case.
  2687. </p>
  2688. <p>The default is <samp>-fno-cx-fortran-rules</samp>.
  2689. </p>
  2690. </dd>
  2691. </dl>
  2692. <p>The following options control optimizations that may improve
  2693. performance, but are not enabled by any <samp>-O</samp> options. This
  2694. section includes experimental options that may produce broken code.
  2695. </p>
  2696. <dl compact="compact">
  2697. <dt><code>-fbranch-probabilities</code></dt>
  2698. <dd><a name="index-fbranch_002dprobabilities"></a>
  2699. <p>After running a program compiled with <samp>-fprofile-arcs</samp>
  2700. (see <a href="Instrumentation-Options.html#Instrumentation-Options">Instrumentation Options</a>),
  2701. you can compile it a second time using
  2702. <samp>-fbranch-probabilities</samp>, to improve optimizations based on
  2703. the number of times each branch was taken. When a program
  2704. compiled with <samp>-fprofile-arcs</samp> exits, it saves arc execution
  2705. counts to a file called <samp><var>sourcename</var>.gcda</samp> for each source
  2706. file. The information in this data file is very dependent on the
  2707. structure of the generated code, so you must use the same source code
  2708. and the same optimization options for both compilations.
  2709. </p>
  2710. <p>With <samp>-fbranch-probabilities</samp>, GCC puts a
  2711. &lsquo;<samp>REG_BR_PROB</samp>&rsquo; note on each &lsquo;<samp>JUMP_INSN</samp>&rsquo; and &lsquo;<samp>CALL_INSN</samp>&rsquo;.
  2712. These can be used to improve optimization. Currently, they are only
  2713. used in one place: in <samp>reorg.c</samp>, instead of guessing which path a
  2714. branch is most likely to take, the &lsquo;<samp>REG_BR_PROB</samp>&rsquo; values are used to
  2715. exactly determine which path is taken more often.
  2716. </p>
  2717. </dd>
  2718. <dt><code>-fprofile-values</code></dt>
  2719. <dd><a name="index-fprofile_002dvalues"></a>
  2720. <p>If combined with <samp>-fprofile-arcs</samp>, it adds code so that some
  2721. data about values of expressions in the program is gathered.
  2722. </p>
  2723. <p>With <samp>-fbranch-probabilities</samp>, it reads back the data gathered
  2724. from profiling values of expressions for usage in optimizations.
  2725. </p>
  2726. <p>Enabled with <samp>-fprofile-generate</samp> and <samp>-fprofile-use</samp>.
  2727. </p>
  2728. </dd>
  2729. <dt><code>-fprofile-reorder-functions</code></dt>
  2730. <dd><a name="index-fprofile_002dreorder_002dfunctions"></a>
  2731. <p>Function reordering based on profile instrumentation collects
  2732. first time of execution of a function and orders these functions
  2733. in ascending order.
  2734. </p>
  2735. <p>Enabled with <samp>-fprofile-use</samp>.
  2736. </p>
  2737. </dd>
  2738. <dt><code>-fvpt</code></dt>
  2739. <dd><a name="index-fvpt"></a>
  2740. <p>If combined with <samp>-fprofile-arcs</samp>, this option instructs the compiler
  2741. to add code to gather information about values of expressions.
  2742. </p>
  2743. <p>With <samp>-fbranch-probabilities</samp>, it reads back the data gathered
  2744. and actually performs the optimizations based on them.
  2745. Currently the optimizations include specialization of division operations
  2746. using the knowledge about the value of the denominator.
  2747. </p>
  2748. </dd>
  2749. <dt><code>-frename-registers</code></dt>
  2750. <dd><a name="index-frename_002dregisters"></a>
  2751. <p>Attempt to avoid false dependencies in scheduled code by making use
  2752. of registers left over after register allocation. This optimization
  2753. most benefits processors with lots of registers. Depending on the
  2754. debug information format adopted by the target, however, it can
  2755. make debugging impossible, since variables no longer stay in
  2756. a &ldquo;home register&rdquo;.
  2757. </p>
  2758. <p>Enabled by default with <samp>-funroll-loops</samp>.
  2759. </p>
  2760. </dd>
  2761. <dt><code>-fschedule-fusion</code></dt>
  2762. <dd><a name="index-fschedule_002dfusion"></a>
  2763. <p>Performs a target dependent pass over the instruction stream to schedule
  2764. instructions of same type together because target machine can execute them
  2765. more efficiently if they are adjacent to each other in the instruction flow.
  2766. </p>
  2767. <p>Enabled at levels <samp>-O2</samp>, <samp>-O3</samp>, <samp>-Os</samp>.
  2768. </p>
  2769. </dd>
  2770. <dt><code>-ftracer</code></dt>
  2771. <dd><a name="index-ftracer"></a>
  2772. <p>Perform tail duplication to enlarge superblock size. This transformation
  2773. simplifies the control flow of the function allowing other optimizations to do
  2774. a better job.
  2775. </p>
  2776. <p>Enabled with <samp>-fprofile-use</samp>.
  2777. </p>
  2778. </dd>
  2779. <dt><code>-funroll-loops</code></dt>
  2780. <dd><a name="index-funroll_002dloops"></a>
  2781. <p>Unroll loops whose number of iterations can be determined at compile time or
  2782. upon entry to the loop. <samp>-funroll-loops</samp> implies
  2783. <samp>-frerun-cse-after-loop</samp>, <samp>-fweb</samp> and <samp>-frename-registers</samp>.
  2784. It also turns on complete loop peeling (i.e. complete removal of loops with
  2785. a small constant number of iterations). This option makes code larger, and may
  2786. or may not make it run faster.
  2787. </p>
  2788. <p>Enabled with <samp>-fprofile-use</samp>.
  2789. </p>
  2790. </dd>
  2791. <dt><code>-funroll-all-loops</code></dt>
  2792. <dd><a name="index-funroll_002dall_002dloops"></a>
  2793. <p>Unroll all loops, even if their number of iterations is uncertain when
  2794. the loop is entered. This usually makes programs run more slowly.
  2795. <samp>-funroll-all-loops</samp> implies the same options as
  2796. <samp>-funroll-loops</samp>.
  2797. </p>
  2798. </dd>
  2799. <dt><code>-fpeel-loops</code></dt>
  2800. <dd><a name="index-fpeel_002dloops"></a>
  2801. <p>Peels loops for which there is enough information that they do not
  2802. roll much (from profile feedback or static analysis). It also turns on
  2803. complete loop peeling (i.e. complete removal of loops with small constant
  2804. number of iterations).
  2805. </p>
  2806. <p>Enabled with <samp>-O3</samp> and/or <samp>-fprofile-use</samp>.
  2807. </p>
  2808. </dd>
  2809. <dt><code>-fmove-loop-invariants</code></dt>
  2810. <dd><a name="index-fmove_002dloop_002dinvariants"></a>
  2811. <p>Enables the loop invariant motion pass in the RTL loop optimizer. Enabled
  2812. at level <samp>-O1</samp>
  2813. </p>
  2814. </dd>
  2815. <dt><code>-fsplit-loops</code></dt>
  2816. <dd><a name="index-fsplit_002dloops"></a>
  2817. <p>Split a loop into two if it contains a condition that&rsquo;s always true
  2818. for one side of the iteration space and false for the other.
  2819. </p>
  2820. </dd>
  2821. <dt><code>-funswitch-loops</code></dt>
  2822. <dd><a name="index-funswitch_002dloops"></a>
  2823. <p>Move branches with loop invariant conditions out of the loop, with duplicates
  2824. of the loop on both branches (modified according to result of the condition).
  2825. </p>
  2826. </dd>
  2827. <dt><code>-ffunction-sections</code></dt>
  2828. <dt><code>-fdata-sections</code></dt>
  2829. <dd><a name="index-ffunction_002dsections"></a>
  2830. <a name="index-fdata_002dsections"></a>
  2831. <p>Place each function or data item into its own section in the output
  2832. file if the target supports arbitrary sections. The name of the
  2833. function or the name of the data item determines the section&rsquo;s name
  2834. in the output file.
  2835. </p>
  2836. <p>Use these options on systems where the linker can perform optimizations
  2837. to improve locality of reference in the instruction space. Most systems
  2838. using the ELF object format and SPARC processors running Solaris 2 have
  2839. linkers with such optimizations. AIX may have these optimizations in
  2840. the future.
  2841. </p>
  2842. <p>Only use these options when there are significant benefits from doing
  2843. so. When you specify these options, the assembler and linker
  2844. create larger object and executable files and are also slower.
  2845. You cannot use <code>gprof</code> on all systems if you
  2846. specify this option, and you may have problems with debugging if
  2847. you specify both this option and <samp>-g</samp>.
  2848. </p>
  2849. </dd>
  2850. <dt><code>-fbranch-target-load-optimize</code></dt>
  2851. <dd><a name="index-fbranch_002dtarget_002dload_002doptimize"></a>
  2852. <p>Perform branch target register load optimization before prologue / epilogue
  2853. threading.
  2854. The use of target registers can typically be exposed only during reload,
  2855. thus hoisting loads out of loops and doing inter-block scheduling needs
  2856. a separate optimization pass.
  2857. </p>
  2858. </dd>
  2859. <dt><code>-fbranch-target-load-optimize2</code></dt>
  2860. <dd><a name="index-fbranch_002dtarget_002dload_002doptimize2"></a>
  2861. <p>Perform branch target register load optimization after prologue / epilogue
  2862. threading.
  2863. </p>
  2864. </dd>
  2865. <dt><code>-fbtr-bb-exclusive</code></dt>
  2866. <dd><a name="index-fbtr_002dbb_002dexclusive"></a>
  2867. <p>When performing branch target register load optimization, don&rsquo;t reuse
  2868. branch target registers within any basic block.
  2869. </p>
  2870. </dd>
  2871. <dt><code>-fstdarg-opt</code></dt>
  2872. <dd><a name="index-fstdarg_002dopt"></a>
  2873. <p>Optimize the prologue of variadic argument functions with respect to usage of
  2874. those arguments.
  2875. </p>
  2876. </dd>
  2877. <dt><code>-fsection-anchors</code></dt>
  2878. <dd><a name="index-fsection_002danchors"></a>
  2879. <p>Try to reduce the number of symbolic address calculations by using
  2880. shared &ldquo;anchor&rdquo; symbols to address nearby objects. This transformation
  2881. can help to reduce the number of GOT entries and GOT accesses on some
  2882. targets.
  2883. </p>
  2884. <p>For example, the implementation of the following function <code>foo</code>:
  2885. </p>
  2886. <div class="smallexample">
  2887. <pre class="smallexample">static int a, b, c;
  2888. int foo (void) { return a + b + c; }
  2889. </pre></div>
  2890. <p>usually calculates the addresses of all three variables, but if you
  2891. compile it with <samp>-fsection-anchors</samp>, it accesses the variables
  2892. from a common anchor point instead. The effect is similar to the
  2893. following pseudocode (which isn&rsquo;t valid C):
  2894. </p>
  2895. <div class="smallexample">
  2896. <pre class="smallexample">int foo (void)
  2897. {
  2898. register int *xr = &amp;x;
  2899. return xr[&amp;a - &amp;x] + xr[&amp;b - &amp;x] + xr[&amp;c - &amp;x];
  2900. }
  2901. </pre></div>
  2902. <p>Not all targets support this option.
  2903. </p>
  2904. </dd>
  2905. <dt><code>--param <var>name</var>=<var>value</var></code></dt>
  2906. <dd><a name="index-param"></a>
  2907. <p>In some places, GCC uses various constants to control the amount of
  2908. optimization that is done. For example, GCC does not inline functions
  2909. that contain more than a certain number of instructions. You can
  2910. control some of these constants on the command line using the
  2911. <samp>--param</samp> option.
  2912. </p>
  2913. <p>The names of specific parameters, and the meaning of the values, are
  2914. tied to the internals of the compiler, and are subject to change
  2915. without notice in future releases.
  2916. </p>
  2917. <p>In each case, the <var>value</var> is an integer. The allowable choices for
  2918. <var>name</var> are:
  2919. </p>
  2920. <dl compact="compact">
  2921. <dt><code>predictable-branch-outcome</code></dt>
  2922. <dd><p>When branch is predicted to be taken with probability lower than this threshold
  2923. (in percent), then it is considered well predictable. The default is 10.
  2924. </p>
  2925. </dd>
  2926. <dt><code>max-rtl-if-conversion-insns</code></dt>
  2927. <dd><p>RTL if-conversion tries to remove conditional branches around a block and
  2928. replace them with conditionally executed instructions. This parameter
  2929. gives the maximum number of instructions in a block which should be
  2930. considered for if-conversion. The default is 10, though the compiler will
  2931. also use other heuristics to decide whether if-conversion is likely to be
  2932. profitable.
  2933. </p>
  2934. </dd>
  2935. <dt><code>max-rtl-if-conversion-predictable-cost</code></dt>
  2936. <dt><code>max-rtl-if-conversion-unpredictable-cost</code></dt>
  2937. <dd><p>RTL if-conversion will try to remove conditional branches around a block
  2938. and replace them with conditionally executed instructions. These parameters
  2939. give the maximum permissible cost for the sequence that would be generated
  2940. by if-conversion depending on whether the branch is statically determined
  2941. to be predictable or not. The units for this parameter are the same as
  2942. those for the GCC internal seq_cost metric. The compiler will try to
  2943. provide a reasonable default for this parameter using the BRANCH_COST
  2944. target macro.
  2945. </p>
  2946. </dd>
  2947. <dt><code>max-crossjump-edges</code></dt>
  2948. <dd><p>The maximum number of incoming edges to consider for cross-jumping.
  2949. The algorithm used by <samp>-fcrossjumping</samp> is <em>O(N^2)</em> in
  2950. the number of edges incoming to each block. Increasing values mean
  2951. more aggressive optimization, making the compilation time increase with
  2952. probably small improvement in executable size.
  2953. </p>
  2954. </dd>
  2955. <dt><code>min-crossjump-insns</code></dt>
  2956. <dd><p>The minimum number of instructions that must be matched at the end
  2957. of two blocks before cross-jumping is performed on them. This
  2958. value is ignored in the case where all instructions in the block being
  2959. cross-jumped from are matched. The default value is 5.
  2960. </p>
  2961. </dd>
  2962. <dt><code>max-grow-copy-bb-insns</code></dt>
  2963. <dd><p>The maximum code size expansion factor when copying basic blocks
  2964. instead of jumping. The expansion is relative to a jump instruction.
  2965. The default value is 8.
  2966. </p>
  2967. </dd>
  2968. <dt><code>max-goto-duplication-insns</code></dt>
  2969. <dd><p>The maximum number of instructions to duplicate to a block that jumps
  2970. to a computed goto. To avoid <em>O(N^2)</em> behavior in a number of
  2971. passes, GCC factors computed gotos early in the compilation process,
  2972. and unfactors them as late as possible. Only computed jumps at the
  2973. end of a basic blocks with no more than max-goto-duplication-insns are
  2974. unfactored. The default value is 8.
  2975. </p>
  2976. </dd>
  2977. <dt><code>max-delay-slot-insn-search</code></dt>
  2978. <dd><p>The maximum number of instructions to consider when looking for an
  2979. instruction to fill a delay slot. If more than this arbitrary number of
  2980. instructions are searched, the time savings from filling the delay slot
  2981. are minimal, so stop searching. Increasing values mean more
  2982. aggressive optimization, making the compilation time increase with probably
  2983. small improvement in execution time.
  2984. </p>
  2985. </dd>
  2986. <dt><code>max-delay-slot-live-search</code></dt>
  2987. <dd><p>When trying to fill delay slots, the maximum number of instructions to
  2988. consider when searching for a block with valid live register
  2989. information. Increasing this arbitrarily chosen value means more
  2990. aggressive optimization, increasing the compilation time. This parameter
  2991. should be removed when the delay slot code is rewritten to maintain the
  2992. control-flow graph.
  2993. </p>
  2994. </dd>
  2995. <dt><code>max-gcse-memory</code></dt>
  2996. <dd><p>The approximate maximum amount of memory that can be allocated in
  2997. order to perform the global common subexpression elimination
  2998. optimization. If more memory than specified is required, the
  2999. optimization is not done.
  3000. </p>
  3001. </dd>
  3002. <dt><code>max-gcse-insertion-ratio</code></dt>
  3003. <dd><p>If the ratio of expression insertions to deletions is larger than this value
  3004. for any expression, then RTL PRE inserts or removes the expression and thus
  3005. leaves partially redundant computations in the instruction stream. The default value is 20.
  3006. </p>
  3007. </dd>
  3008. <dt><code>max-pending-list-length</code></dt>
  3009. <dd><p>The maximum number of pending dependencies scheduling allows
  3010. before flushing the current state and starting over. Large functions
  3011. with few branches or calls can create excessively large lists which
  3012. needlessly consume memory and resources.
  3013. </p>
  3014. </dd>
  3015. <dt><code>max-modulo-backtrack-attempts</code></dt>
  3016. <dd><p>The maximum number of backtrack attempts the scheduler should make
  3017. when modulo scheduling a loop. Larger values can exponentially increase
  3018. compilation time.
  3019. </p>
  3020. </dd>
  3021. <dt><code>max-inline-insns-single</code></dt>
  3022. <dd><p>Several parameters control the tree inliner used in GCC.
  3023. This number sets the maximum number of instructions (counted in GCC&rsquo;s
  3024. internal representation) in a single function that the tree inliner
  3025. considers for inlining. This only affects functions declared
  3026. inline and methods implemented in a class declaration (C++).
  3027. The default value is 400.
  3028. </p>
  3029. </dd>
  3030. <dt><code>max-inline-insns-auto</code></dt>
  3031. <dd><p>When you use <samp>-finline-functions</samp> (included in <samp>-O3</samp>),
  3032. a lot of functions that would otherwise not be considered for inlining
  3033. by the compiler are investigated. To those functions, a different
  3034. (more restrictive) limit compared to functions declared inline can
  3035. be applied.
  3036. The default value is 40.
  3037. </p>
  3038. </dd>
  3039. <dt><code>inline-min-speedup</code></dt>
  3040. <dd><p>When estimated performance improvement of caller + callee runtime exceeds this
  3041. threshold (in percent), the function can be inlined regardless of the limit on
  3042. <samp>--param max-inline-insns-single</samp> and <samp>--param
  3043. max-inline-insns-auto</samp>.
  3044. </p>
  3045. </dd>
  3046. <dt><code>large-function-insns</code></dt>
  3047. <dd><p>The limit specifying really large functions. For functions larger than this
  3048. limit after inlining, inlining is constrained by
  3049. <samp>--param large-function-growth</samp>. This parameter is useful primarily
  3050. to avoid extreme compilation time caused by non-linear algorithms used by the
  3051. back end.
  3052. The default value is 2700.
  3053. </p>
  3054. </dd>
  3055. <dt><code>large-function-growth</code></dt>
  3056. <dd><p>Specifies maximal growth of large function caused by inlining in percents.
  3057. The default value is 100 which limits large function growth to 2.0 times
  3058. the original size.
  3059. </p>
  3060. </dd>
  3061. <dt><code>large-unit-insns</code></dt>
  3062. <dd><p>The limit specifying large translation unit. Growth caused by inlining of
  3063. units larger than this limit is limited by <samp>--param inline-unit-growth</samp>.
  3064. For small units this might be too tight.
  3065. For example, consider a unit consisting of function A
  3066. that is inline and B that just calls A three times. If B is small relative to
  3067. A, the growth of unit is 300\% and yet such inlining is very sane. For very
  3068. large units consisting of small inlineable functions, however, the overall unit
  3069. growth limit is needed to avoid exponential explosion of code size. Thus for
  3070. smaller units, the size is increased to <samp>--param large-unit-insns</samp>
  3071. before applying <samp>--param inline-unit-growth</samp>. The default is 10000.
  3072. </p>
  3073. </dd>
  3074. <dt><code>inline-unit-growth</code></dt>
  3075. <dd><p>Specifies maximal overall growth of the compilation unit caused by inlining.
  3076. The default value is 20 which limits unit growth to 1.2 times the original
  3077. size. Cold functions (either marked cold via an attribute or by profile
  3078. feedback) are not accounted into the unit size.
  3079. </p>
  3080. </dd>
  3081. <dt><code>ipcp-unit-growth</code></dt>
  3082. <dd><p>Specifies maximal overall growth of the compilation unit caused by
  3083. interprocedural constant propagation. The default value is 10 which limits
  3084. unit growth to 1.1 times the original size.
  3085. </p>
  3086. </dd>
  3087. <dt><code>large-stack-frame</code></dt>
  3088. <dd><p>The limit specifying large stack frames. While inlining the algorithm is trying
  3089. to not grow past this limit too much. The default value is 256 bytes.
  3090. </p>
  3091. </dd>
  3092. <dt><code>large-stack-frame-growth</code></dt>
  3093. <dd><p>Specifies maximal growth of large stack frames caused by inlining in percents.
  3094. The default value is 1000 which limits large stack frame growth to 11 times
  3095. the original size.
  3096. </p>
  3097. </dd>
  3098. <dt><code>max-inline-insns-recursive</code></dt>
  3099. <dt><code>max-inline-insns-recursive-auto</code></dt>
  3100. <dd><p>Specifies the maximum number of instructions an out-of-line copy of a
  3101. self-recursive inline
  3102. function can grow into by performing recursive inlining.
  3103. </p>
  3104. <p><samp>--param max-inline-insns-recursive</samp> applies to functions
  3105. declared inline.
  3106. For functions not declared inline, recursive inlining
  3107. happens only when <samp>-finline-functions</samp> (included in <samp>-O3</samp>) is
  3108. enabled; <samp>--param max-inline-insns-recursive-auto</samp> applies instead. The
  3109. default value is 450.
  3110. </p>
  3111. </dd>
  3112. <dt><code>max-inline-recursive-depth</code></dt>
  3113. <dt><code>max-inline-recursive-depth-auto</code></dt>
  3114. <dd><p>Specifies the maximum recursion depth used for recursive inlining.
  3115. </p>
  3116. <p><samp>--param max-inline-recursive-depth</samp> applies to functions
  3117. declared inline. For functions not declared inline, recursive inlining
  3118. happens only when <samp>-finline-functions</samp> (included in <samp>-O3</samp>) is
  3119. enabled; <samp>--param max-inline-recursive-depth-auto</samp> applies instead. The
  3120. default value is 8.
  3121. </p>
  3122. </dd>
  3123. <dt><code>min-inline-recursive-probability</code></dt>
  3124. <dd><p>Recursive inlining is profitable only for function having deep recursion
  3125. in average and can hurt for function having little recursion depth by
  3126. increasing the prologue size or complexity of function body to other
  3127. optimizers.
  3128. </p>
  3129. <p>When profile feedback is available (see <samp>-fprofile-generate</samp>) the actual
  3130. recursion depth can be guessed from the probability that function recurses
  3131. via a given call expression. This parameter limits inlining only to call
  3132. expressions whose probability exceeds the given threshold (in percents).
  3133. The default value is 10.
  3134. </p>
  3135. </dd>
  3136. <dt><code>early-inlining-insns</code></dt>
  3137. <dd><p>Specify growth that the early inliner can make. In effect it increases
  3138. the amount of inlining for code having a large abstraction penalty.
  3139. The default value is 14.
  3140. </p>
  3141. </dd>
  3142. <dt><code>max-early-inliner-iterations</code></dt>
  3143. <dd><p>Limit of iterations of the early inliner. This basically bounds
  3144. the number of nested indirect calls the early inliner can resolve.
  3145. Deeper chains are still handled by late inlining.
  3146. </p>
  3147. </dd>
  3148. <dt><code>comdat-sharing-probability</code></dt>
  3149. <dd><p>Probability (in percent) that C++ inline function with comdat visibility
  3150. are shared across multiple compilation units. The default value is 20.
  3151. </p>
  3152. </dd>
  3153. <dt><code>profile-func-internal-id</code></dt>
  3154. <dd><p>A parameter to control whether to use function internal id in profile
  3155. database lookup. If the value is 0, the compiler uses an id that
  3156. is based on function assembler name and filename, which makes old profile
  3157. data more tolerant to source changes such as function reordering etc.
  3158. The default value is 0.
  3159. </p>
  3160. </dd>
  3161. <dt><code>min-vect-loop-bound</code></dt>
  3162. <dd><p>The minimum number of iterations under which loops are not vectorized
  3163. when <samp>-ftree-vectorize</samp> is used. The number of iterations after
  3164. vectorization needs to be greater than the value specified by this option
  3165. to allow vectorization. The default value is 0.
  3166. </p>
  3167. </dd>
  3168. <dt><code>gcse-cost-distance-ratio</code></dt>
  3169. <dd><p>Scaling factor in calculation of maximum distance an expression
  3170. can be moved by GCSE optimizations. This is currently supported only in the
  3171. code hoisting pass. The bigger the ratio, the more aggressive code hoisting
  3172. is with simple expressions, i.e., the expressions that have cost
  3173. less than <samp>gcse-unrestricted-cost</samp>. Specifying 0 disables
  3174. hoisting of simple expressions. The default value is 10.
  3175. </p>
  3176. </dd>
  3177. <dt><code>gcse-unrestricted-cost</code></dt>
  3178. <dd><p>Cost, roughly measured as the cost of a single typical machine
  3179. instruction, at which GCSE optimizations do not constrain
  3180. the distance an expression can travel. This is currently
  3181. supported only in the code hoisting pass. The lesser the cost,
  3182. the more aggressive code hoisting is. Specifying 0
  3183. allows all expressions to travel unrestricted distances.
  3184. The default value is 3.
  3185. </p>
  3186. </dd>
  3187. <dt><code>max-hoist-depth</code></dt>
  3188. <dd><p>The depth of search in the dominator tree for expressions to hoist.
  3189. This is used to avoid quadratic behavior in hoisting algorithm.
  3190. The value of 0 does not limit on the search, but may slow down compilation
  3191. of huge functions. The default value is 30.
  3192. </p>
  3193. </dd>
  3194. <dt><code>max-tail-merge-comparisons</code></dt>
  3195. <dd><p>The maximum amount of similar bbs to compare a bb with. This is used to
  3196. avoid quadratic behavior in tree tail merging. The default value is 10.
  3197. </p>
  3198. </dd>
  3199. <dt><code>max-tail-merge-iterations</code></dt>
  3200. <dd><p>The maximum amount of iterations of the pass over the function. This is used to
  3201. limit compilation time in tree tail merging. The default value is 2.
  3202. </p>
  3203. </dd>
  3204. <dt><code>store-merging-allow-unaligned</code></dt>
  3205. <dd><p>Allow the store merging pass to introduce unaligned stores if it is legal to
  3206. do so. The default value is 1.
  3207. </p>
  3208. </dd>
  3209. <dt><code>max-stores-to-merge</code></dt>
  3210. <dd><p>The maximum number of stores to attempt to merge into wider stores in the store
  3211. merging pass. The minimum value is 2 and the default is 64.
  3212. </p>
  3213. </dd>
  3214. <dt><code>max-unrolled-insns</code></dt>
  3215. <dd><p>The maximum number of instructions that a loop may have to be unrolled.
  3216. If a loop is unrolled, this parameter also determines how many times
  3217. the loop code is unrolled.
  3218. </p>
  3219. </dd>
  3220. <dt><code>max-average-unrolled-insns</code></dt>
  3221. <dd><p>The maximum number of instructions biased by probabilities of their execution
  3222. that a loop may have to be unrolled. If a loop is unrolled,
  3223. this parameter also determines how many times the loop code is unrolled.
  3224. </p>
  3225. </dd>
  3226. <dt><code>max-unroll-times</code></dt>
  3227. <dd><p>The maximum number of unrollings of a single loop.
  3228. </p>
  3229. </dd>
  3230. <dt><code>max-peeled-insns</code></dt>
  3231. <dd><p>The maximum number of instructions that a loop may have to be peeled.
  3232. If a loop is peeled, this parameter also determines how many times
  3233. the loop code is peeled.
  3234. </p>
  3235. </dd>
  3236. <dt><code>max-peel-times</code></dt>
  3237. <dd><p>The maximum number of peelings of a single loop.
  3238. </p>
  3239. </dd>
  3240. <dt><code>max-peel-branches</code></dt>
  3241. <dd><p>The maximum number of branches on the hot path through the peeled sequence.
  3242. </p>
  3243. </dd>
  3244. <dt><code>max-completely-peeled-insns</code></dt>
  3245. <dd><p>The maximum number of insns of a completely peeled loop.
  3246. </p>
  3247. </dd>
  3248. <dt><code>max-completely-peel-times</code></dt>
  3249. <dd><p>The maximum number of iterations of a loop to be suitable for complete peeling.
  3250. </p>
  3251. </dd>
  3252. <dt><code>max-completely-peel-loop-nest-depth</code></dt>
  3253. <dd><p>The maximum depth of a loop nest suitable for complete peeling.
  3254. </p>
  3255. </dd>
  3256. <dt><code>max-unswitch-insns</code></dt>
  3257. <dd><p>The maximum number of insns of an unswitched loop.
  3258. </p>
  3259. </dd>
  3260. <dt><code>max-unswitch-level</code></dt>
  3261. <dd><p>The maximum number of branches unswitched in a single loop.
  3262. </p>
  3263. </dd>
  3264. <dt><code>max-loop-headers-insns</code></dt>
  3265. <dd><p>The maximum number of insns in loop header duplicated by the copy loop headers
  3266. pass.
  3267. </p>
  3268. </dd>
  3269. <dt><code>lim-expensive</code></dt>
  3270. <dd><p>The minimum cost of an expensive expression in the loop invariant motion.
  3271. </p>
  3272. </dd>
  3273. <dt><code>iv-consider-all-candidates-bound</code></dt>
  3274. <dd><p>Bound on number of candidates for induction variables, below which
  3275. all candidates are considered for each use in induction variable
  3276. optimizations. If there are more candidates than this,
  3277. only the most relevant ones are considered to avoid quadratic time complexity.
  3278. </p>
  3279. </dd>
  3280. <dt><code>iv-max-considered-uses</code></dt>
  3281. <dd><p>The induction variable optimizations give up on loops that contain more
  3282. induction variable uses.
  3283. </p>
  3284. </dd>
  3285. <dt><code>iv-always-prune-cand-set-bound</code></dt>
  3286. <dd><p>If the number of candidates in the set is smaller than this value,
  3287. always try to remove unnecessary ivs from the set
  3288. when adding a new one.
  3289. </p>
  3290. </dd>
  3291. <dt><code>avg-loop-niter</code></dt>
  3292. <dd><p>Average number of iterations of a loop.
  3293. </p>
  3294. </dd>
  3295. <dt><code>dse-max-object-size</code></dt>
  3296. <dd><p>Maximum size (in bytes) of objects tracked bytewise by dead store elimination.
  3297. Larger values may result in larger compilation times.
  3298. </p>
  3299. </dd>
  3300. <dt><code>scev-max-expr-size</code></dt>
  3301. <dd><p>Bound on size of expressions used in the scalar evolutions analyzer.
  3302. Large expressions slow the analyzer.
  3303. </p>
  3304. </dd>
  3305. <dt><code>scev-max-expr-complexity</code></dt>
  3306. <dd><p>Bound on the complexity of the expressions in the scalar evolutions analyzer.
  3307. Complex expressions slow the analyzer.
  3308. </p>
  3309. </dd>
  3310. <dt><code>max-tree-if-conversion-phi-args</code></dt>
  3311. <dd><p>Maximum number of arguments in a PHI supported by TREE if conversion
  3312. unless the loop is marked with simd pragma.
  3313. </p>
  3314. </dd>
  3315. <dt><code>vect-max-version-for-alignment-checks</code></dt>
  3316. <dd><p>The maximum number of run-time checks that can be performed when
  3317. doing loop versioning for alignment in the vectorizer.
  3318. </p>
  3319. </dd>
  3320. <dt><code>vect-max-version-for-alias-checks</code></dt>
  3321. <dd><p>The maximum number of run-time checks that can be performed when
  3322. doing loop versioning for alias in the vectorizer.
  3323. </p>
  3324. </dd>
  3325. <dt><code>vect-max-peeling-for-alignment</code></dt>
  3326. <dd><p>The maximum number of loop peels to enhance access alignment
  3327. for vectorizer. Value -1 means no limit.
  3328. </p>
  3329. </dd>
  3330. <dt><code>max-iterations-to-track</code></dt>
  3331. <dd><p>The maximum number of iterations of a loop the brute-force algorithm
  3332. for analysis of the number of iterations of the loop tries to evaluate.
  3333. </p>
  3334. </dd>
  3335. <dt><code>hot-bb-count-ws-permille</code></dt>
  3336. <dd><p>A basic block profile count is considered hot if it contributes to
  3337. the given permillage (i.e. 0...1000) of the entire profiled execution.
  3338. </p>
  3339. </dd>
  3340. <dt><code>hot-bb-frequency-fraction</code></dt>
  3341. <dd><p>Select fraction of the entry block frequency of executions of basic block in
  3342. function given basic block needs to have to be considered hot.
  3343. </p>
  3344. </dd>
  3345. <dt><code>max-predicted-iterations</code></dt>
  3346. <dd><p>The maximum number of loop iterations we predict statically. This is useful
  3347. in cases where a function contains a single loop with known bound and
  3348. another loop with unknown bound.
  3349. The known number of iterations is predicted correctly, while
  3350. the unknown number of iterations average to roughly 10. This means that the
  3351. loop without bounds appears artificially cold relative to the other one.
  3352. </p>
  3353. </dd>
  3354. <dt><code>builtin-expect-probability</code></dt>
  3355. <dd><p>Control the probability of the expression having the specified value. This
  3356. parameter takes a percentage (i.e. 0 ... 100) as input.
  3357. The default probability of 90 is obtained empirically.
  3358. </p>
  3359. </dd>
  3360. <dt><code>align-threshold</code></dt>
  3361. <dd>
  3362. <p>Select fraction of the maximal frequency of executions of a basic block in
  3363. a function to align the basic block.
  3364. </p>
  3365. </dd>
  3366. <dt><code>align-loop-iterations</code></dt>
  3367. <dd>
  3368. <p>A loop expected to iterate at least the selected number of iterations is
  3369. aligned.
  3370. </p>
  3371. </dd>
  3372. <dt><code>tracer-dynamic-coverage</code></dt>
  3373. <dt><code>tracer-dynamic-coverage-feedback</code></dt>
  3374. <dd>
  3375. <p>This value is used to limit superblock formation once the given percentage of
  3376. executed instructions is covered. This limits unnecessary code size
  3377. expansion.
  3378. </p>
  3379. <p>The <samp>tracer-dynamic-coverage-feedback</samp> parameter
  3380. is used only when profile
  3381. feedback is available. The real profiles (as opposed to statically estimated
  3382. ones) are much less balanced allowing the threshold to be larger value.
  3383. </p>
  3384. </dd>
  3385. <dt><code>tracer-max-code-growth</code></dt>
  3386. <dd><p>Stop tail duplication once code growth has reached given percentage. This is
  3387. a rather artificial limit, as most of the duplicates are eliminated later in
  3388. cross jumping, so it may be set to much higher values than is the desired code
  3389. growth.
  3390. </p>
  3391. </dd>
  3392. <dt><code>tracer-min-branch-ratio</code></dt>
  3393. <dd>
  3394. <p>Stop reverse growth when the reverse probability of best edge is less than this
  3395. threshold (in percent).
  3396. </p>
  3397. </dd>
  3398. <dt><code>tracer-min-branch-probability</code></dt>
  3399. <dt><code>tracer-min-branch-probability-feedback</code></dt>
  3400. <dd>
  3401. <p>Stop forward growth if the best edge has probability lower than this
  3402. threshold.
  3403. </p>
  3404. <p>Similarly to <samp>tracer-dynamic-coverage</samp> two parameters are
  3405. provided. <samp>tracer-min-branch-probability-feedback</samp> is used for
  3406. compilation with profile feedback and <samp>tracer-min-branch-probability</samp>
  3407. compilation without. The value for compilation with profile feedback
  3408. needs to be more conservative (higher) in order to make tracer
  3409. effective.
  3410. </p>
  3411. </dd>
  3412. <dt><code>max-cse-path-length</code></dt>
  3413. <dd>
  3414. <p>The maximum number of basic blocks on path that CSE considers.
  3415. The default is 10.
  3416. </p>
  3417. </dd>
  3418. <dt><code>max-cse-insns</code></dt>
  3419. <dd><p>The maximum number of instructions CSE processes before flushing.
  3420. The default is 1000.
  3421. </p>
  3422. </dd>
  3423. <dt><code>ggc-min-expand</code></dt>
  3424. <dd>
  3425. <p>GCC uses a garbage collector to manage its own memory allocation. This
  3426. parameter specifies the minimum percentage by which the garbage
  3427. collector&rsquo;s heap should be allowed to expand between collections.
  3428. Tuning this may improve compilation speed; it has no effect on code
  3429. generation.
  3430. </p>
  3431. <p>The default is 30% + 70% * (RAM/1GB) with an upper bound of 100% when
  3432. RAM &gt;= 1GB. If <code>getrlimit</code> is available, the notion of &ldquo;RAM&rdquo; is
  3433. the smallest of actual RAM and <code>RLIMIT_DATA</code> or <code>RLIMIT_AS</code>. If
  3434. GCC is not able to calculate RAM on a particular platform, the lower
  3435. bound of 30% is used. Setting this parameter and
  3436. <samp>ggc-min-heapsize</samp> to zero causes a full collection to occur at
  3437. every opportunity. This is extremely slow, but can be useful for
  3438. debugging.
  3439. </p>
  3440. </dd>
  3441. <dt><code>ggc-min-heapsize</code></dt>
  3442. <dd>
  3443. <p>Minimum size of the garbage collector&rsquo;s heap before it begins bothering
  3444. to collect garbage. The first collection occurs after the heap expands
  3445. by <samp>ggc-min-expand</samp>% beyond <samp>ggc-min-heapsize</samp>. Again,
  3446. tuning this may improve compilation speed, and has no effect on code
  3447. generation.
  3448. </p>
  3449. <p>The default is the smaller of RAM/8, RLIMIT_RSS, or a limit that
  3450. tries to ensure that RLIMIT_DATA or RLIMIT_AS are not exceeded, but
  3451. with a lower bound of 4096 (four megabytes) and an upper bound of
  3452. 131072 (128 megabytes). If GCC is not able to calculate RAM on a
  3453. particular platform, the lower bound is used. Setting this parameter
  3454. very large effectively disables garbage collection. Setting this
  3455. parameter and <samp>ggc-min-expand</samp> to zero causes a full collection
  3456. to occur at every opportunity.
  3457. </p>
  3458. </dd>
  3459. <dt><code>max-reload-search-insns</code></dt>
  3460. <dd><p>The maximum number of instruction reload should look backward for equivalent
  3461. register. Increasing values mean more aggressive optimization, making the
  3462. compilation time increase with probably slightly better performance.
  3463. The default value is 100.
  3464. </p>
  3465. </dd>
  3466. <dt><code>max-cselib-memory-locations</code></dt>
  3467. <dd><p>The maximum number of memory locations cselib should take into account.
  3468. Increasing values mean more aggressive optimization, making the compilation time
  3469. increase with probably slightly better performance. The default value is 500.
  3470. </p>
  3471. </dd>
  3472. <dt><code>max-sched-ready-insns</code></dt>
  3473. <dd><p>The maximum number of instructions ready to be issued the scheduler should
  3474. consider at any given time during the first scheduling pass. Increasing
  3475. values mean more thorough searches, making the compilation time increase
  3476. with probably little benefit. The default value is 100.
  3477. </p>
  3478. </dd>
  3479. <dt><code>max-sched-region-blocks</code></dt>
  3480. <dd><p>The maximum number of blocks in a region to be considered for
  3481. interblock scheduling. The default value is 10.
  3482. </p>
  3483. </dd>
  3484. <dt><code>max-pipeline-region-blocks</code></dt>
  3485. <dd><p>The maximum number of blocks in a region to be considered for
  3486. pipelining in the selective scheduler. The default value is 15.
  3487. </p>
  3488. </dd>
  3489. <dt><code>max-sched-region-insns</code></dt>
  3490. <dd><p>The maximum number of insns in a region to be considered for
  3491. interblock scheduling. The default value is 100.
  3492. </p>
  3493. </dd>
  3494. <dt><code>max-pipeline-region-insns</code></dt>
  3495. <dd><p>The maximum number of insns in a region to be considered for
  3496. pipelining in the selective scheduler. The default value is 200.
  3497. </p>
  3498. </dd>
  3499. <dt><code>min-spec-prob</code></dt>
  3500. <dd><p>The minimum probability (in percents) of reaching a source block
  3501. for interblock speculative scheduling. The default value is 40.
  3502. </p>
  3503. </dd>
  3504. <dt><code>max-sched-extend-regions-iters</code></dt>
  3505. <dd><p>The maximum number of iterations through CFG to extend regions.
  3506. A value of 0 (the default) disables region extensions.
  3507. </p>
  3508. </dd>
  3509. <dt><code>max-sched-insn-conflict-delay</code></dt>
  3510. <dd><p>The maximum conflict delay for an insn to be considered for speculative motion.
  3511. The default value is 3.
  3512. </p>
  3513. </dd>
  3514. <dt><code>sched-spec-prob-cutoff</code></dt>
  3515. <dd><p>The minimal probability of speculation success (in percents), so that
  3516. speculative insns are scheduled.
  3517. The default value is 40.
  3518. </p>
  3519. </dd>
  3520. <dt><code>sched-state-edge-prob-cutoff</code></dt>
  3521. <dd><p>The minimum probability an edge must have for the scheduler to save its
  3522. state across it.
  3523. The default value is 10.
  3524. </p>
  3525. </dd>
  3526. <dt><code>sched-mem-true-dep-cost</code></dt>
  3527. <dd><p>Minimal distance (in CPU cycles) between store and load targeting same
  3528. memory locations. The default value is 1.
  3529. </p>
  3530. </dd>
  3531. <dt><code>selsched-max-lookahead</code></dt>
  3532. <dd><p>The maximum size of the lookahead window of selective scheduling. It is a
  3533. depth of search for available instructions.
  3534. The default value is 50.
  3535. </p>
  3536. </dd>
  3537. <dt><code>selsched-max-sched-times</code></dt>
  3538. <dd><p>The maximum number of times that an instruction is scheduled during
  3539. selective scheduling. This is the limit on the number of iterations
  3540. through which the instruction may be pipelined. The default value is 2.
  3541. </p>
  3542. </dd>
  3543. <dt><code>selsched-insns-to-rename</code></dt>
  3544. <dd><p>The maximum number of best instructions in the ready list that are considered
  3545. for renaming in the selective scheduler. The default value is 2.
  3546. </p>
  3547. </dd>
  3548. <dt><code>sms-min-sc</code></dt>
  3549. <dd><p>The minimum value of stage count that swing modulo scheduler
  3550. generates. The default value is 2.
  3551. </p>
  3552. </dd>
  3553. <dt><code>max-last-value-rtl</code></dt>
  3554. <dd><p>The maximum size measured as number of RTLs that can be recorded in an expression
  3555. in combiner for a pseudo register as last known value of that register. The default
  3556. is 10000.
  3557. </p>
  3558. </dd>
  3559. <dt><code>max-combine-insns</code></dt>
  3560. <dd><p>The maximum number of instructions the RTL combiner tries to combine.
  3561. The default value is 2 at <samp>-Og</samp> and 4 otherwise.
  3562. </p>
  3563. </dd>
  3564. <dt><code>integer-share-limit</code></dt>
  3565. <dd><p>Small integer constants can use a shared data structure, reducing the
  3566. compiler&rsquo;s memory usage and increasing its speed. This sets the maximum
  3567. value of a shared integer constant. The default value is 256.
  3568. </p>
  3569. </dd>
  3570. <dt><code>ssp-buffer-size</code></dt>
  3571. <dd><p>The minimum size of buffers (i.e. arrays) that receive stack smashing
  3572. protection when <samp>-fstack-protection</samp> is used.
  3573. </p>
  3574. </dd>
  3575. <dt><code>min-size-for-stack-sharing</code></dt>
  3576. <dd><p>The minimum size of variables taking part in stack slot sharing when not
  3577. optimizing. The default value is 32.
  3578. </p>
  3579. </dd>
  3580. <dt><code>max-jump-thread-duplication-stmts</code></dt>
  3581. <dd><p>Maximum number of statements allowed in a block that needs to be
  3582. duplicated when threading jumps.
  3583. </p>
  3584. </dd>
  3585. <dt><code>max-fields-for-field-sensitive</code></dt>
  3586. <dd><p>Maximum number of fields in a structure treated in
  3587. a field sensitive manner during pointer analysis. The default is zero
  3588. for <samp>-O0</samp> and <samp>-O1</samp>,
  3589. and 100 for <samp>-Os</samp>, <samp>-O2</samp>, and <samp>-O3</samp>.
  3590. </p>
  3591. </dd>
  3592. <dt><code>prefetch-latency</code></dt>
  3593. <dd><p>Estimate on average number of instructions that are executed before
  3594. prefetch finishes. The distance prefetched ahead is proportional
  3595. to this constant. Increasing this number may also lead to less
  3596. streams being prefetched (see <samp>simultaneous-prefetches</samp>).
  3597. </p>
  3598. </dd>
  3599. <dt><code>simultaneous-prefetches</code></dt>
  3600. <dd><p>Maximum number of prefetches that can run at the same time.
  3601. </p>
  3602. </dd>
  3603. <dt><code>l1-cache-line-size</code></dt>
  3604. <dd><p>The size of cache line in L1 cache, in bytes.
  3605. </p>
  3606. </dd>
  3607. <dt><code>l1-cache-size</code></dt>
  3608. <dd><p>The size of L1 cache, in kilobytes.
  3609. </p>
  3610. </dd>
  3611. <dt><code>l2-cache-size</code></dt>
  3612. <dd><p>The size of L2 cache, in kilobytes.
  3613. </p>
  3614. </dd>
  3615. <dt><code>min-insn-to-prefetch-ratio</code></dt>
  3616. <dd><p>The minimum ratio between the number of instructions and the
  3617. number of prefetches to enable prefetching in a loop.
  3618. </p>
  3619. </dd>
  3620. <dt><code>prefetch-min-insn-to-mem-ratio</code></dt>
  3621. <dd><p>The minimum ratio between the number of instructions and the
  3622. number of memory references to enable prefetching in a loop.
  3623. </p>
  3624. </dd>
  3625. <dt><code>use-canonical-types</code></dt>
  3626. <dd><p>Whether the compiler should use the &ldquo;canonical&rdquo; type system. By
  3627. default, this should always be 1, which uses a more efficient internal
  3628. mechanism for comparing types in C++ and Objective-C++. However, if
  3629. bugs in the canonical type system are causing compilation failures,
  3630. set this value to 0 to disable canonical types.
  3631. </p>
  3632. </dd>
  3633. <dt><code>switch-conversion-max-branch-ratio</code></dt>
  3634. <dd><p>Switch initialization conversion refuses to create arrays that are
  3635. bigger than <samp>switch-conversion-max-branch-ratio</samp> times the number of
  3636. branches in the switch.
  3637. </p>
  3638. </dd>
  3639. <dt><code>max-partial-antic-length</code></dt>
  3640. <dd><p>Maximum length of the partial antic set computed during the tree
  3641. partial redundancy elimination optimization (<samp>-ftree-pre</samp>) when
  3642. optimizing at <samp>-O3</samp> and above. For some sorts of source code
  3643. the enhanced partial redundancy elimination optimization can run away,
  3644. consuming all of the memory available on the host machine. This
  3645. parameter sets a limit on the length of the sets that are computed,
  3646. which prevents the runaway behavior. Setting a value of 0 for
  3647. this parameter allows an unlimited set length.
  3648. </p>
  3649. </dd>
  3650. <dt><code>sccvn-max-scc-size</code></dt>
  3651. <dd><p>Maximum size of a strongly connected component (SCC) during SCCVN
  3652. processing. If this limit is hit, SCCVN processing for the whole
  3653. function is not done and optimizations depending on it are
  3654. disabled. The default maximum SCC size is 10000.
  3655. </p>
  3656. </dd>
  3657. <dt><code>sccvn-max-alias-queries-per-access</code></dt>
  3658. <dd><p>Maximum number of alias-oracle queries we perform when looking for
  3659. redundancies for loads and stores. If this limit is hit the search
  3660. is aborted and the load or store is not considered redundant. The
  3661. number of queries is algorithmically limited to the number of
  3662. stores on all paths from the load to the function entry.
  3663. The default maximum number of queries is 1000.
  3664. </p>
  3665. </dd>
  3666. <dt><code>ira-max-loops-num</code></dt>
  3667. <dd><p>IRA uses regional register allocation by default. If a function
  3668. contains more loops than the number given by this parameter, only at most
  3669. the given number of the most frequently-executed loops form regions
  3670. for regional register allocation. The default value of the
  3671. parameter is 100.
  3672. </p>
  3673. </dd>
  3674. <dt><code>ira-max-conflict-table-size</code></dt>
  3675. <dd><p>Although IRA uses a sophisticated algorithm to compress the conflict
  3676. table, the table can still require excessive amounts of memory for
  3677. huge functions. If the conflict table for a function could be more
  3678. than the size in MB given by this parameter, the register allocator
  3679. instead uses a faster, simpler, and lower-quality
  3680. algorithm that does not require building a pseudo-register conflict table.
  3681. The default value of the parameter is 2000.
  3682. </p>
  3683. </dd>
  3684. <dt><code>ira-loop-reserved-regs</code></dt>
  3685. <dd><p>IRA can be used to evaluate more accurate register pressure in loops
  3686. for decisions to move loop invariants (see <samp>-O3</samp>). The number
  3687. of available registers reserved for some other purposes is given
  3688. by this parameter. The default value of the parameter is 2, which is
  3689. the minimal number of registers needed by typical instructions.
  3690. This value is the best found from numerous experiments.
  3691. </p>
  3692. </dd>
  3693. <dt><code>lra-inheritance-ebb-probability-cutoff</code></dt>
  3694. <dd><p>LRA tries to reuse values reloaded in registers in subsequent insns.
  3695. This optimization is called inheritance. EBB is used as a region to
  3696. do this optimization. The parameter defines a minimal fall-through
  3697. edge probability in percentage used to add BB to inheritance EBB in
  3698. LRA. The default value of the parameter is 40. The value was chosen
  3699. from numerous runs of SPEC2000 on x86-64.
  3700. </p>
  3701. </dd>
  3702. <dt><code>loop-invariant-max-bbs-in-loop</code></dt>
  3703. <dd><p>Loop invariant motion can be very expensive, both in compilation time and
  3704. in amount of needed compile-time memory, with very large loops. Loops
  3705. with more basic blocks than this parameter won&rsquo;t have loop invariant
  3706. motion optimization performed on them. The default value of the
  3707. parameter is 1000 for <samp>-O1</samp> and 10000 for <samp>-O2</samp> and above.
  3708. </p>
  3709. </dd>
  3710. <dt><code>loop-max-datarefs-for-datadeps</code></dt>
  3711. <dd><p>Building data dependencies is expensive for very large loops. This
  3712. parameter limits the number of data references in loops that are
  3713. considered for data dependence analysis. These large loops are no
  3714. handled by the optimizations using loop data dependencies.
  3715. The default value is 1000.
  3716. </p>
  3717. </dd>
  3718. <dt><code>max-vartrack-size</code></dt>
  3719. <dd><p>Sets a maximum number of hash table slots to use during variable
  3720. tracking dataflow analysis of any function. If this limit is exceeded
  3721. with variable tracking at assignments enabled, analysis for that
  3722. function is retried without it, after removing all debug insns from
  3723. the function. If the limit is exceeded even without debug insns, var
  3724. tracking analysis is completely disabled for the function. Setting
  3725. the parameter to zero makes it unlimited.
  3726. </p>
  3727. </dd>
  3728. <dt><code>max-vartrack-expr-depth</code></dt>
  3729. <dd><p>Sets a maximum number of recursion levels when attempting to map
  3730. variable names or debug temporaries to value expressions. This trades
  3731. compilation time for more complete debug information. If this is set too
  3732. low, value expressions that are available and could be represented in
  3733. debug information may end up not being used; setting this higher may
  3734. enable the compiler to find more complex debug expressions, but compile
  3735. time and memory use may grow. The default is 12.
  3736. </p>
  3737. </dd>
  3738. <dt><code>min-nondebug-insn-uid</code></dt>
  3739. <dd><p>Use uids starting at this parameter for nondebug insns. The range below
  3740. the parameter is reserved exclusively for debug insns created by
  3741. <samp>-fvar-tracking-assignments</samp>, but debug insns may get
  3742. (non-overlapping) uids above it if the reserved range is exhausted.
  3743. </p>
  3744. </dd>
  3745. <dt><code>ipa-sra-ptr-growth-factor</code></dt>
  3746. <dd><p>IPA-SRA replaces a pointer to an aggregate with one or more new
  3747. parameters only when their cumulative size is less or equal to
  3748. <samp>ipa-sra-ptr-growth-factor</samp> times the size of the original
  3749. pointer parameter.
  3750. </p>
  3751. </dd>
  3752. <dt><code>sra-max-scalarization-size-Ospeed</code></dt>
  3753. <dt><code>sra-max-scalarization-size-Osize</code></dt>
  3754. <dd><p>The two Scalar Reduction of Aggregates passes (SRA and IPA-SRA) aim to
  3755. replace scalar parts of aggregates with uses of independent scalar
  3756. variables. These parameters control the maximum size, in storage units,
  3757. of aggregate which is considered for replacement when compiling for
  3758. speed
  3759. (<samp>sra-max-scalarization-size-Ospeed</samp>) or size
  3760. (<samp>sra-max-scalarization-size-Osize</samp>) respectively.
  3761. </p>
  3762. </dd>
  3763. <dt><code>tm-max-aggregate-size</code></dt>
  3764. <dd><p>When making copies of thread-local variables in a transaction, this
  3765. parameter specifies the size in bytes after which variables are
  3766. saved with the logging functions as opposed to save/restore code
  3767. sequence pairs. This option only applies when using
  3768. <samp>-fgnu-tm</samp>.
  3769. </p>
  3770. </dd>
  3771. <dt><code>graphite-max-nb-scop-params</code></dt>
  3772. <dd><p>To avoid exponential effects in the Graphite loop transforms, the
  3773. number of parameters in a Static Control Part (SCoP) is bounded. The
  3774. default value is 10 parameters. A variable whose value is unknown at
  3775. compilation time and defined outside a SCoP is a parameter of the SCoP.
  3776. </p>
  3777. </dd>
  3778. <dt><code>graphite-max-bbs-per-function</code></dt>
  3779. <dd><p>To avoid exponential effects in the detection of SCoPs, the size of
  3780. the functions analyzed by Graphite is bounded. The default value is
  3781. 100 basic blocks.
  3782. </p>
  3783. </dd>
  3784. <dt><code>loop-block-tile-size</code></dt>
  3785. <dd><p>Loop blocking or strip mining transforms, enabled with
  3786. <samp>-floop-block</samp> or <samp>-floop-strip-mine</samp>, strip mine each
  3787. loop in the loop nest by a given number of iterations. The strip
  3788. length can be changed using the <samp>loop-block-tile-size</samp>
  3789. parameter. The default value is 51 iterations.
  3790. </p>
  3791. </dd>
  3792. <dt><code>loop-unroll-jam-size</code></dt>
  3793. <dd><p>Specify the unroll factor for the <samp>-floop-unroll-and-jam</samp> option. The
  3794. default value is 4.
  3795. </p>
  3796. </dd>
  3797. <dt><code>loop-unroll-jam-depth</code></dt>
  3798. <dd><p>Specify the dimension to be unrolled (counting from the most inner loop)
  3799. for the <samp>-floop-unroll-and-jam</samp>. The default value is 2.
  3800. </p>
  3801. </dd>
  3802. <dt><code>ipa-cp-value-list-size</code></dt>
  3803. <dd><p>IPA-CP attempts to track all possible values and types passed to a function&rsquo;s
  3804. parameter in order to propagate them and perform devirtualization.
  3805. <samp>ipa-cp-value-list-size</samp> is the maximum number of values and types it
  3806. stores per one formal parameter of a function.
  3807. </p>
  3808. </dd>
  3809. <dt><code>ipa-cp-eval-threshold</code></dt>
  3810. <dd><p>IPA-CP calculates its own score of cloning profitability heuristics
  3811. and performs those cloning opportunities with scores that exceed
  3812. <samp>ipa-cp-eval-threshold</samp>.
  3813. </p>
  3814. </dd>
  3815. <dt><code>ipa-cp-recursion-penalty</code></dt>
  3816. <dd><p>Percentage penalty the recursive functions will receive when they
  3817. are evaluated for cloning.
  3818. </p>
  3819. </dd>
  3820. <dt><code>ipa-cp-single-call-penalty</code></dt>
  3821. <dd><p>Percentage penalty functions containing a single call to another
  3822. function will receive when they are evaluated for cloning.
  3823. </p>
  3824. </dd>
  3825. <dt><code>ipa-max-agg-items</code></dt>
  3826. <dd><p>IPA-CP is also capable to propagate a number of scalar values passed
  3827. in an aggregate. <samp>ipa-max-agg-items</samp> controls the maximum
  3828. number of such values per one parameter.
  3829. </p>
  3830. </dd>
  3831. <dt><code>ipa-cp-loop-hint-bonus</code></dt>
  3832. <dd><p>When IPA-CP determines that a cloning candidate would make the number
  3833. of iterations of a loop known, it adds a bonus of
  3834. <samp>ipa-cp-loop-hint-bonus</samp> to the profitability score of
  3835. the candidate.
  3836. </p>
  3837. </dd>
  3838. <dt><code>ipa-cp-array-index-hint-bonus</code></dt>
  3839. <dd><p>When IPA-CP determines that a cloning candidate would make the index of
  3840. an array access known, it adds a bonus of
  3841. <samp>ipa-cp-array-index-hint-bonus</samp> to the profitability
  3842. score of the candidate.
  3843. </p>
  3844. </dd>
  3845. <dt><code>ipa-max-aa-steps</code></dt>
  3846. <dd><p>During its analysis of function bodies, IPA-CP employs alias analysis
  3847. in order to track values pointed to by function parameters. In order
  3848. not spend too much time analyzing huge functions, it gives up and
  3849. consider all memory clobbered after examining
  3850. <samp>ipa-max-aa-steps</samp> statements modifying memory.
  3851. </p>
  3852. </dd>
  3853. <dt><code>lto-partitions</code></dt>
  3854. <dd><p>Specify desired number of partitions produced during WHOPR compilation.
  3855. The number of partitions should exceed the number of CPUs used for compilation.
  3856. The default value is 32.
  3857. </p>
  3858. </dd>
  3859. <dt><code>lto-min-partition</code></dt>
  3860. <dd><p>Size of minimal partition for WHOPR (in estimated instructions).
  3861. This prevents expenses of splitting very small programs into too many
  3862. partitions.
  3863. </p>
  3864. </dd>
  3865. <dt><code>lto-max-partition</code></dt>
  3866. <dd><p>Size of max partition for WHOPR (in estimated instructions).
  3867. to provide an upper bound for individual size of partition.
  3868. Meant to be used only with balanced partitioning.
  3869. </p>
  3870. </dd>
  3871. <dt><code>cxx-max-namespaces-for-diagnostic-help</code></dt>
  3872. <dd><p>The maximum number of namespaces to consult for suggestions when C++
  3873. name lookup fails for an identifier. The default is 1000.
  3874. </p>
  3875. </dd>
  3876. <dt><code>sink-frequency-threshold</code></dt>
  3877. <dd><p>The maximum relative execution frequency (in percents) of the target block
  3878. relative to a statement&rsquo;s original block to allow statement sinking of a
  3879. statement. Larger numbers result in more aggressive statement sinking.
  3880. The default value is 75. A small positive adjustment is applied for
  3881. statements with memory operands as those are even more profitable so sink.
  3882. </p>
  3883. </dd>
  3884. <dt><code>max-stores-to-sink</code></dt>
  3885. <dd><p>The maximum number of conditional store pairs that can be sunk. Set to 0
  3886. if either vectorization (<samp>-ftree-vectorize</samp>) or if-conversion
  3887. (<samp>-ftree-loop-if-convert</samp>) is disabled. The default is 2.
  3888. </p>
  3889. </dd>
  3890. <dt><code>allow-store-data-races</code></dt>
  3891. <dd><p>Allow optimizers to introduce new data races on stores.
  3892. Set to 1 to allow, otherwise to 0. This option is enabled by default
  3893. at optimization level <samp>-Ofast</samp>.
  3894. </p>
  3895. </dd>
  3896. <dt><code>case-values-threshold</code></dt>
  3897. <dd><p>The smallest number of different values for which it is best to use a
  3898. jump-table instead of a tree of conditional branches. If the value is
  3899. 0, use the default for the machine. The default is 0.
  3900. </p>
  3901. </dd>
  3902. <dt><code>tree-reassoc-width</code></dt>
  3903. <dd><p>Set the maximum number of instructions executed in parallel in
  3904. reassociated tree. This parameter overrides target dependent
  3905. heuristics used by default if has non zero value.
  3906. </p>
  3907. </dd>
  3908. <dt><code>sched-pressure-algorithm</code></dt>
  3909. <dd><p>Choose between the two available implementations of
  3910. <samp>-fsched-pressure</samp>. Algorithm 1 is the original implementation
  3911. and is the more likely to prevent instructions from being reordered.
  3912. Algorithm 2 was designed to be a compromise between the relatively
  3913. conservative approach taken by algorithm 1 and the rather aggressive
  3914. approach taken by the default scheduler. It relies more heavily on
  3915. having a regular register file and accurate register pressure classes.
  3916. See <samp>haifa-sched.c</samp> in the GCC sources for more details.
  3917. </p>
  3918. <p>The default choice depends on the target.
  3919. </p>
  3920. </dd>
  3921. <dt><code>max-slsr-cand-scan</code></dt>
  3922. <dd><p>Set the maximum number of existing candidates that are considered when
  3923. seeking a basis for a new straight-line strength reduction candidate.
  3924. </p>
  3925. </dd>
  3926. <dt><code>asan-globals</code></dt>
  3927. <dd><p>Enable buffer overflow detection for global objects. This kind
  3928. of protection is enabled by default if you are using
  3929. <samp>-fsanitize=address</samp> option.
  3930. To disable global objects protection use <samp>--param asan-globals=0</samp>.
  3931. </p>
  3932. </dd>
  3933. <dt><code>asan-stack</code></dt>
  3934. <dd><p>Enable buffer overflow detection for stack objects. This kind of
  3935. protection is enabled by default when using <samp>-fsanitize=address</samp>.
  3936. To disable stack protection use <samp>--param asan-stack=0</samp> option.
  3937. </p>
  3938. </dd>
  3939. <dt><code>asan-instrument-reads</code></dt>
  3940. <dd><p>Enable buffer overflow detection for memory reads. This kind of
  3941. protection is enabled by default when using <samp>-fsanitize=address</samp>.
  3942. To disable memory reads protection use
  3943. <samp>--param asan-instrument-reads=0</samp>.
  3944. </p>
  3945. </dd>
  3946. <dt><code>asan-instrument-writes</code></dt>
  3947. <dd><p>Enable buffer overflow detection for memory writes. This kind of
  3948. protection is enabled by default when using <samp>-fsanitize=address</samp>.
  3949. To disable memory writes protection use
  3950. <samp>--param asan-instrument-writes=0</samp> option.
  3951. </p>
  3952. </dd>
  3953. <dt><code>asan-memintrin</code></dt>
  3954. <dd><p>Enable detection for built-in functions. This kind of protection
  3955. is enabled by default when using <samp>-fsanitize=address</samp>.
  3956. To disable built-in functions protection use
  3957. <samp>--param asan-memintrin=0</samp>.
  3958. </p>
  3959. </dd>
  3960. <dt><code>asan-use-after-return</code></dt>
  3961. <dd><p>Enable detection of use-after-return. This kind of protection
  3962. is enabled by default when using the <samp>-fsanitize=address</samp> option.
  3963. To disable it use <samp>--param asan-use-after-return=0</samp>.
  3964. </p>
  3965. <p>Note: By default the check is disabled at run time. To enable it,
  3966. add <code>detect_stack_use_after_return=1</code> to the environment variable
  3967. <code>ASAN_OPTIONS</code>.
  3968. </p>
  3969. </dd>
  3970. <dt><code>asan-instrumentation-with-call-threshold</code></dt>
  3971. <dd><p>If number of memory accesses in function being instrumented
  3972. is greater or equal to this number, use callbacks instead of inline checks.
  3973. E.g. to disable inline code use
  3974. <samp>--param asan-instrumentation-with-call-threshold=0</samp>.
  3975. </p>
  3976. </dd>
  3977. <dt><code>use-after-scope-direct-emission-threshold</code></dt>
  3978. <dd><p>If the size of a local variable in bytes is smaller or equal to this
  3979. number, directly poison (or unpoison) shadow memory instead of using
  3980. run-time callbacks. The default value is 256.
  3981. </p>
  3982. </dd>
  3983. <dt><code>chkp-max-ctor-size</code></dt>
  3984. <dd><p>Static constructors generated by Pointer Bounds Checker may become very
  3985. large and significantly increase compile time at optimization level
  3986. <samp>-O1</samp> and higher. This parameter is a maximum number of statements
  3987. in a single generated constructor. Default value is 5000.
  3988. </p>
  3989. </dd>
  3990. <dt><code>max-fsm-thread-path-insns</code></dt>
  3991. <dd><p>Maximum number of instructions to copy when duplicating blocks on a
  3992. finite state automaton jump thread path. The default is 100.
  3993. </p>
  3994. </dd>
  3995. <dt><code>max-fsm-thread-length</code></dt>
  3996. <dd><p>Maximum number of basic blocks on a finite state automaton jump thread
  3997. path. The default is 10.
  3998. </p>
  3999. </dd>
  4000. <dt><code>max-fsm-thread-paths</code></dt>
  4001. <dd><p>Maximum number of new jump thread paths to create for a finite state
  4002. automaton. The default is 50.
  4003. </p>
  4004. </dd>
  4005. <dt><code>parloops-chunk-size</code></dt>
  4006. <dd><p>Chunk size of omp schedule for loops parallelized by parloops. The default
  4007. is 0.
  4008. </p>
  4009. </dd>
  4010. <dt><code>parloops-schedule</code></dt>
  4011. <dd><p>Schedule type of omp schedule for loops parallelized by parloops (static,
  4012. dynamic, guided, auto, runtime). The default is static.
  4013. </p>
  4014. </dd>
  4015. <dt><code>max-ssa-name-query-depth</code></dt>
  4016. <dd><p>Maximum depth of recursion when querying properties of SSA names in things
  4017. like fold routines. One level of recursion corresponds to following a
  4018. use-def chain.
  4019. </p>
  4020. </dd>
  4021. <dt><code>hsa-gen-debug-stores</code></dt>
  4022. <dd><p>Enable emission of special debug stores within HSA kernels which are
  4023. then read and reported by libgomp plugin. Generation of these stores
  4024. is disabled by default, use <samp>--param hsa-gen-debug-stores=1</samp> to
  4025. enable it.
  4026. </p>
  4027. </dd>
  4028. <dt><code>max-speculative-devirt-maydefs</code></dt>
  4029. <dd><p>The maximum number of may-defs we analyze when looking for a must-def
  4030. specifying the dynamic type of an object that invokes a virtual call
  4031. we may be able to devirtualize speculatively.
  4032. </p>
  4033. </dd>
  4034. <dt><code>max-vrp-switch-assertions</code></dt>
  4035. <dd><p>The maximum number of assertions to add along the default edge of a switch
  4036. statement during VRP. The default is 10.
  4037. </p></dd>
  4038. </dl>
  4039. </dd>
  4040. </dl>
  4041. <hr>
  4042. <div class="header">
  4043. <p>
  4044. Next: <a href="Instrumentation-Options.html#Instrumentation-Options" accesskey="n" rel="next">Instrumentation Options</a>, Previous: <a href="Debugging-Options.html#Debugging-Options" accesskey="p" rel="prev">Debugging Options</a>, Up: <a href="Invoking-GCC.html#Invoking-GCC" accesskey="u" rel="up">Invoking GCC</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  4045. </div>
  4046. </body>
  4047. </html>