icc.sh 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946
  1. #!/bin/sh -x
  2. $HOME/intel/oneapi/compiler/latest/linux/bin/intel64/icc --version
  3. $HOME/intel/oneapi/compiler/latest/linux/bin/intel64/icc -m64 -c -Wall -S -fverbose-asm -qopt-report-embed d4dag.c
  4. $HOME/intel/oneapi/compiler/latest/linux/bin/intel64/icc -m64 -Wall d4dag.c main.c -o main
  5. exit 0
  6. with older icc this generated control flow data
  7. -mP20P2_il0_print=6
  8. Intel(R) C++ Compiler Help
  9. ==========================
  10. Intel(R) Compiler includes compiler options that optimize for instruction
  11. sets that are available in both Intel(R) and non-Intel microprocessors, but
  12. may perform additional optimizations for Intel microprocessors than for
  13. non-Intel microprocessors. In addition, certain compiler options for
  14. Intel(R) Compiler are reserved for Intel microprocessors. For a detailed
  15. description of these compiler options, including the instructions they
  16. implicate, please refer to "Intel(R) Compiler User and Reference Guides >
  17. Compiler Options."
  18. usage: icc [options] file1 [file2 ...]
  19. icpc [options] file1 [file2 ...]
  20. where options represents zero or more compiler options
  21. fileN is a C/C++ source (.C .c .cc .cpp .cxx .c++ .i .ii),
  22. assembly (.s .S), object (.o), static library (.a), or other
  23. linkable file
  24. The icpc command uses the same compiler options as the
  25. icc command. Invoking the compiler using icpc
  26. compiles .c and .i files as C++. Invoking the compiler using
  27. icc compiles .c and .i files as C. Using icpc
  28. always links in C++ libraries. Using icc only
  29. links in C++ libraries if C++ source is provided on the command line.
  30. Commonly used options may be placed in the icc .cfg file.
  31. Some options listed are only available on a specific system
  32. i32 indicates the feature is available on systems based on IA-32
  33. architecture
  34. i64em indicates the feature is available on systems using Intel(R) 64
  35. architecture
  36. Compiler Option List
  37. --------------------
  38. Optimization
  39. ------------
  40. -O1 optimize for maximum speed, but disable some optimizations which
  41. increase code size for a small speed benefit
  42. -O2 optimize for maximum speed (DEFAULT)
  43. -O3 optimize for maximum speed and enable more aggressive optimizations
  44. that may not improve performance on some programs
  45. -O same as -O2
  46. -Os enable speed optimizations, but disable some optimizations which
  47. increase code size for small speed benefit
  48. -O0 disable optimizations
  49. -Ofast enable -O3 -no-prec-div -fp-model fast=2 optimizations
  50. -fno-alias
  51. assume no aliasing in program
  52. -fno-fnalias
  53. assume no aliasing within functions, but assume aliasing across calls
  54. -f[no-]builtin
  55. disable inline expansion of intrinsic functions
  56. -fno-builtin-<func>
  57. disable the <func> intrinsic
  58. -ffunction-sections
  59. separate functions for the linker (COMDAT)
  60. -fdata-sections
  61. place each data item into its own section
  62. -f[no-]defer-pop
  63. disable optimizations which may result in
  64. deferred clearance of the stack arguments
  65. -nolib-inline
  66. disable inline expansion of intrinsic functions
  67. -f[no-]optimize-sibling-calls
  68. Optimize sibling and tail recursive calls.
  69. Enabled at levels -O2, -O3, -Os.
  70. -f[no-]protect-parens
  71. enable/disable(DEFAULT) a reassociation optimization for REAL
  72. and COMPLEX expression evaluations by not honoring parenthesis
  73. -qsimd-honor-fp-model
  74. enforces the selected fp-model in SIMD loops.
  75. Specify -qno-simd-honor-fp-model(DEFAULT) to override
  76. the fp-model in SIMD loops.
  77. -qsimd-serialize-fp-reduction
  78. serializes FP reductions for improved floating point consistency in
  79. SIMD loops while allowing the rest of the loop to be vectorized.
  80. Default is -qno-simd-serialize-fp-reduction
  81. Code Generation
  82. ---------------
  83. -x<code> generate specialized code to run exclusively on processors
  84. indicated by <code> as described below
  85. SSE2 May generate Intel(R) SSE2 and SSE instructions for Intel
  86. processors. Optimizes for the Intel NetBurst(R)
  87. microarchitecture.
  88. SSE3 May generate Intel(R) SSE3, SSE2, and SSE instructions for
  89. Intel processors. Optimizes for the enhanced Pentium(R) M
  90. processor microarchitecture and Intel NetBurst(R)
  91. microarchitecture.
  92. SSSE3 May generate Intel(R) SSSE3, SSE3, SSE2, and SSE
  93. instructions for Intel processors. Optimizes for the
  94. Intel(R) Core(TM) microarchitecture.
  95. SSE4.1 May generate Intel(R) SSE4 Vectorizing Compiler and Media
  96. Accelerator instructions for Intel processors. May
  97. generate Intel(R) SSSE3, SSE3, SSE2, and SSE instructions
  98. and it may optimize for Intel(R) 45nm Hi-k next generation
  99. Intel Core(TM) microarchitecture.
  100. SSE4.2 May generate Intel(R) SSE4 Efficient Accelerated String
  101. and Text Processing instructions supported by Intel(R)
  102. Core(TM) i7 processors. May generate Intel(R) SSE4
  103. Vectorizing Compiler and Media Accelerator, Intel(R) SSSE3,
  104. SSE3, SSE2, and SSE instructions and it may optimize for
  105. the Intel(R) Core(TM) processor family.
  106. AVX May generate Intel(R) Advanced Vector Extensions (Intel(R)
  107. AVX), Intel(R) SSE4.2, SSE4.1, SSSE3, SSE3,
  108. SSE2, and SSE instructions for Intel(R) processors.
  109. CORE-AVX2
  110. May generate Intel(R) Advanced Vector Extensions 2
  111. (Intel(R) AVX2), Intel(R) AVX, SSE4.2, SSE4.1, SSSE3, SSE3,
  112. SSE2, and SSE instructions for Intel(R) processors.
  113. CORE-AVX-I
  114. May generate Intel(R) Advanced Vector Extensions (Intel(R)
  115. AVX), including instructions in Intel(R) Core 2(TM)
  116. processors in process technology smaller than 32nm,
  117. Intel(R) SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE
  118. instructions for Intel(R) processors.
  119. ATOM_SSE4.2
  120. May generate MOVBE instructions for Intel(R) processors,
  121. depending on the setting of option -minstruction.
  122. May also generate Intel(R) SSE4.2, SSE3, SSE2, and SSE
  123. instructions for Intel processors. Optimizes for Intel(R)
  124. Atom(TM) processors that support Intel(R) SSE4.2 and MOVBE
  125. instructions.
  126. ATOM_SSSE3
  127. May generate MOVBE instructions for Intel(R) processors,
  128. depending on the setting of option -minstruction.
  129. May also generate Intel(R) SSSE3, SSE3, SSE2, and SSE
  130. instructions for Intel processors. Optimizes for the
  131. Intel(R) Atom(TM) processor that support Intel(R) SSE
  132. and MOVBE instructions.
  133. MIC-AVX512
  134. May generate Intel(R) Advanced Vector Extensions 512
  135. (Intel(R) AVX-512) Foundation instructions, Intel(R)
  136. AVX-512 Conflict Detection instructions, Intel(R) AVX-512
  137. Exponential and Reciprocal instructions, Intel(R) AVX-512
  138. Prefetch instructions for Intel(R) processors, and the
  139. instructions enabled with CORE-AVX2. Optimizes for Intel(R)
  140. processors that support Intel(R) AVX-512 instructions.
  141. KNM
  142. May generate Quad Fused Multiply Add (QFMA) and Quad
  143. Virtual Neural Network Instruction (QVNNI) and the
  144. instructions enabled with MIC-AVX512. Optimizes for
  145. Intel(R) Xeon Phi(TM) product family processor code named
  146. Knights Mill.
  147. CORE-AVX512
  148. May generate Intel(R) Advanced Vector Extensions 512
  149. (Intel(R) AVX-512) Foundation instructions, Intel(R)
  150. AVX-512 Conflict Detection instructions, Intel(R) AVX-512
  151. Doubleword and Quadword instructions, Intel(R) AVX-512
  152. Byte and Word instructions and Intel(R) AVX-512 Vector
  153. Length Extensions for Intel(R) processors, and the
  154. instructions enabled with CORE-AVX2. Optimizes for Intel(R)
  155. processors that support Intel(R) AVX-512 instructions.
  156. COMMON-AVX512
  157. May generate Intel(R) Advanced Vector Extensions 512
  158. (Intel(R) AVX-512) Foundation instructions, Intel(R)
  159. AVX-512 Conflict Detection instructions, as well as the
  160. instructions enabled with CORE-AVX2. Optimizes for Intel(R)
  161. processors that support Intel(R) AVX-512 instructions.
  162. BROADWELL
  163. CANNONLAKE
  164. HASWELL
  165. ICELAKE-CLIENT (or ICELAKE)
  166. ICELAKE-SERVER
  167. IVYBRIDGE
  168. KNL
  169. KNM
  170. SANDYBRIDGE
  171. SILVERMONT
  172. GOLDMONT
  173. GOLDMONT-PLUS
  174. TREMONT
  175. SKYLAKE
  176. SKYLAKE-AVX512
  177. CASCADELAKE
  178. KABYLAKE
  179. COFFEELAKE
  180. AMBERLAKE
  181. WHISKEYLAKE
  182. TIGERLAKE
  183. SAPPHIRERAPIDS
  184. May generate instructions for processors that support the
  185. specified Intel(R) microarchitecture code name. Optimizes
  186. for Intel(R) processors that support the specified Intel(R)
  187. microarchitecture code name.
  188. Keywords KNL and SILVERMONT are only available on Windows*
  189. and Linux* systems.
  190. -xHost generate instructions for the highest instruction set and processor
  191. available on the compilation host machine
  192. -ax<code1>[,<code2>,...]
  193. generate code specialized for processors specified by <codes>
  194. while also generating generic IA-32 instructions.
  195. <codes> includes one or more of the following:
  196. SSE2 May generate Intel(R) SSE2 and SSE instructions for Intel
  197. processors.
  198. SSE3 May generate Intel(R) SSE3, SSE2, and SSE instructions for
  199. Intel processors.
  200. SSSE3 May generate Intel(R) SSSE3, SSE3, SSE2, and SSE
  201. instructions for Intel processors.
  202. SSE4.1 May generate Intel(R) SSE4.1, SSSE3, SSE3, SSE2, and SSE
  203. instructions for Intel processors.
  204. SSE4.2 May generate Intel(R) SSE4.2, SSE4.1, SSSE3, SSE3, SSE2,
  205. and SSE instructions for Intel processors.
  206. AVX May generate Intel(R) Advanced Vector Extensions (Intel(R)
  207. AVX), Intel(R) SSE4.2, SSE4.1, SSSE3, SSE3,
  208. SSE2, and SSE instructions for Intel(R) processors.
  209. CORE-AVX2
  210. May generate Intel(R) Advanced Vector Extensions 2
  211. (Intel(R) AVX2), Intel(R) AVX, SSE4.2, SSE4.1, SSSE3, SSE3,
  212. SSE2, and SSE instructions for Intel(R) processors.
  213. CORE-AVX-I
  214. May generate Intel(R) Advanced Vector Extensions (Intel(R)
  215. AVX), including instructions in Intel(R) Core 2(TM)
  216. processors in process technology smaller than 32nm,
  217. Intel(R) SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE
  218. instructions for Intel(R) processors.
  219. CORE-AVX512
  220. May generate Intel(R) Advanced Vector Extensions 512
  221. (Intel(R) AVX-512) Foundation instructions, Intel(R)
  222. AVX-512 Conflict Detection instructions, Intel(R) AVX-512
  223. Doubleword and Quadword instructions, Intel(R) AVX-512
  224. Byte and Word instructions and Intel(R) AVX-512 Vector
  225. Length Extensions for Intel(R) processors, and the
  226. instructions enabled with CORE-AVX2.
  227. BROADWELL
  228. CANNONLAKE
  229. HASWELL
  230. ICELAKE-CLIENT (or ICELAKE)
  231. ICELAKE-SERVER
  232. IVYBRIDGE
  233. KNL
  234. KNM
  235. SANDYBRIDGE
  236. SILVERMONT
  237. GOLDMONT
  238. GOLDMONT-PLUS
  239. TREMONT
  240. SKYLAKE
  241. SKYLAKE-AVX512
  242. CASCADELAKE
  243. KABYLAKE
  244. COFFEELAKE
  245. AMBERLAKE
  246. WHISKEYLAKE
  247. TIGERLAKE
  248. SAPPHIRERAPIDS
  249. May generate instructions for processors that support the
  250. specified Intel(R) microarchitecture code name. Optimizes
  251. for Intel(R) processors that support the specified Intel(R)
  252. microarchitecture code name.
  253. Keywords KNL and SILVERMONT are only available on Windows*
  254. and Linux* systems.
  255. MIC-AVX512
  256. May generate Intel(R) Advanced Vector Extensions 512
  257. (Intel(R) AVX-512) Foundation instructions, Intel(R)
  258. AVX-512 Conflict Detection instructions, Intel(R) AVX-512
  259. Exponential and Reciprocal instructions, Intel(R) AVX-512
  260. Prefetch instructions for Intel(R) processors, and the
  261. instructions enabled with CORE-AVX2.
  262. KNM
  263. May generate Quad Fused Multiply Add (QFMA) and Quad
  264. Virtual Neural Network Instruction (QVNNI) and the
  265. instructions enabled with MIC-AVX512
  266. -mcpu=<cpu>
  267. same as -mtune=<cpu>
  268. -mtune=<cpu>
  269. optimize for a specific <cpu>
  270. generic - Optimizes code for the compiler's default behavior
  271. broadwell
  272. haswell
  273. ivybridge
  274. knl
  275. knm
  276. sandybridge
  277. silvermont
  278. cannonlake
  279. icelake
  280. skylake-avx512
  281. skylake - Optimizes code for processors that support the
  282. specified Intel(R) microarchitecture code name.
  283. knl and silvermont are only available on Windows* and
  284. Linux* systems
  285. core-avx2 - Optimizes code for processors that support Intel(R)
  286. Advanced Vector Extensions 2 (Intel(R) AVX2), Intel(R)
  287. AVX, SSE4.2 SSE4.1, SSE3, SSE2, SSE, and SSSE3
  288. instructions
  289. core-avx-i - Optimizes code for processors that support Float-16
  290. conversion instructions and the RDRND instruction,
  291. Intel(R) Advanced Vector Extensions (Intel(R) AVX),
  292. Intel(R) SSE4.2, SSE4.1, SSE3, SSE2, SSE, and SSSE3
  293. instructions
  294. corei7-avx - Optimizes code for processors that support Intel(R)
  295. Advanced Vector Extensions (Intel(R) AVX), Intel(R)
  296. SSE4.2, SSE4.1, SSE3, SSE2, SSE, and SSSE3
  297. instructions
  298. corei7 - Optimizes code for processors that support Intel(R)
  299. SSE4 Efficient Accelerated String and Text Processing
  300. instructions. May also generate code for Intel(R) SSE4
  301. Vectorizing Compiler and Media Accelerator, Intel(R)
  302. SSE3, SSE2, SSE, and SSSE3 instructions
  303. atom - Optimizes code for processors that support MOVBE
  304. instructions, depending on the setting of option
  305. -minstruction (Linux and macOS*) or /Qinstruction
  306. (Windows). May also generate code for SSSE3
  307. instructions and Intel(R) SSE3, SSE2, and SSE
  308. instructions
  309. core2 - Optimizes for the Intel(R) Core(TM) 2 processor
  310. family, including support for MMX(TM), Intel(R) SSE,
  311. SSE2, SSE3, and SSSE3 instruction sets.
  312. pentium-mmx - Optimizes for Intel(R) Pentium(R) with MMX technology
  313. pentiumpro - Optimizes for Intel(R) Pentium(R) Pro, Intel Pentium
  314. II, and Intel Pentium III processors
  315. pentium4m - Optimizes for Intel(R) Pentium(R) 4 processors with
  316. MMX technology
  317. pentium-m
  318. pentium4
  319. pentium3
  320. pentium - Optimizes code for Intel(R) Pentium(R) processors.
  321. Value pentium3 is only available on Linux systems
  322. -march=<cpu>
  323. generate code exclusively for a given <cpu>
  324. broadwell
  325. cannonlake
  326. haswell
  327. icelake
  328. ivybridge
  329. knl
  330. knm
  331. sandybridge
  332. silvermont
  333. skylake-avx512
  334. skylake - Generates code for processors that support the
  335. specified Intel(R) microarchitecture code name.
  336. Keywords knl and silvermont are only available on
  337. Linux* systems.
  338. core-avx2 - Generates code for processors that support Intel(R)
  339. Advanced Vector Extensions 2 (Intel(R) AVX2), Intel(R)
  340. AVX, SSE4.2 SSE4.1, SSE3, SSE2, SSE, and SSSE3
  341. instructions
  342. core-avx-i - Generates code for processors that support Float-16
  343. conversion instructions and the RDRND instruction,
  344. Intel(R) Advanced Vector Extensions (Intel(R) AVX),
  345. Intel(R) SSE4.2, SSE4.1, SSE3, SSE2, SSE, and SSSE3
  346. instructions
  347. corei7-avx - Generates code for processors that support Intel(R)
  348. Advanced Vector Extensions (Intel(R) AVX), Intel(R)
  349. SSE4.2, SSE4.1, SSE3, SSE2, SSE, and SSSE3
  350. instructions
  351. corei7 - Generates code for processors that support Intel(R)
  352. SSE4 Efficient Accelerated String and Text Processing
  353. instructions. May also generate code for Intel(R) SSE4
  354. Vectorizing Compiler and Media Accelerator, Intel(R)
  355. SSE3, SSE2, SSE, and SSSE3 instructions
  356. atom - Generates code for processors that support MOVBE
  357. instructions, depending on the setting of option
  358. -minstruction (Linux and macOS*) or /Qinstruction
  359. (Windows). May also generate code for SSSE3
  360. instructions and Intel(R) SSE3, SSE2, and SSE
  361. instructions
  362. core2 - Generates for the Intel(R) Core(TM) 2 processor
  363. family
  364. pentium4m - Generates for Intel(R) Pentium(R) 4 processors with
  365. MMX technology
  366. pentium-m
  367. pentium4
  368. pentium3
  369. pentium - Generates code for Intel(R) Pentium(R) processors.
  370. Value pentium3 is only available on Linux systems
  371. -msse3 May generate Intel(R) SSE3, SSE2, and SSE instructions
  372. -mssse3 May generate Intel(R) SSSE3, SSE3, SSE2, and SSE instructions
  373. -msse4 Enable -msse4.2
  374. -msse4.1 May generate Intel(R) SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions
  375. -msse4.2 May generate Intel(R) SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE
  376. instructions
  377. -mavx May generate Intel(R) AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE
  378. instructions
  379. -masm=<dialect>
  380. generate asm instructions specified by <dialect>, which may be
  381. att (DEFAULT) or intel
  382. -minstruction=<keyword>
  383. Refine instruction set output for the selected target processor
  384. [no]movbe - Do/do not generate MOVBE instructions with ATOM_SSSE3
  385. (requires -xATOM_SSSE3)
  386. -f[no-]omit-frame-pointer
  387. enable(DEFAULT)/disable use of EBP as general purpose register.
  388. -fno-omit-frame-pointer replaces -fp
  389. -f[no-]exceptions
  390. enable/disable exception handling table generation
  391. The default for C++ is -fexceptions (enabled)
  392. The default for C is -fno-exceptions (disabled)
  393. -f[no-]fat-lto-objects
  394. enable/disable generation of true code/data when generating an
  395. IL object using -ipo -c. Objects generated with -ffat-lto-objects
  396. or -fno-fat-lto-objects are added unmodified to an archive when
  397. using xiar. xiar behavior remains unchanged for an IL object
  398. generated without specifying -f[no-]fat-lto-objects.
  399. -fnon-call-exceptions
  400. enable/disable(DEFAULT) code that allows exceptions from trapping
  401. instructions to be caught
  402. -regcall make __regcall the default calling convention
  403. -mno-sse disable the generation of SSE instructions
  404. -hotpatch[=n]
  405. generate padding bytes for function entries to enable image
  406. hotpatching. If specified, use 'n' as the padding.
  407. -fasynchronous-unwind-tables
  408. determines whether unwind information is precise at an instruction
  409. boundary or at a call boundary. -fno-asynchronous-unwind-tables is
  410. the default for IA-32 architecture.
  411. -fextend-arguments=[32|64]
  412. By default, unprototyped scalar integer arguments are passed
  413. in 32-bits (sign-extended if necessary).
  414. On Intel(R) 64, unprototyped scalar integer arguments may be
  415. extended to 64-bits.
  416. -m32 generate code for IA-32 architecture
  417. -m64 generate code for Intel(R) 64 architecture
  418. -m[no-]omit-leaf-frame-pointer
  419. determines whether the frame pointer is omitted or kept in leaf
  420. functions
  421. -m80387 Specify whether the compiler can use x87 instructions.
  422. Use -mno-80387 to disable.
  423. -mx87 Same as -m80387
  424. -mstringop-strategy=<alg>
  425. Override the internal decision heuristic for the particular algorithm
  426. to use for inlining string operations. The allowed values for <alg>:
  427. rep - Expand using i386 "rep" prefix (DEFAULT for -Os)
  428. const_size_loop - Expand into an inline loop when size is known at
  429. compile time (DEFAULT)
  430. libcall - Always use a library call.
  431. -mstringop-inline-threshold=<val>
  432. inline calls to memcall-like (memcpy, memset) functions when the
  433. number of bytes the functions handle are known at compile time and
  434. less than <val>
  435. -fcf-protection[=<arg>]
  436. Enables Control-flow Enforcement Technology (CET) protection, which
  437. defends your program from certain attacks that exploit
  438. vulnerabilities.
  439. branch - do control-flow instrumentation for indirect branches
  440. return - do control-flow instrumentation for function returns
  441. full - alias to specify both branch and return (same as no <arg>)
  442. none - turn off instrumentation
  443. -mauto-arch=<code1>[,<code2>,...]
  444. generate multiple, feature-specific auto-dispatch code paths for x86
  445. architecture processors if there is a performance benefit. The
  446. accepted arguments match those of option '-ax'
  447. Interprocedural Optimization (IPO)
  448. ----------------------------------
  449. -[no-]ip enable(DEFAULT)/disable single-file IP optimization
  450. within files
  451. -ipo[n] enable multi-file IP optimization between files
  452. -ipo-c generate a multi-file object file (ipo_out.o)
  453. -ipo-S generate a multi-file assembly file (ipo_out.S)
  454. -ip-no-inlining
  455. disable full and partial inlining
  456. -ip-no-pinlining
  457. disable partial inlining
  458. -ipo-separate
  459. create one object file for every source file (overrides -ipo[n])
  460. -ipo-jobs<n>
  461. specify the number of jobs to be executed simultaneously during the
  462. IPO link phase
  463. Advanced Optimizations
  464. ----------------------
  465. -unroll[n]
  466. set maximum number of times to unroll loops. Omit n to use default
  467. heuristics. Use n=0 to disable the loop unroller
  468. -[no-]unroll-aggressive
  469. enables more aggressive unrolling heuristics
  470. -funroll-loops
  471. unroll loops based on default heuristics
  472. -[no-]scalar-rep
  473. enable(DEFAULT)/disable scalar replacement (requires -O3)
  474. -[no-]ansi-alias
  475. enable(DEFAULT)/disable use of ANSI aliasing rules optimizations;
  476. user asserts that the program adheres to these rules
  477. -[no-]ansi-alias-check
  478. enable(DEFAULT)/disable ANSI alias checking when using -ansi-alias
  479. -[no-]complex-limited-range
  480. enable/disable(DEFAULT) the use of the basic algebraic expansions of
  481. some complex arithmetic operations. This can allow for some
  482. performance improvement in programs which use a lot of complex
  483. arithmetic at the loss of some exponent range.
  484. -[no-]alias-const
  485. enable/disable(DEFAULT) a heuristic stating that if two arguments to
  486. a function have pointer type, a pointer to const does not alias a
  487. pointer to non-const. Also known as the input/output buffer rule, it
  488. assumes that input and output buffer arguments do not overlap.
  489. -fargument-alias
  490. arguments may alias each other and may alias global storage
  491. -fargument-noalias
  492. arguments do not alias each other but may alias global storage
  493. -fargument-noalias-global
  494. arguments do not alias each other and do not alias global storage
  495. -ftls-model=<model>
  496. change thread-local storage model, where <model> can be the
  497. following: global-dynamic, local-dynamic, initial-exec or local-exec
  498. -q[no-]opt-multi-version-aggressive
  499. enables more aggressive multi-versioning to check for pointer
  500. aliasing and scalar replacement
  501. -qopt-ra-region-strategy[=<keyword>]
  502. select the method that the register allocator uses to partition each
  503. routine into regions
  504. routine - one region per routine
  505. block - one region per block
  506. trace - one region per trace
  507. loop - one region per loop
  508. default - compiler selects best option
  509. -[no-]vec
  510. enables(DEFAULT)/disables vectorization
  511. -[no-]vec-guard-write
  512. enables cache/bandwidth optimization for stores under conditionals
  513. within vector loops
  514. -vec-threshold[n]
  515. sets a threshold for the vectorization of loops based on the
  516. probability of profitable execution of the vectorized loop in
  517. parallel
  518. -vecabi=<arg>
  519. select vector function ABI
  520. legacy - use the legacy vector function ABI
  521. compat - use the compatibility vector function ABI (DEFAULT)
  522. cmdtarget - generate an extended set of vector functions
  523. gcc - use GCC compatible ABI
  524. -qopt-malloc-options={0|1|2|3|4}
  525. specify malloc configuration parameters. Specifying a non-zero <n>
  526. value will cause alternate configuration parameters to be set for
  527. how malloc allocates and frees memory
  528. -qopt-calloc
  529. enable/disable(DEFAULT) calls to fast calloc function
  530. -qopt-jump-tables=<arg>
  531. control the generation of jump tables
  532. default - let the compiler decide when a jump table, a series of
  533. if-then-else constructs or a combination is generated
  534. large - generate jump tables up to a certain pre-defined size
  535. (64K entries)
  536. <n> - generate jump tables up to <n> in size
  537. use -qno-opt-jump-tables to lower switch statements as chains of
  538. if-then-else constructs
  539. -fno-jump-tables
  540. do not generate jump tables for switches and if-then-else statements
  541. -qopt-block-factor=<n>
  542. specify blocking factor for loop blocking
  543. -ffreestanding
  544. compile in a freestanding environment where the standard library
  545. may not be present
  546. -qopt-streaming-stores=<arg>
  547. specifies whether streaming stores are generated
  548. always - enables generation of streaming stores under the
  549. assumption that the application is memory bound. Also,
  550. the user is responsible for inserting the right memory
  551. fences for synchronization
  552. auto - compiler decides when streaming stores are used (DEFAULT)
  553. never - disables generation of streaming stores
  554. -ipp[=<arg>]
  555. link some or all of the Intel(R) Integrated Performance Primitives
  556. (Intel(R) IPP) libraries and bring in the associated headers
  557. common - link using the main libraries set. This is the
  558. default value when -ipp is specified
  559. crypto - link using the main libraries set and the crypto
  560. library
  561. -ipp-link=<arg>
  562. choose whether to link with static or dynamic libraries to support
  563. Intel(R) Integrated Performance Primitives (Intel(R) IPP)
  564. dynamic - link using the dynamic libraries set. This is the
  565. default value when -ipp is specified on Windows
  566. static - link using the static libraries set. This is the
  567. default value when -ipp is specified on Linux
  568. nonpic - link using the version of the libraries that do not
  569. have position independent code
  570. nonpic_crypto - link using the crypto library and the version of
  571. the libraries that do not have position independent
  572. code
  573. -mkl[=<arg>]
  574. link to the Intel(R) Math Kernel Library (Intel(R) MKL) and bring
  575. in the associated headers
  576. parallel - link using the threaded Intel(R) MKL libraries. This
  577. is the default when -mkl is specified
  578. sequential - link using the non-threaded Intel(R) MKL libraries
  579. cluster - link using the Intel(R) MKL Cluster libraries plus
  580. the sequential Intel(R) MKL libraries
  581. -tbb link to the Intel(R) Threading Building Blocks (Intel(R) TBB)
  582. libraries and bring in the associated headers
  583. -daal[=<arg>]
  584. link to the Intel(R) Data Analytics Acceleration Library (Intel(R)
  585. DAAL) libraries and bring in the associated headers
  586. parallel - link using the threaded Intel(R) DAAL (DEFAULT)
  587. sequential - link using the non-threaded Intel(R) DAAL
  588. -q[no-]opt-subscript-in-range
  589. assumes no overflows in the intermediate computation of the
  590. subscripts
  591. -[no-]use-intel-optimized-headers
  592. take advantage of the optimized header files
  593. -[no-]intel-extensions
  594. enable(DEFAULT)/disable C/C++ language extensions such as array
  595. notation, Intel(R) Cilk(TM) Plus language extensions, and
  596. support for decimal floating-point types.
  597. -q[no-]opt-matmul
  598. replace matrix multiplication with calls to intrinsics and threading
  599. libraries for improved performance (DEFAULT at -O3 -parallel)
  600. -[no-]simd
  601. enables(DEFAULT)/disables vectorization using simd pragma
  602. -[no-]simd-function-pointers
  603. enables/disables(DEFAULT) pointers to simd-enabled functions
  604. -guide-opts=<arg>
  605. tells the compiler to analyze certain code and generate
  606. recommendations that may improve optimizations
  607. -guide-file[=<filename>]
  608. causes the results of guide to be output to a file
  609. -guide-file-append[=<filename>]
  610. causes the results of guide to be appended to a file
  611. -guide[=<level>]
  612. lets you set a level (1 - 4) of guidance for auto-vectorization,
  613. auto-parallelization, and data transformation (DEFAULT is 4 when the
  614. option is specified)
  615. -guide-data-trans[=<level>]
  616. lets you set a level (1 - 4) of guidance for data transformation
  617. (DEFAULT is 4 when the option is specified)
  618. -guide-par[=<level>]
  619. lets you set a level (1 - 4) of guidance for auto-parallelization
  620. (DEFAULT is 4 when the option is specified)
  621. -guide-vec[=<level>]
  622. lets you set a level (1 - 4) of guidance for auto-vectorization
  623. (DEFAULT is 4 when the option is specified)
  624. -qopt-mem-layout-trans[=<level>]
  625. controls the level of memory layout transformations performed by the
  626. compiler
  627. 0 - disable memory layout transformations (same as
  628. -qno-opt-mem-layout-trans)
  629. 1 - enable basic memory layout transformations
  630. 2 - enable more memory layout transformations (DEFAULT when the
  631. option is specified)
  632. 3 - enable aggressive memory layout transformations
  633. -qopt-prefetch[=n]
  634. enable levels of prefetch insertion, where 0 disables.
  635. n may be 0 through 5 inclusive. Default is 2.
  636. -qno-opt-prefetch
  637. disable(DEFAULT) prefetch insertion. Equivalent to -qopt-prefetch=0
  638. -qopt-prefetch-distance=n1[,n2]
  639. specify the prefetch distance (how many iterations ahead, use n1 and
  640. n2 values such that n1>=n2) to be used for compiler generated
  641. prefetches inside loops. n1 indicates distance from memory to L2
  642. cache and n2 indicates distance from L2 to L1.
  643. -qopt-prefetch-issue-excl-hint
  644. generates PrefetchW instruction for Intel(R) microarchitecture
  645. code name Broadwell processors and beyond when -qopt-prefetch
  646. is also used
  647. -qopt-threads-per-core=n
  648. specifies the number of threads (1 - 4) per core to be used for an
  649. application (Intel(R) MIC Architecture specific)
  650. -qopt-streaming-cache-evict=n
  651. specifies the cache line eviction level (0 - 3) when streaming
  652. loads/stores are used. (Intel(R) MIC Architecture specific)
  653. -qopt-gather-scatter-unroll=n
  654. specify an alternative loop unroll sequence for gather and scatter
  655. loops (Intel(R) MIC Architecture specific). Disable with
  656. -qno-opt-gather-scatter-unroll (equivalent to n=0)
  657. -qopt-dynamic-align
  658. enable(DEFAULT) dynamic data alignment optimizations. Specify
  659. -qno-opt-dynamic-align to disable
  660. -falign-loops[=n]
  661. specify code alignment of loops to improve performance.
  662. n is the number of bytes for the minimum alignment boundary. It must
  663. be a power of 2 between 1 and 4096. If n is not present, an
  664. alignment of 16 bytes is used.
  665. Use of -fno-align-loops (DEFAULT) sets alignment to 1.
  666. -qopt-zmm-usage=<keyword>
  667. Specifies the level of zmm registers usage. You can specify one of
  668. the following:
  669. low - Tells the compiler that the compiled program is unlikely to
  670. benefit from zmm registers usage. It specifies that the
  671. compiler should avoid using zmm registers unless it can
  672. prove the gain from their usage.
  673. high - Tells the compiler to generate zmm code without restrictions
  674. -qoverride-limits
  675. provides a way to override certain internal compiler limits that are
  676. intended to prevent excessive memory usage or compile times for very
  677. large, complex compilation units.
  678. -q[no-]opt-multiple-gather-scatter-by-shuffles
  679. Enables or disables the optimization for multiple adjacent
  680. gather/scatter type vector memory references.
  681. -m[no-]branches-within-32B-boundaries
  682. enable/disable(DEFAULT) aligning branches and fused branches on
  683. 32-byte boundaries
  684. Profile Guided Optimization (PGO)
  685. ---------------------------------
  686. -prof-dir <dir>
  687. specify directory for profiling output files (*.dyn and *.dpi)
  688. -prof-src-root <dir>
  689. specify project root directory for application source files to
  690. enable relative path resolution during profile feedback on sources
  691. below that directory
  692. -prof-src-root-cwd
  693. specify the current directory as the project root directory for
  694. application source files to enable relative path resolution during
  695. profile feedback on sources below that directory
  696. -[no-]prof-src-dir
  697. specify whether directory names of sources should be
  698. considered when looking up profile records within the .dpi file
  699. -prof-file <file>
  700. specify file name for profiling summary file
  701. -[no-]prof-data-order
  702. enable/disable(DEFAULT) static data ordering with profiling
  703. -[no-]prof-func-order
  704. enable/disable(DEFAULT) function ordering with profiling
  705. -[no-]prof-func-groups
  706. enable(DEFAULT with PGO)/disable function grouping
  707. -prof-gen[=keyword[,keyword]]
  708. instrument program for profiling. Optional keywords are as follows.
  709. default - Produces an instrumented object file. This is the same
  710. as specifying the -prof-gen option with no keyword.
  711. srcpos - Produces an instrumented object file and information
  712. needed for using the code coverage tool.
  713. globdata - Produces an instrumented object file that includes
  714. information for global data layout.
  715. threadsafe - Collects PGO data with guards for threaded
  716. applications.
  717. -no-prof-gen
  718. disable profiling instrumentation
  719. -prof-use[=<arg>]
  720. enable use of profiling information during optimization
  721. weighted - invokes profmerge with -weighted option to scale data
  722. based on run durations
  723. [no]merge - enable(default)/disable the invocation of the profmerge
  724. tool
  725. -no-prof-use
  726. disable use of profiling information during optimization
  727. -fnsplit[=<n>]
  728. enable function splitting (enabled with /Qprof-use for IA-32 Windows)
  729. n - positive integer indicating the threshold number. The blocks
  730. can be placed into a different code segment if their
  731. execution probability is less than the specified value of
  732. range 0 <= n <= 100
  733. use -no-fnsplit to disable
  734. -p compile and link for function profiling with UNIX gprof tool
  735. On IA32 and Intel(r)64, -pg is also valid
  736. -f[no-]instrument-functions
  737. determine whether function entry and exit points are instrumented
  738. -prof-hotness-threshold=<val>
  739. set the hotness threshold for function grouping and function ordering
  740. val indicates percentage of functions to be placed in hot region.
  741. This option requires -prof-use
  742. and -prof-func-groups or -prof-func-order
  743. -prof-value-profiling=<arg>[,<arg>,...]
  744. limit value profiling
  745. none - inhibit all types of value profiling
  746. nodivide - inhibit value profiling of non-compile time constants
  747. used in division or remainder operations
  748. noindcall - inhibit value profiling of function addresses at
  749. indirect call sites
  750. -prof-gen-sampling
  751. prepares application executables for hardware profiling (sampling)
  752. and causes the compiler to generate source code mapping information
  753. -prof-use-sampling=file[:file:...]
  754. enable use of hardware profiling (sampling) information during
  755. optimization. Argument provides list of one or more profiling data
  756. files to apply
  757. Optimization Reports
  758. --------------------
  759. -qopt-report[=n]
  760. generate an optimization report. Default destination is
  761. <target>.optrpt. Levels of 0 - 5 are valid.
  762. Please see documentation for additional details of
  763. information provided by phase per level.
  764. 0 disable optimization report output
  765. 2 DEFAULT when enabled
  766. -qopt-report-file=[stdout | stderr | <file>]
  767. specify the filename or output stream for the generated report
  768. -qopt-report-stdout
  769. specify the generated report should be directed to stdout
  770. -qopt-report-per-object
  771. specify the generated report should be directed to a .optrpt file
  772. in the output directory (DEFAULT when another destination for the
  773. report is not specified)
  774. -qopt-report-phase=<phase>[,<phase>,...]
  775. specify one or more phases that reports are generated against
  776. -qopt-report-routine=<name>[,<name>,...]
  777. restrict the report to routines containing the given name
  778. -qopt-report-filter=<string>
  779. restricts the opt-report to specific files, routines or line
  780. number ranges. Refer to the documentation for the specific
  781. syntax of parameter string.
  782. -qopt-report-format=[text|vs]
  783. specify the output format to be used for the opt-report as either
  784. plain text or a format for use in the Microsoft* Visual Studio IDE
  785. -q[no-]opt-report-embed
  786. When enabled, if an assembly file is being generated, special loop
  787. info annotations will be emitted in the assembly file. If an object
  788. file/executable is being generated, these will be emitted into the
  789. object file/executable for use by the Intel VTune Amplifier
  790. application. Automatically enabled when symbolic debug information
  791. is enabled.
  792. -qopt-report-help
  793. display the optimization phases available for reporting
  794. -qopt-report-names=<keyword>
  795. Specifies whether mangled or unmangled names should appear in the
  796. optimization report.
  797. mangled - use mangled names
  798. unmangled - use unmangled names (DEFAULT)
  799. -qopt-report-annotate[=<keyword>]
  800. Annotate source files with optimization reports in specified format
  801. html - annotate in HTML format
  802. text - annotate in text format (DEFAULT)
  803. -qopt-report-annotate-position=<keyword>
  804. Specify the site where loop related optimization reports appear in
  805. the annotated source for inlined routines
  806. caller - annotate at caller site
  807. callee - annotate at callee site
  808. both - annotate at both caller and callee site
  809. -tcheck [mode]
  810. enable analysis of threaded applications (requires Intel(R) Thread
  811. Checker; cannot be used with compiler alone)
  812. tci - instruments a program to perform a thread-count-independent
  813. analysis
  814. tcd - instruments a program to perform a thread-count-dependent
  815. analysis (DEFAULT when mode is not used)
  816. api - instruments a program at the api-imports level
  817. -tcollect[=<lib>]
  818. inserts instrumentation probes calling the Intel(R) Trace Collector
  819. API. The library -l<lib> is linked in the default being -lVT
  820. (requires Intel(R) Trace Collector)
  821. -tcollect-filter file
  822. Enable or disable the instrumentation of specified functions.
  823. (requires Intel(R) Trace Collector)
  824. OpenMP* and Parallel Processing
  825. ------------------------------
  826. -qopenmp enable the compiler to generate multi-threaded code based on the
  827. OpenMP* directives (same as -fopenmp)
  828. Use -qno-openmp to disable
  829. -qopenmp-stubs
  830. enables the user to compile OpenMP programs in sequential mode. The
  831. OpenMP directives are ignored and a stub OpenMP library is linked
  832. (sequential)
  833. -qopenmp-lib=<ver>
  834. choose which OpenMP library version to link with
  835. compat - use the GNU compatible OpenMP run-time libraries
  836. (DEFAULT)
  837. -qopenmp-link=<library>
  838. choose whether to link with the static or dynamic OpenMP
  839. libraries. Default is dynamic.
  840. -qopenmp-threadprivate=<ver>
  841. choose which threadprivate implementation to use
  842. compat - use the GNU compatible thread local storage
  843. legacy - use the Intel compatible implementation
  844. (DEFAULT)
  845. -parallel
  846. enable the auto-parallelizer to generate multi-threaded code for
  847. loops that can be safely executed in parallel
  848. -par-threshold[n]
  849. set threshold for the auto-parallelization of loops where n is an
  850. integer from 0 to 100
  851. -par-runtime-control[n]
  852. Control parallelizer to generate runtime check code for effective
  853. automatic parallelization.
  854. n=0 no runtime check based auto-parallelization
  855. n=1 generate runtime check code under conservative mode
  856. (DEFAULT when enabled)
  857. n=2 generate runtime check code under heuristic mode
  858. n=3 generate runtime check code under aggressive mode
  859. -par-schedule-static[=n]
  860. Specifies a scheduling algorithm for DO loop iteration.
  861. Divides iterations into contiguous pieces. Size n if
  862. specified, equal sized pieces if not.
  863. -par-schedule-static-balanced[=n]
  864. Divides iterations into even-sized chunks. Size n if
  865. specified, equal sized pieces if not.
  866. -par-schedule-static-steal[=n]
  867. Divides iterations into even-sized chunks, but allows
  868. threads to steal parts of chunks from neighboring threads
  869. -par-schedule-dynamic[=n]
  870. Specifies a scheduling algorithm for DO loop iteration.
  871. Assigns iterations to threads in chunks dynamically.
  872. Chunk size is n iterations if specified, otherwise 1.
  873. -par-schedule-guided[=n]
  874. Specifies a scheduling algorithm for DO loop iteration.
  875. Indicates a minimum number of iterations. If specified,
  876. n is the minimum number, otherwise 1.
  877. -par-schedule-guided-analytical[=n]
  878. Divides iterations by using exponential distribution or
  879. dynamic distributions.
  880. -par-schedule-runtime
  881. Specifies a scheduling algorithm for DO loop iteration.
  882. Defers the scheduling decision until runtime.
  883. -par-schedule-auto
  884. Lets the compiler or run-time system determine the
  885. scheduling algorithm.
  886. -par-affinity=[<modifier>,...]<type>[,<permute>][,<offset>]
  887. tune application performance by setting different thread affinity
  888. -par-num-threads=<n>
  889. tune application performance by setting different number of threads
  890. -parallel-source-info[=n]
  891. enable(DEFAULT)/disable the emission of source location information
  892. for parallel code generation with OpenMP and auto-parallelization
  893. 0 - disable (same as -no-parallel-source-info)
  894. 1 - emit routine name and line information (DEFAULT)
  895. 2 - emit path, file, routine name and line information
  896. -qopenmp-simd
  897. Enables OpenMP* SIMD compilation. Enabled by default with
  898. -qopenmp. Use -qno-openmp-simd to disable.
  899. -qopenmp-offload[=<kind>]
  900. Enables OpenMP* offloading compilation for target pragmas.
  901. Enabled by default with -qopenmp.
  902. Use -qno-openmp-offload to disable.
  903. Specify kind to specify the default device for target pragmas
  904. host - allow target code to run on host system while still doing
  905. the outlining for offload
  906. -f[no-]mpc_privatize
  907. Enables privatization of all static data for the MPC
  908. unified parallel runtime. This will cause calls to
  909. extended thread local storage resolution run-time routines
  910. which are not supported on standard linux distributions.
  911. This option is only usable in conjunction with the MPC
  912. unified parallel runtime. The default is -fno-mpc-privatize.
  913. -par-loops=<arg>
  914. Select between old or new implementations of parallel loop support.
  915. The default is -par-loops=new
  916. Floating Point
  917. --------------
  918. -fp-model <name>
  919. enable <name> floating point model variation
  920. [no-]except - enable/disable floating point exception semantics
  921. fast[=1|2] - enables more aggressive floating point optimizations
  922. precise - allows value-safe optimizations
  923. source - enables intermediates in source precision
  924. sets -assume protect_parens for Fortran
  925. strict - enables -fp-model precise -fp-model except, disables
  926. contractions and enables pragma stdc fenv_access
  927. consistent - enables consistent, reproducible results for
  928. different optimization levels or between different
  929. processors of the same architecture
  930. double - rounds intermediates in 53-bit (double) precision
  931. extended - rounds intermediates in 64-bit (extended) precision
  932. -fp-speculation=<mode>
  933. enable floating point speculations with the following <mode>
  934. conditions:
  935. fast - speculate floating point operations (DEFAULT)
  936. safe - speculate only when safe
  937. strict - same as off
  938. off - disables speculation of floating-point operations
  939. -pc32 set internal FPU precision to 24 bit significand
  940. -pc64 set internal FPU precision to 53 bit significand
  941. -pc80 set internal FPU precision to 64 bit significand (DEFAULT)
  942. -mp1 improve floating-point precision
  943. -mieee-fp
  944. maintain floating point precision (disables some optimizations)
  945. can be disabled with -mno-ieee-fp
  946. -[no-]prec-sqrt
  947. determine if certain square root optimizations are enabled
  948. -[no-]prec-div
  949. improve precision of FP divides (some speed impact)
  950. -[no-]fast-transcendentals
  951. generate a faster version of the transcendental functions
  952. -[no-]fp-port
  953. round fp results at assignments and casts (some speed impact)
  954. -fp-stack-check
  955. enable fp stack checking after every function/procedure call
  956. -rcd rounding mode to enable fast float-to-int conversions
  957. -[no-]ftz
  958. enable/disable flush denormal results to zero
  959. -[no-]fma
  960. enable/disable the combining of floating point multiplies and
  961. add/subtract operations
  962. -fp-trap=<arg>[,<arg>,...]
  963. control floating point traps at program start. <arg> can be of the
  964. following values
  965. [no]divzero - [Do not] trap on division by zero
  966. [no]inexact - [Do not] trap on inexact result
  967. [no]invalid - [Do not] trap on invalid operation
  968. [no]overflow - [Do not] trap on overflow
  969. [no]underflow - [Do not] trap on underflow
  970. [no]denormal - [Do not] trap on denormal
  971. all - enable trap on all of the above
  972. none - trap on none of the above
  973. common - trap on most commonly used IEEE traps
  974. (invalid, division by zero, overflow)
  975. -fp-trap-all=<arg>[,<arg>,...]
  976. control floating point traps in every routine. <arg> can be of the
  977. values specified in -fp-trap
  978. -fimf-absolute-error=value[:funclist]
  979. define the maximum allowable absolute error for math library
  980. function results
  981. value - a positive, floating-point number conforming to the
  982. format [digits][.digits][{e|E}[sign]digits]
  983. funclist - optional comma separated list of one or more math
  984. library functions to which the attribute should be
  985. applied
  986. -fimf-accuracy-bits=bits[:funclist]
  987. define the relative error, measured by the number of correct bits,
  988. for math library function results
  989. bits - a positive, floating-point number
  990. funclist - optional comma separated list of one or more math
  991. library functions to which the attribute should be
  992. applied
  993. -fimf-arch-consistency=value[:funclist]
  994. ensures that the math library functions produce consistent results
  995. across different implementations of the same architecture
  996. value - true or false
  997. funclist - optional comma separated list of one or more math
  998. library functions to which the attribute should be
  999. applied
  1000. -fimf-max-error=ulps[:funclist]
  1001. defines the maximum allowable relative error, measured in ulps, for
  1002. math library function results
  1003. ulps - a positive, floating-point number conforming to the
  1004. format [digits][.digits][{e|E}[sign]digits]
  1005. funclist - optional comma separated list of one or more math
  1006. library functions to which the attribute should be
  1007. applied
  1008. -fimf-precision=value[:funclist]
  1009. defines the accuracy (precision) for math library functions
  1010. value - defined as one of the following values
  1011. high - equivalent to max-error = 1.0
  1012. medium - equivalent to max-error = 4 (DEFAULT)
  1013. low - equivalent to accuracy-bits = 11 (single
  1014. precision); accuracy-bits = 26 (double
  1015. precision)
  1016. reference - equivalent to 'high' accuracy with correct
  1017. signaling of exceptional conditions through
  1018. the errno and status flags settings. This
  1019. setting is initially available only on Linux*
  1020. systems
  1021. funclist - optional comma separated list of one or more math
  1022. library functions to which the attribute should be
  1023. applied
  1024. -fimf-domain-exclusion=classlist[:funclist]
  1025. indicates the input arguments domain on which math functions
  1026. must provide correct results.
  1027. classlist - defined as one of the following values:
  1028. nans, infinities, denormals, zeros
  1029. all, none, common
  1030. funclist - optional list of one or more math library functions to
  1031. which the attribute should be applied.
  1032. -fimf-force-dynamic-target[=funclist]
  1033. Instructs the compiler to use run-time dispatch in calls to math
  1034. functions
  1035. funclist - optional list of one or more math library functions to
  1036. which the attribute should be applied.
  1037. -fimf-use-svml=value[:funclist]
  1038. Instructs the compiler to implement math library functions using
  1039. the Short Vector Math Library(SVML)
  1040. value - true or false
  1041. funclist - optional comma separated list of one or more math
  1042. library functions to which the attribute should be
  1043. applied
  1044. -ffinite-math-only
  1045. Allow optimizations for floating point arithmetic that assume
  1046. arguments and results are not NaNs or Infinities
  1047. Inlining
  1048. --------
  1049. -inline-level=<n>
  1050. control inline expansion:
  1051. n=0 disable inlining
  1052. n=1 inline functions declared with __inline, and perform C++
  1053. inlining
  1054. n=2 inline any function, at the compiler's discretion
  1055. -f[no-]inline
  1056. inline functions declared with __inline, and perform C++ inlining
  1057. -f[no-]inline-functions
  1058. inline any function at the compiler's discretion
  1059. -finline-limit=<n>
  1060. set maximum number of statements a function can have and still be
  1061. considered for inlining
  1062. -fgnu89-inline
  1063. use C89 semantics for "inline" functions when in C99 mode
  1064. -inline-min-size=<n>
  1065. set size limit for inlining small routines
  1066. -no-inline-min-size
  1067. no size limit for inlining small routines
  1068. -inline-max-size=<n>
  1069. set size limit for inlining large routines
  1070. -no-inline-max-size
  1071. no size limit for inlining large routines
  1072. -inline-max-total-size=<n>
  1073. maximum increase in size for inline function expansion
  1074. -no-inline-max-total-size
  1075. no size limit for inline function expansion
  1076. -inline-max-per-routine=<n>
  1077. maximum number of inline instances in any function
  1078. -no-inline-max-per-routine
  1079. no maximum number of inline instances in any function
  1080. -inline-max-per-compile=<n>
  1081. maximum number of inline instances in the current compilation
  1082. -no-inline-max-per-compile
  1083. no maximum number of inline instances in the current compilation
  1084. -inline-factor=<n>
  1085. set inlining upper limits by n percentage
  1086. -no-inline-factor
  1087. do not set set inlining upper limits
  1088. -inline-forceinline
  1089. treat inline routines as forceinline
  1090. -inline-calloc
  1091. directs the compiler to inline calloc() calls as malloc()/memset()
  1092. -inline-min_caller-growth=<n>
  1093. set lower limit on caller growth due to inlining a single routine
  1094. -no-inline-min-caller-growth
  1095. no lower limit on caller growth due to inlining a single routine
  1096. Output, Debug, PCH
  1097. ------------------
  1098. -c compile to object (.o) only, do not link
  1099. -S compile to assembly (.s) only, do not link
  1100. -fsource-asm
  1101. produce assembly file with optional source annotations (requires -S)
  1102. -f[no-]verbose-asm
  1103. produce assembly file with compiler comments (DEFAULT) (requires -S)
  1104. -fcode-asm
  1105. produce assembly file with optional code annotations (requires -S)
  1106. -use-msasm
  1107. support Microsoft* style assembly language insertion using MASM style
  1108. syntax
  1109. -fasm-blocks
  1110. enables the use of blocks and entire functions of assembly code
  1111. within a C or C++ file
  1112. -Fa[file]
  1113. name assembly file (or directory for multiple files; i.e. /FaMYDIR\)
  1114. -Fo[file]
  1115. name object file (or directory for multiple files; i.e. /FoMYDIR\)
  1116. -o <file>
  1117. name output file
  1118. -g[level]
  1119. Produce symbolic debug information.
  1120. Valid [level] values:
  1121. 0 - Disable generation of symbolic debug information.
  1122. 1 - Emit minimal debug information for performing stack traces.
  1123. 2 - Emit complete debug information. (default for -g)
  1124. 3 - Emit extra information which may be useful for some tools.
  1125. -gdwarf-<version>
  1126. Enable generation of debug information using the specified DWARF
  1127. version. These options may require additional tools such as linkers
  1128. and debuggers which support these formats.
  1129. Valid <version> values:
  1130. 2 - DWARF Debug Information Format Version 2.
  1131. 3 - DWARF Debug Information Format Version 3. (default for -g)
  1132. 4 - DWARF Debug Information Format Version 4.
  1133. -gsplit-dwarf
  1134. Generates an additional output file containing most of the debug
  1135. information. This reduces the size of objects processed by the
  1136. linker. The additional output file will be given a .dwo file
  1137. extension. This option may require additional tools which support
  1138. DWARF object files.
  1139. -debug [keyword]
  1140. Control the emission of debug information.
  1141. Valid [keyword] values:
  1142. none
  1143. Disables debug generation.
  1144. all, full (default if no keyword was specified)
  1145. Generates complete debug information.
  1146. minimal
  1147. Generates line number information.
  1148. extended
  1149. Generates complete debug information with semantic stepping
  1150. and variable locations enabled.
  1151. [no]variable-locations
  1152. Controls additional debug information useful for tracking
  1153. variable values in optimized code.
  1154. [no]semantic-stepping
  1155. Controls additional debug information useful for stepping
  1156. through optimized code.
  1157. [no]pubnames
  1158. Controls generation of the DWARF .debug_pubnames section.
  1159. [no]emit-column
  1160. Controls additional line number information with columns.
  1161. [no]inline-debug-info
  1162. Controls additional debug information for inlined code.
  1163. [no]expr-source-pos
  1164. Controls output of source positions for expressions.
  1165. [no]macros
  1166. Controls output of debug information for preprocessor macros.
  1167. [no-]biendian
  1168. Controls output of additional debug information for endianity.
  1169. parallel
  1170. Emit code instrumentation useful for thread data sharing and
  1171. reentrant call detection.
  1172. -grecord-gcc-switches
  1173. Record command line options in the DW_AT_producer attribute in
  1174. the DWARF debugging information.
  1175. -fvar-tracking
  1176. Same as "-debug variable-locations".
  1177. -fvar-tracking-assignments
  1178. Same as "-debug semantic-stepping".
  1179. -f[no-]dwarf2-cfi-asm
  1180. Control whether the compiler should generate CFI directives which
  1181. the assembler can use to generate unwind information, or if the
  1182. compiler should emit the unwind information directly.
  1183. -fno-merge-debug-strings
  1184. Do not merge identical debug strings in different object files.
  1185. -fno-merge-constants
  1186. Do not merge identical string constants in different object files.
  1187. -ftrapuv trap uninitialized variables
  1188. -map-opts
  1189. enable option mapping tool
  1190. -print-multi-lib
  1191. print information about libraries being used
  1192. -pch-create <file>
  1193. create precompiled header file
  1194. -pch-use <file>
  1195. use precompiled header file
  1196. -pch enable automatic precompiled header file creation/usage
  1197. -pch-dir <dir>
  1198. name precompiled header directory
  1199. -check-pointers=<arg>
  1200. Specifies what type of bounds checking occurs. Possible values are:
  1201. none - Disables bounds checking. This is the default.
  1202. rw - Checks bounds for reads and writes through pointers.
  1203. write - Checks bounds for writes through pointers only.
  1204. -check-pointers-mpx=<arg>
  1205. Enables bounds checking using Intel(R) MPX support. Possible
  1206. values are:
  1207. none - Disables bounds checking. This is the default.
  1208. rw - Checks bounds for reads and writes through pointers.
  1209. write - Checks bounds for writes through pointers only.
  1210. This switch is only valid on targets with Intel(R) MPX support.
  1211. -check-pointers-dangling=<arg>
  1212. Specifies what type of dangling pointer checking occurs. Possible
  1213. values are:
  1214. none - Disables dangling pointer checking. This is the default.
  1215. heap - Check dangling references on heap.
  1216. stack - Check dangling references on stack.
  1217. all - Check dangling references on both heap and stack.
  1218. -[no-]check-pointers-undimensioned
  1219. Bounds checking occurs for memory access through arrays that are
  1220. declared without dimensions. This checking occurs for both
  1221. dimensioned and undimensioned arrays.
  1222. -[no-]check-pointers-narrowing
  1223. When this is disabled, Pointer Checker will not give an error when
  1224. pointers to a structure field are moved to fields in the same
  1225. structure.
  1226. -f[no-]emit-class-debug-always
  1227. Emit debug information for a C++ class into each object file where
  1228. the class is used. This flag is useful for tools which are unable
  1229. to resolve incomplete type descriptions. Using this option may
  1230. cause a large increase in the size of the debug information.
  1231. -f[no-]eliminate-unused-debug-types
  1232. When disabled, debug information for all types present in the
  1233. sources will be emitted. Using this option may cause a large
  1234. increase in the size of the debug information.
  1235. -qemit-build-options
  1236. Output the options used during the compilation to a corresponding
  1237. .dashboard file. This file is to be consumed by the dbmerge tool
  1238. and used by the dashboard tool.
  1239. -qemit-messages
  1240. Output the diagnostics emitted during the compilation to a
  1241. corresponding .dashboard file. This file is to be consumed by the
  1242. dbmerge tool and used by the dashboard tool.
  1243. Preprocessor
  1244. ------------
  1245. -A<name>[<val>]
  1246. create an assertion <name> having value <val>
  1247. -C do not strip comments
  1248. -D<name>[=<text>]
  1249. define macro
  1250. -U<name> remove predefined macro
  1251. -E preprocess to stdout
  1252. -EP preprocess to stdout, omitting #line directives
  1253. -P preprocess to file, omitting #line directives
  1254. -I<dir> add directory to include file search path
  1255. -idirafter<dir>
  1256. add directory to the second include file search path (after -I)
  1257. -isystem<dir>
  1258. add directory to the start of the system include path
  1259. -X, -nostdinc
  1260. remove standard directories from include file search path
  1261. -nostdinc++
  1262. remove standard C++ directories from include file search path
  1263. -iprefix <prefix>
  1264. use <prefix> with -iwithprefix as a prefix
  1265. -iwithprefix <dir>
  1266. append <dir> to the prefix passed in by -iprefix and put it on the
  1267. include search path at the end of the include directories
  1268. -iwithprefixbefore <dir>
  1269. similar to -iwithprefix except the include directory is placed in the
  1270. same place as -I command line include directories
  1271. -iquote <dir>
  1272. add directory to the front of the include file search path for files
  1273. included with quotes, but not brackets
  1274. -imacros <file>
  1275. treat <file> as an #include file, but throw away all preprocessing
  1276. while macros defined remain defined
  1277. -H print include file order
  1278. -B<prefix>
  1279. find libraries, headers and executables in <prefix>
  1280. -M generate makefile dependency information
  1281. -MM similar to -M, but do not include system header files
  1282. -MG similar to -M, but treat missing header files as generated files
  1283. -MD preprocess and compile, generating output file containing dependency
  1284. information ending with extension .d
  1285. -MMD similar to -MD, but do not include system header files
  1286. -MF<file>
  1287. generate makefile dependency information in file (must specify -M
  1288. or -MM)
  1289. -MP add a phony target for each dependency
  1290. -MT<target>
  1291. change the default target rule for dependency generation
  1292. -MQ<target>
  1293. same as -MT, but quotes special Make characters
  1294. -dM output macro definitions in effect after preprocessing (use with -E)
  1295. -dD same as -dM, but output #define directives in preprocessed source
  1296. -dN same as -dD, but #define directives contain only macro names
  1297. -gcc Predefine the "__GNUC__", "__GNUC_MINOR__", and
  1298. "__GNUC_PATCHLEVEL__" macros (DEFAULT)
  1299. -no-gcc Do not predefine GNUC macros listed in -gcc mode. Warning: can
  1300. prevent correct system header compilation, see -gcc-sys
  1301. -gcc-sys same as -no-gcc, except that the GNU macros are defined only while
  1302. preprocessing the system include headers
  1303. -no-icc do not predefine the "__ICC" and "__INTEL_COMPILER" macros.
  1304. Warning: can prevent correct Intel header compilation
  1305. -no-gcc-include-dir
  1306. Do not add the gcc version specific system include directory
  1307. -pragma-optimization-level=[Intel|GCC]
  1308. process #pragma optimize using Intel (DEFAULT) or GCC syntax
  1309. Component Control
  1310. -----------------
  1311. -Qoption,<tool>,<opts>
  1312. pass options <opts> to tool specified by <tool>
  1313. -Qlocation,<tool>,<dir>
  1314. set <dir> as the location of tool specified by <tool>
  1315. -Qinstall <dir>
  1316. set <dir> as root of compiler installation
  1317. Language
  1318. --------
  1319. -std=<std>
  1320. enable language support for <std>, as described below
  1321. c99 conforms to ISO/IEC 9899:1999 standard for C programs
  1322. c11 conforms to ISO/IEC 9899:2011 standard for C programs
  1323. c17 conforms to ISO/IEC 9899:2017 standard for C programs
  1324. c18 conforms to ISO/IEC 9899:2018 standard for C programs
  1325. c++11 enables C++11 support for C++ programs
  1326. c++14 enables C++14 support for C++ programs
  1327. c++17 enables C++17 support for C++ programs
  1328. c++20 enables C++20 support for C++ programs
  1329. c89 conforms to ISO/IEC 9899:1990 standard for C programs
  1330. gnu89 conforms to ISO C90 plus GNU extensions
  1331. gnu99 conforms to ISO C99 plus GNU extensions
  1332. gnu++98 conforms to 1998 ISO C++ standard plus GNU extensions
  1333. gnu++11 conforms to 2011 ISO C++ standard plus GNU extensions
  1334. gnu++14 conforms to 2014 ISO C++ standard plus GNU extensions
  1335. gnu++17 conforms to 2017 ISO C++ standard plus GNU extensions
  1336. gnu++20 conforms to 2020 ISO C++ standard plus GNU extensions
  1337. -x <type>
  1338. all source files found subsequent to -x <type> will be recognized
  1339. as one of the following types:
  1340. c - C source file
  1341. c++ - C++ source file
  1342. c-header - C header file
  1343. cpp-output - C pre-processed file
  1344. c++-cpp-output - C++ pre-processed file
  1345. assembler - assembly file
  1346. assembler-with-cpp - assembly file that needs to be preprocessed
  1347. none - revert to original file extension
  1348. -ansi equivalent to GNU -ansi
  1349. -strict-ansi
  1350. strict ANSI conformance dialect
  1351. -Zp[n] specify alignment constraint for structures where
  1352. n=1,2,4,8,16. 16 is the default
  1353. -fsyntax-only
  1354. perform syntax and semantic checking only (no object file produced)
  1355. -trigraphs
  1356. support ISO C trigraphs (enabled in -ansi mode)
  1357. -fpermissive
  1358. allows extensions for some non-conformant code
  1359. -funsigned-char
  1360. change default char type to unsigned
  1361. -fshort-enums
  1362. allocate as many bytes as needed for enumerated types
  1363. -f[no-]unsigned-bitfields
  1364. change default bitfield type to unsigned
  1365. -fno-rtti
  1366. disable RTTI support
  1367. -fno-implicit-templates
  1368. never emit code for non-inline templates which are instantiated
  1369. implicitly; only emit code for explicit instantiations
  1370. -fno-implicit-inline-templates
  1371. do not emit code for implicit instantiations of inline templates
  1372. -ftemplate-depth=n
  1373. control the depth in which recursive templates are expanded
  1374. -[no]align
  1375. analyze and reorder memory layout for variables and arrays
  1376. -[no-]restrict
  1377. enable/disable the 'restrict' keyword for disambiguating pointers
  1378. -[no-]early-template-check
  1379. enable/disable (DEFAULT) semantic checking of function template
  1380. prototypes (before instantiation).
  1381. -help-pragma
  1382. output supported pragmas and their usage syntax
  1383. -ffriend-injection
  1384. inject friend functions into the enclosing namespace. Use
  1385. -fno-friend-injection to disable
  1386. -check=<keyword>[,<keyword>,...]
  1387. check run-time conditions.
  1388. keywords: [no]conversions, [no]stack, [no]uninit
  1389. -qopt-assume-safe-padding
  1390. assume that variables and dynamically allocated memory are padded
  1391. (Intel(R) MIC Architecture specific)
  1392. Compiler Diagnostics
  1393. --------------------
  1394. -w disable all warnings
  1395. -w<n> control diagnostics
  1396. n = 0 enable errors only (same as -w)
  1397. n = 1 enable warnings and errors (DEFAULT)
  1398. n = 2 enable verbose warnings, warnings and errors
  1399. n = 3 enable remarks, verbose warnings, warnings and errors
  1400. -Wbrief print brief one-line diagnostics
  1401. -Werror force warnings to be reported as errors
  1402. -Werror-all
  1403. force warnings and currently enabled remarks to be reported as errors
  1404. -Wall enable all warnings
  1405. -Wremarks
  1406. enable all remarks and comments
  1407. -Wcheck enable more strict diagnostics
  1408. -Weffc++ enable effective C++ diagnostic warnings
  1409. -wo<L1>[,<L2>,...]
  1410. issue diagnostics L1 through LN only once
  1411. -W[no-]fatal-errors
  1412. ends compilation after the first error encountered
  1413. -W[no-]format
  1414. enable argument checking for calls to printf, scanf, etc
  1415. -W[no-]format-security
  1416. warn for uses of format strings and specifiers in printf,
  1417. scanf, etc that may introduce security problems
  1418. -W[no-]missing-declarations
  1419. warn for global functions and variables without prior declaration
  1420. -W[no-]missing-prototypes
  1421. warn for missing prototypes
  1422. -W[no-]strict-aliasing
  1423. warn for code that might violate the optimizer's strict aliasing
  1424. rules. Warnings are issued only when using -fstrict-aliasing or
  1425. -ansi-alias.
  1426. -W[no-]strict-prototypes
  1427. warn for functions declared or defined without specified argument
  1428. types
  1429. -W[no-]pointer-arith
  1430. warn for questionable pointer arithmetic
  1431. -W[no-]uninitialized
  1432. warn if a variable is used before being initialized
  1433. -Winline enable inline diagnostics
  1434. -W[no-]deprecated
  1435. print warnings related to deprecated features
  1436. -W[no-]abi
  1437. warn if generated code is not C++ ABI compliant
  1438. -Wcontext-limit=<n>
  1439. set maximum number of template instantiation contexts shown in
  1440. diagnostic
  1441. -Wcast-qual
  1442. warn if cast is used to override pointer type qualifier
  1443. -W[no-]unused-function
  1444. warn if declared function is not used
  1445. -W[no-]unused-parameter
  1446. warn if declared function parameter is not used
  1447. -W[no-]unknown-pragmas
  1448. warn if an unknown #pragma directive is used (DEFAULT)
  1449. -W[no-]main
  1450. warn if return type of main is not expected
  1451. -W[no-]comment[s]
  1452. warn when comment
  1453. -W[no-]conversion
  1454. warn for implicit conversions that may alter a value
  1455. -W[no-]return-type
  1456. Issue warnings when a function is declared without a return type or
  1457. when the definition of a function returning void contains a return
  1458. statement with an expression
  1459. -W[no-]extra-tokens
  1460. warn about extra tokens after preprocessor directives
  1461. -W[no-]invalid-pch
  1462. warn about problems with existing precompiled headers
  1463. -W[no-]shadow
  1464. warn when a variable declaration hides a previous declaration
  1465. -Woverloaded-virtual
  1466. warn when a function declaration hides virtual functions from a base
  1467. class
  1468. -W[no-]trigraphs
  1469. warn about the recognition and conversion of trigraphs
  1470. -W[no-]multichar
  1471. warn if a multicharacter constant ('ABC') is used
  1472. -W[no-]overflow
  1473. warn for operations that could result in integer overflow
  1474. -Wwrite-strings
  1475. Issues a diagnostic message if const char * is converted
  1476. to (non-const) char *.
  1477. -W[no-]sign-compare
  1478. warn for comparisons between signed and unsigned values that
  1479. could produce unintended results after sign conversion
  1480. -W[no-]ic-pointer
  1481. warn for conversions between pointers to distinct scalar types
  1482. with the same representation
  1483. -Wp64 print diagnostics for 64-bit porting
  1484. -W[no-]shorten-64-to-32
  1485. warn for values implicitly converted from a 64-bit to a 32-bit type.
  1486. Similar to -Wp64
  1487. -[no]traceback
  1488. specify whether the compiler generates data to allow for source file
  1489. traceback information at runtime (only to be used when linking with
  1490. Fortran programs)
  1491. -diag-enable=<v1>[,<v2>,...]
  1492. enable the specified diagnostics or diagnostic groups
  1493. -diag-disable=<v1>[,<v2>,...]
  1494. disable the specified diagnostics or diagnostic groups
  1495. where <vN> may be individual diagnostic numbers or group names.
  1496. where group names include:
  1497. thread - diagnostics to aid in thread-enabling source
  1498. power - controls whether diagnostics are enabled for
  1499. possibly inefficient code that may affect power
  1500. consumption when running on Intel(R) processors
  1501. port-win - diagnostics for GNU extensions that may
  1502. cause errors when porting to Windows
  1503. openmp - diagnostics issued by the OpenMP* parallelizer
  1504. warn - diagnostics that have "warning" severity level
  1505. error - diagnostics that have "error" severity level
  1506. remark - diagnostics that are remarks or comments
  1507. vec - diagnostics issued by the vectorizer
  1508. par - diagnostics issued by the auto-parallelizer
  1509. cpu-dispatch
  1510. - specifies the CPU dispatch remarks
  1511. biendian-verbose
  1512. - advanced bi-endian specific diagnostics
  1513. -diag-error=<v1>[,<v2>,...]
  1514. output the specified diagnostics or diagnostic groups as errors
  1515. -diag-warning=<v1>[,<v2>,...]
  1516. output the specified diagnostics or diagnostic groups as warnings
  1517. -diag-remark=<v1>[,<v2>,...]
  1518. output the the specified diagnostics or diagnostic groups as remarks
  1519. -diag-dump
  1520. display the currently enabled diagnostic messages to stdout
  1521. -diag-file[=<file>]
  1522. <file> where diagnostics are emitted to. Not specifying this causes
  1523. messages to be output to stderr
  1524. -diag-file-append[=<file>]
  1525. <file> where diagnostics are emitted to. When <file> already exists,
  1526. output is appended to the file
  1527. -[no-]diag-id-numbers
  1528. enable(DEFAULT)/disable the diagnostic specifiers to be output in
  1529. numeric form
  1530. -diag-error-limit=<num>
  1531. specify the maximum number of errors emitted
  1532. -diag-once=<v1>[,<v2>,...]
  1533. issue diagnostics v1 through vN only once
  1534. -W[no-]pch-messages
  1535. enable(DEFAULT)/disable PCH information messages
  1536. Miscellaneous
  1537. -------------
  1538. -V display compiler version information
  1539. -dumpversion
  1540. display the compiler version number only
  1541. -dumpmachine
  1542. display the target machine only
  1543. --version
  1544. display GCC style version information
  1545. -sox[=<keyword>[,keyword]]
  1546. enable saving of compiler options, version and additional information
  1547. in the executable. Use -no-sox to disable(DEFAULT)
  1548. profile - include profiling data
  1549. inline - include inlining information
  1550. -save-temps
  1551. store the intermediate files in current directory and name them
  1552. based on the source file. Only saves files that are generated by
  1553. default
  1554. -dryrun show driver tool commands but do not execute tools
  1555. -v show driver tool commands and execute tools
  1556. -watch=<keyword>
  1557. tells the driver to output processing information
  1558. keywords: all, none (same as -nowatch), [no]source,
  1559. [no]cmd (same as -v)
  1560. [no]offload-cmd
  1561. -nowatch suppress processing information output (DEFAULT)
  1562. -[no-]multibyte-chars
  1563. provide support for multi-byte characters
  1564. -multiple-processes[=<n>]
  1565. create multiple processes that can be used to compile large numbers
  1566. of source files at the same time
  1567. -standalone
  1568. create standalone compilation environment, helpful for bootstrap
  1569. environments where gcc is not available during the build
  1570. -qnextgen
  1571. invokes the Intel Compiler for LLVM*
  1572. -qnextgen-diag
  1573. This option causes the Intel Compiler for LLVM* to display a list
  1574. of compiler options that are currently not supported.
  1575. Offload
  1576. -------
  1577. -qoffload=<arg>
  1578. define whether offload is enabled, and if enabled, whether CPU
  1579. fallback is permitted
  1580. keywords: none, optional, mandatory
  1581. -qno-offload
  1582. disable any offload usage
  1583. Data
  1584. ----
  1585. -Zp[n] specify alignment constraint for structures (n=1,2,4,8,16
  1586. -Zp16 DEFAULT)
  1587. -fminshared
  1588. Compilation is for the main executable. Absolute addressing can be
  1589. used and non-position independent code generated for symbols that
  1590. are at least protected
  1591. -fcommon Enables the compiler to treat common variables as if they were
  1592. defined. That in turn allows the use of gprel addressing of common
  1593. data variables. -fno-common disables
  1594. -freg-struct-return
  1595. return struct and union values in registers when possible
  1596. -fstack-security-check
  1597. enable overflow security checks.
  1598. -fno-stack-security-check disables (DEFAULT)
  1599. -fstack-protector
  1600. enable stack overflow security checks.
  1601. -fno-stack-protector disables (DEFAULT)
  1602. -fstack-protector-strong
  1603. enable stack overflow security checks for routines with any buffer.
  1604. -fno-stack-protector-strong disables (DEFAULT)
  1605. -fstack-protector-all
  1606. enable stack overflow security checks including functions.
  1607. -fno-stack-protector-all disables (DEFAULT)
  1608. -fpic, -fPIC
  1609. generate position independent code (-fno-pic/-fno-PIC is DEFAULT)
  1610. -fpie, -fPIE
  1611. generate position independent code that will be linked into an
  1612. executable (-fno-pie/-fno-PIE is DEFAULT)
  1613. -auto-ilp32
  1614. specify that the application cannot exceed a 32-bit address space
  1615. (-ipo[n] required)
  1616. -auto-p32 instructs the compiler to analyze the program to determine if there
  1617. are 64-bit pointers that can be safely shrunk to 32-bit pointers.
  1618. (-ipo required)
  1619. -[no-]global-hoist
  1620. enable(DEFAULT)/disable external globals are load safe
  1621. -f[no-]keep-static-consts
  1622. enable/disable(DEFAULT) the ability to preserve allocation of
  1623. variables that are not referenced in the source
  1624. -fpack-struct
  1625. pack structure members together
  1626. -f[no-]math-errno
  1627. set ERRNO after calling standard math library functions
  1628. -no-bss-init
  1629. disable placement of zero-initialized variables in BSS (use DATA)
  1630. -f[no-]zero-initialized-in-bss
  1631. put explicitly zero initialized variables into the DATA section
  1632. instead of the BSS section
  1633. -mcmodel=<size>
  1634. use a specific memory model to generate code and store data
  1635. small - Restricts code and data to the first 2GB of address
  1636. space (DEFAULT)
  1637. medium - Restricts code to the first 2GB; it places no memory
  1638. restriction on data
  1639. large - Places no memory restriction on code or data
  1640. -falign-functions=<n>
  1641. align the start of functions on a 2 (DEFAULT) or <n> byte boundary
  1642. where <n> is a power of 2
  1643. -falign-functions
  1644. align the start of functions to an optimal machine-dependent value.
  1645. -fno-align-functions (DEFAULT) aligns on a 2-byte boundary
  1646. -fvisibility=[extern|default|protected|hidden|internal]
  1647. Global symbols (data and functions) will get the visibility
  1648. attribute given by default. Symbol visibility attributes explicitly
  1649. set in the source code or using the symbol visibility attribute
  1650. file options will override the -fvisibility setting
  1651. -fvisibility-extern=<file>
  1652. Space separated symbols listed in the <file> argument will get
  1653. visibility set to extern
  1654. -fvisibility-default=<file>
  1655. Space separated symbols listed in the <file> argument will get
  1656. visibility set to default
  1657. -fvisibility-protected=<file>
  1658. Space separated symbols listed in the <file> argument will get
  1659. visibility set to protected
  1660. -fvisibility-hidden=<file>
  1661. Space separated symbols listed in the <file> argument will get
  1662. visibility set to hidden
  1663. -fvisibility-internal=<file>
  1664. Space separated symbols listed in the <file> argument will get
  1665. visibility set to internal
  1666. -fvisibility-inlines-hidden
  1667. mark inline member functions as hidden
  1668. -mlong-double-64
  1669. enable 64-bit 'long double'
  1670. 80-bit floating-point type is available as __float80.
  1671. -mlong-double-80
  1672. enable 80-bit 'long double'
  1673. Compatibility
  1674. -------------
  1675. -gcc-name=<name>
  1676. name and location of gcc if not where expected
  1677. -gxx-name=<name>
  1678. name and location of g++ if not where expected
  1679. -fabi-version=<val>
  1680. directs the compiler to select a specific ABI implementation
  1681. 0 - most recent ABI implementation
  1682. 1 - g++ 3.2 compatible ABI implementation
  1683. 2 - most conformant ABI implementation
  1684. -fms-dialect[=<arg>]
  1685. enable compatibility with a specific Microsoft* Visual Studio
  1686. version
  1687. 11 - Microsoft* Visual Studio 2012 compatibility
  1688. 12 - Microsoft* Visual Studio 2013 compatibility
  1689. 14 - Microsoft* Visual Studio 2015 compatibility
  1690. 14.1 - Microsoft* Visual Studio 2017 compatibility
  1691. 14.2 - Microsoft* Visual Studio 2019 compatibility
  1692. -param-byte-order=<val>
  1693. Defines byte order used to pass parameters
  1694. legacy - parameters are passed in the declared byte order
  1695. (compatibility mode)
  1696. little-endian - parameters are passed in the little-endian form
  1697. (recommended)
  1698. -platform=<target platform>
  1699. specify the <target platform> target for cross compilation.
  1700. Default value for target platform is the same as host platform.
  1701. Example: -platform=qnx640 -> generated code is for
  1702. QNX* Neutrino* RTOS 6.4.0
  1703. -little-endian
  1704. specify that the compilation assumes little endian conventions
  1705. -big-endian
  1706. specify that the compilation assumes big endian conventions
  1707. -q[no-]enable-biendian-extended-cxx
  1708. enable/disable(DEFAULT) extended C++ support mode
  1709. -[no-]pe-file-primary
  1710. prolog/epilog mechanism for bracketing source files
  1711. -pe-file-prefix=<path>
  1712. <path> is prefixed to prolog/epilog files specified
  1713. by pe-(i|u)dir-rule
  1714. -extern-prefix=<string>
  1715. specify a <string> to be prepended to external C symbols
  1716. -use-decl-byte-order
  1717. compile the function definition with the byte order specified in
  1718. the function declaration
  1719. -pe-udir-rule="<regular expression> <prolog file> <epilog file>"
  1720. associate user header file(s) with prolog and epilog files.
  1721. For user header files the following search order is applied:
  1722. -pe-udir-rule settings, -pe-idir-rule settings
  1723. -pe-idir-rule="<regular expression> <prolog file> <epilog file>"
  1724. associate system header file(s) with prolog and epilog files.
  1725. For system header files the following search order is applied:
  1726. -pe-idir-rule settings, the platform include directory is used
  1727. for __intel_prolog.h and __intel_epilog.h
  1728. -pe-dir-rule="<regular expression> <prolog file> <epilog file>"
  1729. same as -pe-idir-rule
  1730. -[no-]add-response-file-dependencies
  1731. include response files in dependency generation output
  1732. -[no-]swap-pointers
  1733. specify whether objects of pointer type are byte swapped
  1734. -symcheck
  1735. enable checking of global symbol types
  1736. -[no-]little-endian-defaultlibs
  1737. Treat default libraries as little-endian during type checking.
  1738. This option should be used in conjunction with -symcheck which
  1739. enables type checking mechanism.
  1740. -little-endian-libs=<libname1>[,<libname2>...]
  1741. Sets list of little-endian libraries for type checking. Library
  1742. name can be either regular expression or start with -l prefix. For
  1743. example, -little-endian-libs=-lmy makes libmy.a/libmy.so
  1744. little-endian. This option should be used in conjunction with
  1745. -symcheck which enables type checking mechanism.
  1746. -[no-]multiline-strings
  1747. allows the inclusion of new lines within strings
  1748. -size-llp64
  1749. enable LLP64 compilation mode
  1750. -promote-varargs-to-64bit
  1751. promote big-endian arguments passed to varargs functions to 64-bit
  1752. -[no-]resolve-byte-order-mismatch
  1753. automatically adjust byte order of local variables to resolve
  1754. mismatch during pointer conversion (disabled by default)
  1755. -gnu-prefix=prefix
  1756. specify a prefix that will be added to the names of GNU utilities
  1757. called from the compiler
  1758. Linking/Linker
  1759. --------------
  1760. -L<dir> instruct linker to search <dir> for libraries
  1761. -l<string>
  1762. instruct the linker to link in the -l<string> library
  1763. -shared-intel
  1764. link Intel provided libraries dynamically
  1765. -static-intel
  1766. link Intel provided libraries statically
  1767. -shared-libgcc
  1768. link libgcc dynamically
  1769. -static-libgcc
  1770. link libgcc statically
  1771. -static-libstdc++
  1772. link libstdc++ statically
  1773. -dynamic-linker<file>
  1774. select dynamic linker other than the default
  1775. -no-cxxlib
  1776. do not link in C++ runtime libraries
  1777. -cxxlib[=dir]
  1778. link using C++ run-time libraries provided with gcc dir is an
  1779. optional top-level location for the gcc binaries and libraries
  1780. -nodefaultlibs
  1781. do not use standard libraries when linking
  1782. -nostartfiles
  1783. do not use standard startup files when linking
  1784. -nostdlib
  1785. do not use standard libraries and startup files when linking
  1786. -static prevents linking with shared libraries
  1787. -shared produce a shared object
  1788. -Bstatic specify following libraries are linked statically
  1789. -Bdynamic
  1790. specify following libraries are linked dynamically
  1791. -pthread use POSIX* thread library for multithreading support
  1792. -cxxlib-<mode>
  1793. tell the compiler which C++ run-time libraries to use
  1794. nostd - do not link in standard C++ library
  1795. -u <symbol>
  1796. pretend the <symbol> is undefined
  1797. -T <file>
  1798. direct linker to read link commands from <file>
  1799. -Xassembler <val>
  1800. pass <val> directly to the assembler for processing
  1801. -Xlinker <val>
  1802. pass <val> directly to the linker for processing
  1803. -Wa,<o1>[,<o2>,...]
  1804. pass options o1, o2, etc. to the assembler
  1805. -Wl,<o1>[,<o2>,...]
  1806. pass options o1, o2, etc. to the linker for processing
  1807. -Wp,<o1>[,<o2>,...]
  1808. pass options o1, o2, etc. to the preprocessor
  1809. -pie,-no_pie
  1810. generate position independent code that will be linked into an
  1811. executable (-pie is DEFAULT for macOS* 10.7 and later)
  1812. -no-pie/-no_pie disables position independent code
  1813. -fuse-ld=<arg>
  1814. Use different linker instead of default linker (ld)
  1815. bfd - use bfd linker
  1816. gold - use gold linker
  1817. Linker Specific Options
  1818. -----------------------
  1819. These options are specific to the linker. Details can be found in the linker
  1820. documentation and man page
  1821. -L<dir>
  1822. -T<arg>
  1823. -h<arg>
  1824. -u<arg>
  1825. -z<arg>
  1826. -i
  1827. -r
  1828. -s
  1829. -N
  1830. -Bsymbolic
  1831. -Bdynamic
  1832. -Bstatic
  1833. Deprecated Options
  1834. ------------------
  1835. -use-asm No replacement
  1836. -qopt-report [n] use -qopt-report[=n]
  1837. -cilk-serialize No replacement
  1838. -qcf-protection=shadow_stack use -fcf-protection=return
  1839. -qcf-protection=branch_tracking use -fcf-protection=branch
  1840. -qcf-protection=[full|none] use -fcf-protection=[full|none]
  1841. -march=icelake use -march=icelake-client
  1842. -mtune=icelake use -mtune=icelake-client
  1843. -mcpu=icelake use -mcpu=icelake-client
  1844. -xICELAKE use -xICELAKE-CLIENT
  1845. -axICELAKE use -axICELAKE-CLIENT
  1846. -Kc++ use -x c++
  1847. -wn use -diag-error-limit
  1848. -wd use -diag-disable
  1849. -we use -diag-error
  1850. -ww use -diag-warning
  1851. -wr use -diag-remark
  1852. -wo use -diag-once
  1853. -std=c9x use -std=c99
  1854. -rcd No replacement
  1855. -help [category] print full or category help message
  1856. Valid categories include
  1857. advanced - Advanced Optimizations
  1858. codegen - Code Generation
  1859. compatibility - Compatibility
  1860. component - Component Control
  1861. data - Data
  1862. deprecated - Deprecated Options
  1863. diagnostics - Compiler Diagnostics
  1864. float - Floating Point
  1865. help - Help
  1866. inline - Inlining
  1867. ipo - Interprocedural Optimization (IPO)
  1868. language - Language
  1869. link - Linking/Linker
  1870. misc - Miscellaneous
  1871. opt - Optimization
  1872. output - Output
  1873. pgo - Profile Guided Optimization (PGO)
  1874. preproc - Preprocessor
  1875. reports - Optimization Reports
  1876. openmp - OpenMP and Parallel Processing
  1877. Copyright (C) 1985-2021, Intel Corporation. All rights reserved.
  1878. * Other names and brands may be claimed as the property of others.