CLANG-REPL(1)
โจ CLANG-REPL(1) โจ
Like, hi bestie ๐ welcome to the clang-repl manual page, the one and only, fr fr. It's giving interactive C++ compiler energy, and we're about to vibe check every single flag. No cap, we keep ALL the details.
๐ธ NAME ๐ธ
clang-repl โ manual page for clang-repl 22
๐ฆ DESCRIPTION ๐ฆ
USAGE: clang-repl [options] [code to run]
Okay so you run it like that ๐, and then the options start. Buckle up, because this list is LONG but we're obsessed.
๐ OPTIONS ๐
๐ Color Options ๐
--colorโ Use colors in output (default=autodetect). So it's giving rainbow when your terminal says yes ๐
โก General options โก
Now the main character section. Every single one, we're listing, no skips.
--Xcc=<string>โ Argument to pass to the CompilerInvocation. Pass it along, bestie.--aarch64-neon-syntax=<value>โ Choose style of NEON code to emit from AArch64 backend:=genericโ Emit generic NEON assembly=appleโ Emit Apple-style NEON assembly
--aarch64-use-aaโ Enable the use of AA during codegen. AA said yes โจ--abort-on-max-devirt-iterations-reachedโ Abort when the max iterations for devirtualization CGSCC repeat pass is reached. It's giving "we tried, we really did, now we abort."--allow-ginsert-as-artifactโ AllowG_INSERTto be considered an artifact. Hack around AMDGPU test infinite loops. Like, a little hack, a little slay.--amdgpu-atomic-optimizer-strategy=<value>โ Select DPP or Iterative strategy for scan:=DPPโ Use DPP operations for scan=Iterativeโ Use Iterative approach for scan=Noneโ Disable atomic optimizer
--amdgpu-bypass-slow-divโ Skip 64-bit divide for dynamic 32-bit values. Not me avoiding the slow path ๐--amdgpu-disable-loop-alignmentโ Do not align and prefetch loops. Loops said leave me alone.--amdgpu-dpp-combineโ Enable DPP combiner. Combine, bestie.--amdgpu-dump-hsa-metadataโ Dump AMDGPU HSA Metadata. Dump it, queen.--amdgpu-enable-merge-m0โ Merge and hoist M0 initializations. Hoist it up, up, up.--amdgpu-indirect-call-specialization-threshold=<uint>โ A threshold controls whether an indirect call will be specialized. Set the threshold, let the calls know.--amdgpu-kernarg-preloadโ Enable preload kernel arguments to SGPRs. Preload like it's a game update.--amdgpu-kernarg-preload-count=<uint>โ How many kernel arguments to preload onto SGPRs. Count them, bestie.--amdgpu-module-splitting-max-depth=<uint>โ maximum search depth.0forces a greedy approach. warning: the algorithm is up toO(2^N), whereNis the max depth. Okay so that warning is real, it's giving exponential, be careful. ๐จ--amdgpu-promote-alloca-to-vector-limit=<uint>โ Maximum byte size to consider promote alloca to vector. Limit it.--amdgpu-promote-alloca-to-vector-max-regs=<uint>โ Maximum vector size (in 32b registers) to use when promoting alloca. Regs but make it max.--amdgpu-promote-alloca-to-vector-vgpr-ratio=<uint>โ Ratio of VGPRs to budget for promoting alloca to vectors. Budget ratio, slay.--amdgpu-sdwa-peepholeโ Enable SDWA peepholer. Peephole but make it SDWA.--amdgpu-use-aa-in-codegenโ Enable the use of AA during codegen. AA again, iconic.--amdgpu-verify-hsa-metadataโ Verify AMDGPU HSA Metadata. Verify, don't guess.--amdgpu-vgpr-index-modeโ Use GPR indexing mode instead of movrel for vector indexing. GPR mode said "not me using movrel".--arc-contract-use-objc-claim-rvโ Enable generation of calls toobjc_claimAutoreleasedReturnValue. ObjC said claim it.--argext-abi-checkโ Verify that narrow int args are properly extended per the SystemZ ABI. Check those narrow ints, bestie.--arm-add-build-attributesโ no description in the original, but it's still here, periodt ๐--arm-implicit-it=<value>โ Allow conditional instructions outside of an IT block:=alwaysโ Accept in both ISAs, emit implicit ITs in Thumb=neverโ Warn in ARM, reject in Thumb=armโ Accept in ARM, reject in Thumb=thumbโ Warn in ARM, emit implicit ITs in Thumb
--asm-show-instโ Emit internal instruction representation to assembly file. Spill the internal tea into asm.--atomic-counter-update-promotedโ Do counter update using atomic fetch add for promoted counters only. Only the promoted ones, periodt.--atomic-first-counterโ Use atomic fetch add for first counter in a function (usually the entry counter). First counter gets the atomic fetch add treatment.--basic-block-section-match-inferโ Enable matching and inference when generating basic block sections. Match, infer, generate, repeat.--bounds-checking-single-trapโ Use one trap block per function. One trap, no more.--bpf-stack-size=<int>โ Specify the BPF stack size limit. Give BPF a stack limit, bestie.--cfg-hide-cold-paths=<number>โ Hide blocks with relative frequency below the given value. Hide the cold paths, they're not invited.--cfg-hide-deoptimize-pathsโ no description in the original, but it's here, and we respect it ๐ซถ--cfg-hide-unreachable-pathsโ also no description in the original, still in the lineup โจ--check-functions-filter=<regex>โ Only emit checks for arguments of functions whose names match the given regular expression. Regex filter, very regex-core.--conditional-counter-updateโ Do conditional counter updates in single byte counters mode). Yes, that closing paren is in the original, we keep it exactly. Not me noticing that ๐--cost-kind=<value>โ Target cost kind:=throughputโ Reciprocal throughput=latencyโ Instruction latency=code-sizeโ Code size=size-latencyโ Code size and latency=allโ Print all cost kinds
--crelโ Use CREL relocation format for ELF. CREL it up.--cs-profile-generateโ Perform context sensitive PGO instrumentation. Context sensitive PGO, she's specialized.--cs-profile-path=<string>โ Context sensitive profile file path. Point to the file, bestie.--ctx-prof-include-emptyโ Also write profiles with all-zero counters. Intended for testing/debugging. All-zero counters, for the test girlies.--ctx-profile-force-is-specializedโ Treat the given module as-if it were containing the post-thinlink module containing the root. As-if, lowkey.--debugify-atomsโ no description in the original, just atoms, debugified ๐ง--debugify-func-limit=<ulong>โ Set max number of processed functions per pass. Max functions, periodt.--debugify-level=<value>โ Kind of debug info to add:=locationsโ Locations only=location+variablesโ Locations and Variables
--debugify-quietโ Suppress verbose debugify output. Quiet mode, shhh ๐คซ--devirtualize-speculativelyโ Enable speculative devirtualization optimization. Speculative devirtualization, she's guessing but make it optimization.--disable-auto-upgrade-debug-infoโ Disable autoupgrade of debug info. No upgrades, we're staying.--disable-i2p-p2i-optโ Disables inttoptr/ptrtoint roundtrip optimization. Roundtrip optimization said not today.--disable-promote-alloca-to-ldsโ Disable promote alloca to LDS. No LDS promotion, bestie.--disable-promote-alloca-to-vectorโ Disable promote alloca to vector. No vector promotion either.--disable-qfp-optโ Disable optimization of Qfloat operations. Qfloat said no optimization.--disable-qfp-opt-mulโ Disable optimization of Qfloat operations for multiply. Multiply specifically, no Qfloat opt for you.--do-counter-promotionโ Do counter register promotion. Promote those counters, slay.--dot-cfg-mssa=<file name for generated dot file>โ file name for generated dot file. Yes, the placeholder literally says that, we copied it exactly.--dwarf-version=<int>โ Dwarf version. Dwarf version, not to be confused with the fantasy kind.--dwarf64โ Generate debugging info in the 64-bit DWARF format. 64-bit DWARF, she's big.--elide-all-zero-branch-weightsโ no description in the original, but we're keeping it ๐--emit-bb-hashโ Emit the hash of basic block in theSHT_LLVM_BB_ADDR_MAPsection. Emit that hash, bestie.--emit-compact-unwind-non-canonicalโ Whether to try to emit Compact Unwind for non canonical entries. Non canonical entries? Maybe compact unwind, maybe not.--emit-dwarf-unwind=<value>โ Whether to emit DWARF EH frame entries:=alwaysโ Always emit EH frame entries=no-compact-unwindโ Only emit EH frame entries when compact unwind is not available=defaultโ Use target platform default
--emit-gnuas-syntax-on-zosโ Emit GNU Assembly Syntax on z/OS. z/OS said give me GNU asm syntax.--emscripten-cxx-exceptions-allowed=<string>โ The list of function names in which Emscripten-style exception handling is enabled (see emscriptenEMSCRIPTEN_CATCHING_ALLOWEDoptions). A whole list of function names, very specific, very iconic.--enable-cse-in-irtranslatorโ Should enable CSE in irtranslator. CSE in irtranslator, yes.--enable-cse-in-legalizerโ Should enable CSE in Legalizer. CSE in Legalizer too, periodt.--enable-devirtualize-speculativelyโ Enable speculative devirtualization optimization. Same energy as--devirtualize-speculatively, but withenable-in front.--enable-emscripten-cxx-exceptionsโ WebAssembly Emscripten-style exception handling. Emscripten exceptions, enabled.--enable-emscripten-sjljโ WebAssembly Emscripten-stylesetjmp/longjmphandling. SJLJ said yes.--enable-gvn-hoistโ Enable the GVN hoisting pass (default = off). Default is off, so turn it on if you want hoisting.--enable-gvn-memdepโ no description in the original, but GVN memdep, she's enabled if you say so ๐ฆ--enable-gvn-memoryssaโ also no description in the original, still memory SSA, still iconic โจ--enable-gvn-sinkโ Enable the GVN sinking pass (default = off). Sink it, but only if you enable it, because default is off.
still in OPTIONS, still slaying, we got a LOT more flags to go โจ
--enable-jump-table-to-switchโ turns on the JumpTableToSwitch pass. Default is off ๐ค--enable-load-in-loop-preโ no description given, bestie, it's just there, existing ๐--enable-load-preโ also no description. mysterious. iconic. ๐--enable-loop-simplifycfg-term-foldingโ again, no desc. it simply is ๐ซถ--enable-name-compressionโ enables name/filename string compression ๐ฆ--enable-poison-reuse-guardโ enables the poison-reuse guard โ ๏ธ--enable-split-backedge-in-load-preโ no description, love that for it ๐ธ--enable-split-loopiv-heuristicโ enables the loop iv regalloc heuristic ๐--enable-vtable-profile-useโ if ThinLTO and WPD are enabled and this one is true, then vtable profiles get used by the ICP pass for a more efficient indirect call sequence. If it's false, type profiles won't be used. ๐ซ--enable-vtable-value-profilingโ if true, the virtual table address gets instrumented so we know the types of a C++ pointer. That info gets used in indirect call promotion to do a selective vtable-based comparison ๐--execute-concurrency=<uint>โ how many threads get used to process all the files in parallel. Set it to 0 for hardware concurrency. Heads up: this flag only applies to all-TUs ๐งต--executor=<string>โ the name of the executor to use ๐น๏ธ--expand-variadics-override=<value>โ overrides the behaviour of expand-variadics=unspecifiedโ use the implementation defaults=disableโ disable the pass entirely=optimizeโ optimise without changing ABI=loweringโ change variadic calling convention
--experimental-debug-variable-locationsโ use the experimental new value-tracking variable locations ๐งช--fatal-warningsโ treats warnings as errors ๐ค--fdpicโ use the FDPIC ABI--filter=<string>โ only processes files that match this filter. Again, this flag only applies to all-TUs ๐ฏ--force-tail-folding-style=<value>โ forces the tail folding style=noneโ disable tail folding=dataโ create lane mask for data only, using theactive.lane.maskintrinsic=data-without-lane-maskโ create lane mask withcompare/stepvector=data-and-controlโ create lane mask using theactive.lane.maskintrinsic, and use it for both data and control flow=data-and-control-without-rt-checkโ similar todata-and-control, but remove the runtime check=data-with-evlโ use predicated EVL instructions for tail folding. If EVL isn't supported, fallback todata-without-lane-mask๐ฆ
--fs-profile-debug-bw-threshold=<uint>โ only shows the debug message if the source branch weight is greater than this value ๐--fs-profile-debug-prob-diff-threshold=<uint>โ only shows the debug message if the branch probability is greater than this value (in percentage) ๐--generate-merged-base-profilesโ when generating nested context-sensitive profiles, always generate an extra base profile for a function with all of its context profiles merged into it ๐งฉ--gpsize=<uint>โ Global Pointer Addressing Size. The default size is 8 ๐ฑ--gsframeโ whether to emit.sframeunwind sections ๐ช--hash-based-counter-splitโ renames the counter variable of a comdat function based on cfg hash #๏ธโฃ--hexagon-add-build-attributesโ no description, just vibes ๐--hexagon-rdf-limit=<uint>โ also no description. silent. stoic. ๐--hot-cold-splitโ enables the hot-cold splitting pass ๐ฅโ๏ธ--hwasan-percentile-cutoff-hot=<int>โ hot percentile cutoff ๐ก๏ธ--hwasan-random-rate=<number>โ a probability value in the range[0.0, 1.0]to keep instrumentation of a function. Note: instrumentation can get skipped randomly OR because of the hot percentile cutoff, if both are supplied ๐--implicit-mapsymsโ allows the mapping symbol at the section beginning to be implicit, which lowers the number of mapping symbols at the expense of some portability. Recommended for projects that can build all their object files using this option ๐บ๏ธ--import-all-indexโ import all external functions in index ๐ฅ--incremental-linker-compatibleโ when used withfiletype=obj, emits an object file that can be used with an incremental linker ๐--instcombine-code-sinkingโ enables code sinking โฌ๏ธ--instcombine-guard-widening-window=<uint>โ how wide an instruction window to bypass looking for another guard ๐ช--instcombine-max-num-phis=<uint>โ the maximum number of phis to handle inintptr/ptrintfolding ๐ข--instcombine-max-sink-users=<uint>โ the maximum number of undroppable users for instruction sinking ๐ง--instcombine-maxarray-size=<uint>โ the maximum array size considered when doing a combine ๐--instcombine-negator-enabledโ should we attempt to sink negations? ๐ค--instcombine-negator-max-depth=<uint>โ what's the maximal lookup depth when trying to check for viability of negation sinking ๐ณ๏ธ--instrprof-atomic-counter-update-allโ makes all profile counter updates atomic. (for testing only) โ๏ธ--internalize-public-api-file=<filename>โ a file containing a list of symbol names to preserve ๐--internalize-public-api-list=<list>โ a list of symbol names to preserve ๐--intrinsic-cost-strategy=<value>โ the costing strategy for intrinsic instructions=instruction-costโ useTargetTransformInfo::getInstructionCost=intrinsic-costโ useTargetTransformInfo::getIntrinsicInstrCost=type-based-intrinsic-costโ calculate the intrinsic cost based only on argument types
--iterative-counter-promotionโ allows counter promotion across the whole loop nest ๐--loongarch-use-aaโ enables the use of AA during codegen ๐--lower-allow-check-percentile-cutoff-hot=<int>โ hot percentile cutoff ๐ถ๏ธ--lower-allow-check-random-rate=<number>โ a probability value in the range[0.0, 1.0]of unconditional pseudo-random checks ๐ฒ--lto-aix-system-assembler=<path>โ path to a system assembler, picked up on AIX only ๐งฐ--lto-embed-bitcode=<value>โ embed LLVM bitcode in object files produced by LTO=noneโ do not embed=optimizedโ embed after all optimization passes=post-merge-pre-optโ embed post merge, but before optimizations
--lto-pass-remarks-filter=<regex>โ only records optimization remarks from passes whose names match the given regular expression ๐--lto-pass-remarks-format=<format>โ the format used for serializing remarks (default:YAML) ๐--lto-pass-remarks-output=<filename>โ output filename for pass remarks ๐๏ธ--matrix-default-layout=<value>โ sets the default matrix layout=column-majorโ use column-major layout=row-majorโ use row-major layout
--matrix-print-after-transpose-optโ no description. just a little guy ๐ฃ--max-counter-promotions=<int>โ the max number of allowed counter promotions ๐ฆ--max-counter-promotions-per-loop=<uint>โ the max number of counter promotions per loop, so we don't increase register pressure too much ๐ฎโ๐จ--mc-relax-allโ when used withfiletype=obj, relaxes all fixups in the emitted object file ๐ง--mcabacโtbd๐ซฅ--merror-missing-parenthesisโ error for missing parenthesis around predicate registers โ--merror-noncontigious-registerโ error for register names that aren't contigious (yes that's spelled exactly like that, we don't make the rules) โ--mhvxโ enables Hexagon Vector eXtensions ๐--mhvx=<value>โ enables Hexagon Vector eXtensions (but like, specifical)=v60โ build for HVX v60=v62โ build for HVX v62=v65โ build for HVX v65=v66โ build for HVX v66=v67โ build for HVX v67=v68โ build for HVX v68=v69โ build for HVX v69=v71โ build for HVX v71=v73โ build for HVX v73=v75โ build for HVX v75=v79โ build for HVX v79=v81โ build for HVX v81
--mips-compact-branches=<value>โ MIPS Specific: compact branch policy ๐ฅท=neverโ do not use compact branches if possible.=optimalโ use compact branches where appropriate (default).=alwaysโ always use compact branches if possible.
--mips16-constant-islandsโ turns on mips16 constant islands. yep that's the whole thing, she's a one-liner bestie ๐--mips16-hard-floatโ flips on mips16 hard float โจ--mir-strip-debugify-onlyโ controls whethermir-strip-debugonly strips debug info from debugified modules by default ๐--misexpect-tolerance=<uint>โ stops diagnostics from being emitted when profile counts land within N% of the threshold. yes the description really does end in two periods, we don't make the rules ๐ญ--mno-compoundโ Hexagon: stops it from looking for compound instructions periodt--mno-fixupโ Hexagon: stops the fixing up of resolved relocations ๐--mno-ldc1-sdc1โ expands double precision loads and stores into their single precision counterparts ๐ฆ--mno-pairingโ Hexagon: stops it looking for duplex instructions โจ--ms-secure-hotpatch-functions-file=<filename>โ a file containing a list of mangled function names to mark for Windows Secure Hot-Patching ๐ฅ--ms-secure-hotpatch-functions-list=<list>โ same energy, but you're passing the list of mangled function names inline instead of via a file ๐--mwarn-missing-parenthesisโ warns you when a parenthesis around predicate registers goes missing ๐--mwarn-noncontigious-registerโ warns for register names that aren't contigious (yes, that spelling, we're keeping it, no cap)--mwarn-sign-mismatchโ warns when you mismatch a signed and an unsigned value ๐ญ--no-deprecated-warnโ suppresses, like, all deprecated warnings. every single one. total silence ๐ซถ--no-discriminatorsโ stops discriminator information from being generated โจ--no-type-checkโ suppresses type errors (Wasm) ๐--no-warnโ suppresses all warnings. bestie said โจshushโจ--nvptx-approx-log2f32โ NVPTX Specific: whether to uselg2.approxforlog2โญ--nvptx-sched4regโ NVPTX Specific: schedule for register pressue (their typo, our girl kept it exactly ๐)--object-size-offset-visitor-max-visit-instructions=<uint>โ the maximum number of instructions forObjectSizeOffsetVisitorto look at ๐--oop-executor-connect=<<hostname>:<port>>โ connects to an out-of-process executor through a TCP socket ๐--pgo-block-coverageโ use this one to enable basic block coverage instrumentation ๐--pgo-temporal-instrumentationโ use this one to enable temporal instrumentation โณ--pgo-view-block-coverage-graphโ makes a dot file of CFGs stuffed with block coverage inference information ๐--print-pipeline-passesโ prints a-passescompatible string describing the pipeline (best-effort only, she's doing her best, don't come for her ๐)--profcheck-annotate-selectโ also injects (if it's missing) and verifiesMD_profforselectinstructions ๐--profcheck-default-function-entry-count=<long>โ no description given in the original, she's mysterious like that, iykyk--profcheck-default-select-false-weight=<uint>โ when annotatingselectinstructions, this value gets used for the second ('false') case ๐--profcheck-default-select-true-weight=<uint>โ when annotatingselectinstructions, this value gets used for the first ('true') case โจ--profcheck-weights-for-testโ generates weights with small values, for tests ๐งช--profile-correlate=<value>โ use debug info or a binary file to correlate profiles ๐ธ=emptyโ no profile correlation=debug-infoโ use debug info to correlate=binaryโ use binary to correlate
--promote-alloca-vector-loop-user-weight=<uint>โ the bonus weight of users of allocas within a loop when sorting profitable allocas โ๏ธ--propeller-infer-threshold=<number>โ threshold for inferring a stale profile ๐--r600-ir-structurizeโ use theStructurizeCFGIR pass ๐ฅ--riscv-add-build-attributesโ no description in the original, just vibes, we respect it ๐--riscv-use-aaโ enables the use of AA during codegen โจ--runtime-counter-relocationโ enables relocating counters at runtime ๐โโ๏ธ--safepoint-ir-verifier-print-onlyโ again, no description provided, she simply exists ๐--sample-profile-check-record-coverage=<N>โ emits a warning if less than N% of records in the input profile got matched to the IR ๐ญ--sample-profile-check-sample-coverage=<N>โ emits a warning if less than N% of samples in the input profile got matched to the IR ๐ซถ--sample-profile-max-propagate-iterations=<uint>โ the maximum number of iterations to go through when propagating sample block/edge weights through the CFG ๐--sampled-instr-burst-duration=<uint>โ sets the profile instrumentation burst duration, which can range from1to the value ofsampled-instr-period(0is invalid). this many samples get recorded for eachsampled-instr-periodcount update. setting it to1enables simple sampling, and in that case it's recommended to setsampled-instr-periodto a prime number ๐--sampled-instr-period=<uint>โ sets the profile instrumentation sample period. a sample period of0is invalid. for each sample period, a fixed number of consecutive samples gets recorded, and that number is controlled by thesampled-instr-burst-durationflag. the default sample period of65536is optimized for generating efficient code that leverages unsigned short integer wrapping in overflow, but it's disabled under simple sampling (burst duration =1) ๐--sampled-instrumentationโ do PGO instrumentation sampling ๐ง--sanitizer-early-opt-epโ inserts sanitizers onOptimizerEarlyEP๐ก๏ธ--save-temp-labelsโ don't discard temporary labels ๐ท๏ธ--skip-ret-exit-blockโ suppresses counter promotion if exit blocks contain ret ๐--speculative-counter-promotion-max-exiting=<uint>โ the max number of exiting blocks of a loop to allow speculative counter promotion ๐ข--speculative-counter-promotion-to-loopโ when this option is false, and the target block is in a loop, the promotion gets disallowed unless the promoted counter update can be further/iteratively promoted into an acyclic region ๐--spirv-emit-op-namesโ emitsOpNamefor all instructions โจ--spirv-ext=<value>โ specify the list of enabled SPIR-V extensions ๐--spv-allow-unknown-intrinsics[=<intrinsic_prefix_0,intrinsic_prefix_1>]โ emits unknown intrinsics as calls to external functions. you must provide a comma-separated input list of intrinsic prefixes, and only intrinsics carrying a listed prefix get emitted as described ๐--spv-dump-depsโ dumps MIR with SPIR-V dependencies info ๐๏ธ--spv-emit-nonsemantic-debug-infoโ emits SPIR-VNonSemantic.Shader.DebugInfo.100instructions ๐--summary-file=<string>โ the summary file to use for function importing ๐--sve-tail-folding=<string>โ controls the use of vectorisation using tail-folding for SVE, where you write the option in the form(Initial)[+(Flag1|Flag2|...)]๐ฆdisabledโ (Initial) no loop types will vectorize using tail-foldingdefaultโ (Initial) uses the default tail-folding settings for the target CPUallโ (Initial) all legal loop types will vectorize using tail-foldingsimpleโ (Initial) use tail-folding for simple loops (not reductions or recurrences)reductionsโ use tail-folding for loops containing reductionsnoreductionsโ inverse of aboverecurrencesโ use tail-folding for loops containing fixed order recurrencesnorecurrencesโ inverse of abovereverseโ use tail-folding for loops requiring reversed predicatesnoreverseโ inverse of above
--tail-predication=<value>โ MVE tail-predication pass options ๐พ=disabledโ don't tail-predicate loops=enabled-no-reductionsโ enable tail-predication, but not for reduction loops=enabledโ enable tail-predication, including reduction loops=force-enabled-no-reductionsโ enable tail-predication, but not for reduction loops, and force this which might be unsafe=force-enabledโ enable tail-predication, including reduction loops, and force this which might be unsafe
okay so real talk on those last two: the force-enabled variants are explicitly flagged as possibly unsafe in the original. forcing them is on you, bestie. no cap, no take-backs ๐
--target-abi=<string>โ the name of the ABI to be targeted from the backend ๐ฏ--thinlto-assume-mergedโ assumes the input has already undergone ThinLTO function importing and the other pre-optimization pipeline changes โ๏ธ--threads=<int>โ no description provided, she's just here, existing, being iconic ๐--translator-compatibility-modeโ SPIR-V Translator compatibility mode ๐งฉ--ubsan-guard-checksโ wraps your UBSAN checks in a lil guard:llvm.allow.ubsan.check(). bestie gets a veto now ๐--use-undefโ useundefwhen generating programs--verify-region-infoโ verify region info. heads up, this one is time consuming, so don't be shocked when it takes a minute ๐--vp-counters-per-site=<number>โ the average number of profile counters handed out per value profiling site--vp-static-allocโ do static counter allocation for the value profiler--wasm-enable-ehโ WebAssembly exception handling--wasm-enable-sjljโ WebAssemblysetjmp/longjmphandling--wasm-use-legacy-ehโ WebAssembly exception handling, but the legacy flavor--x86-align-branch=<string>โ specifies which types of branches to align, as a plus-separated list of types:jccโ conditional jumpsfusedโ fused conditional jumpsjmpโ direct unconditional jumpscallโ direct and indirect callsretโ retsindirectโ indirect unconditional jumps
--x86-align-branch-boundary=<uint>โ controls how the assembler should align branches with NOP. If the boundary size isn't0, it's gotta be a power of 2 and no less than32. Branches get aligned so they don't sit across or against the boundary of that size. The default value0means no branch aligning at all โจ--x86-branches-within-32B-boundariesโ aligns selected instructions to soften the negative performance impact of Intel's micro code update for errata skx102. because of course that's a whole thing
โ ๏ธ This one may break your assumptions about labels corresponding to particular instructions, so use it with caution, fr fr.
--x86-enable-apx-for-relocationโ enable APX features (EGPR,NDDandNF) for instructions with relocations on x86-64 ELF--x86-pad-max-prefix-size=<uint>โ maximum number of prefixes to use for padding--x86-relax-relocationsโ emitGOTPCRELX/REX_GOTPCRELX/CODE_4_GOTPCRELXinstead ofGOTPCRELon x86-64 ELF--x86-sse2avxโ says the assembler should encode SSE instructions with the VEX prefix
๐ธ Generic Options ๐ธ
--helpโ display available options (--help-hiddenfor more)--help-listโ display the list of available options (--help-list-hiddenfor more)--versionโ display the version of this program ๐
๐ IR2Vec Options ๐
--ir2vec-arg-weight=<number>โ weight for argument embeddings--ir2vec-kind=<value>โ IR2Vec embedding kind=symbolicโ generate symbolic embeddings=flow-awareโ generate flow-aware embeddings
--ir2vec-opc-weight=<number>โ weight for opcode embeddings--ir2vec-type-weight=<number>โ weight for type embeddings--ir2vec-vocab-path=<string>โ path to the vocabulary file for IR2Vec
๐ฆ MIR2Vec Options ๐ฆ
--mir2vec-common-operand-weight=<number>โ weight for common operand embeddings--mir2vec-kind=<value>โ MIR2Vec embedding kind=symbolicโ generate symbolic embeddings for MIR
--mir2vec-opc-weight=<number>โ weight for machine opcode embeddings--mir2vec-reg-operand-weight=<number>โ weight for register operand embeddings--mir2vec-vocab-path=<string>โ path to the vocabulary file for MIR2Vec
๐ Out-of-process Execution Options ๐
--oop-executor[=<string>]โ launch an out-of-process executor to run code--orc-runtime[=<string>]โ path to the ORC runtime--slab-allocate=<string>โ allocate from a slab of the given size. allowable suffixes areKb,Mb,Gb. default =Kb--use-shared-memoryโ use shared memory to transfer generated code and data
๐ Polly Options: Configure the polly loop optimizer ๐
--pollyโ enable the polly optimizer (works with-O1,-O2or-O3)--polly-2nd-level-tilingโ enable a 2nd level loop of loop tiling--polly-annotate-metadata-vectorizeโ append vectorize enable/disable metadata from polly--polly-ast-print-accessesโ print memory access functions--polly-context=<isl parameter set>โ provide additional constraints on the context parameters--polly-dce-precise-steps=<int>โ the number of precise steps between two approximating iterations. (a value of-1schedules another approximation stage before the actual dead code elimination.)--polly-delicm-max-ops=<int>โ maximum number of isl operations to invest for lifetime analysis;0= no limit--polly-detect-full-functionsโ allow the detection of full functions--polly-dump-afterโ dump module after Polly transformations into a file suffixed with"-after"--polly-dump-after-file=<string>โ dump module after Polly transformations to the given file--polly-dump-beforeโ dump module before Polly transformations into a file suffixed with"-before"--polly-dump-before-file=<string>โ dump module before Polly transformations to the given file--polly-enable-simplifyโ simplify SCoP after optimizations--polly-ignore-func=<string>โ ignore functions that match a regex. multiple regexes can be comma separated. Scop detection will ignore all functions that match ANY of the regexes provided.--polly-isl-arg=<argument>โ option passed to ISL--polly-matmul-optโ perform optimizations of matrix multiplications based on pattern matching--polly-on-isl-error-abortโ abort if an isl error is encountered--polly-only-func=<string>โ only run on functions that match a regex. multiple regexes can be comma separated. Scop detection will run on all functions that match ANY of the regexes provided.--polly-only-region=<identifier>โ only run on certain regions (the provided identifier must appear in the name of the region's entry block)--polly-only-scop-detectionโ only run scop detection, but no other optimizations--polly-optimized-scopsโ Polly - dump polyhedral description of Scops optimized with the isl scheduling optimizer and the set of post-scheduling transformations is applied on the schedule tree--polly-parallelโ generate thread parallel code (isl codegen only)--polly-parallel-forceโ force generation of thread parallel code ignoring any cost model--polly-pattern-matching-based-optsโ perform optimizations based on pattern matching--polly-postoptsโ apply post-rescheduling optimizations such as tiling (requires-polly-reschedule)--polly-pragma-based-optsโ apply user-directed transformation from metadata--polly-pragma-ignore-depcheckโ skip the dependency check for pragma-based transformations--polly-print-astโ print the ISL abstract syntax tree--polly-print-delicmโ Polly - print DeLICM/DePRE--polly-print-depsโ Polly - print dependences--polly-print-detectโ Polly - print static control parts (SCoPs)--polly-print-flatten-scheduleโ a polly pass--polly-print-import-jscopโ Polly - print Scop import result--polly-print-mseโ Polly - print Maximal static expansion of SCoP--polly-print-opt-islโ a polly pass--polly-print-optreeโ Polly - print forward operand tree result--polly-print-scopsโ print polyhedral description of all regions--polly-print-simplifyโ Polly - print Simplify actions--polly-process-unprofitableโ process scops that are unlikely to benefit from Polly optimizations.--polly-register-tilingโ turns on register tiling โจ--polly-reportโ spills all the tea about what Polly's been doing: prints information about the activities of Polly ๐--polly-rescheduleโ optimizes SCoPs using ISL ๐--polly-showโ highlights the code regions that will be optimized, in a (CFG BBs and LLVM-IR instructions) ๐--polly-show-onlyโ same highlight energy, but in a (CFG only BBs) โจ--polly-stmt-granularity=<value>โ the algorithm to use for splitting basic blocks into multiple statements. pick ur fighter:=bbโ one statement per basic block ๐=scalar-indepโ scalar independence heuristic ๐ง=storeโ store-level granularity ๐
--polly-tc-optโ performs optimizations of tensor contractions based on pattern matching ๐ฅ--polly-tilingโ turns on loop tiling ๐--polly-vectorizer=<value>โ picks the vectorization strategy, choose wisely bestie:=noneโ no Vectorization ๐=stripmineโ strip-mine outer loops so the loop-vectorizer triggers โญ
aaaand that's the whole page, bestie!! ๐ซถ this legendary little manual is clang-repl 22, dated September 2026, and it lives its life as CLANG-REPL(1). go read it again, go compile something iconic, and remember: the vibes are immaculate, the flags are documented, periodt ๐๐ธ
๐ฆ where this page comes from
- ubuntu stonking: clang-tools-22 1:22.1.8-1ubuntu1 ยท APACHE-2-LLVM-EXCEPTIONS
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms