CLANG-REPL(1)
β¨ NAME β¨
clang-repl β the manual page for clang-repl 19 π (straight out of the User Commands section of the manual, bestie, and yes she's an icon)
πΈ DESCRIPTION πΈ
Okay so picture this: you wanna run C++ code right now, no main(), no build system drama, no waiting. That's the vibe. Here's how you call her:
π USAGE
clang-repl [options] [code to run]
π OPTIONS
π Color Options
--colorβ turns on colors in the output, fr fr (default = autodetect, so she'll figure out on her own whether your terminal is that girl)
π§ General options
okay bestie this next part is LONG, but I'm not skipping a single one, we're getting through all of them together πͺ grab a snack
--Xcc=<string>β an argument you pass straight through to theCompilerInvocationβ¨--aarch64-neon-syntax=<value>β pick which flavor of NEON code the AArch64 backend emits:=genericβ emit generic NEON assembly=appleβ emit Apple-style NEON assembly π
--aarch64-use-aaβ enable the use of AA during codegen--abort-on-max-devirt-iterations-reachedβ bail out (abort!) when the max iterations for the devirtualization CGSCC repeat pass gets hit π--allow-ginsert-as-artifactβ letsG_INSERTcount as an artifact. Literally a hack around AMDGPU test infinite loops, no cap--amdgpu-atomic-optimizer-strategy=<value>β choose the DPP or Iterative strategy for scan:=DPPβ use DPP operations for scan=Iterativeβ use the Iterative approach for scan=Noneβ disable the atomic optimizer
--amdgpu-bypass-slow-divβ skip the 64-bit divide for dynamic 32-bit values πββοΈ--amdgpu-disable-loop-alignmentβ do not align and prefetch loops--amdgpu-dpp-combineβ enable the DPP combiner--amdgpu-dump-hsa-metadataβ dump AMDGPU HSA Metadata--amdgpu-enable-merge-m0β merge and hoistM0initializations--amdgpu-enable-power-schedβ enable scheduling to minimize mAI power bursts β‘--amdgpu-kernarg-preload-count=<uint>β how many kernel arguments to preload onto SGPRs--amdgpu-promote-alloca-to-vector-limit=<uint>β the maximum byte size to even consider promoting alloca to vector--amdgpu-sdwa-peepholeβ enable the SDWA peepholer π--amdgpu-use-aa-in-codegenβ enable the use of AA during codegen--amdgpu-verify-hsa-metadataβ verify AMDGPU HSA Metadata--amdgpu-vgpr-index-modeβ use GPR indexing mode instead of movrel for vector indexing--arm-add-build-attributesβ (the manpage left this one blank, so it's giving mystery β¨ nobody knows, and I'm not about to make something up)--arm-implicit-it=<value>β allow conditional instructions outdside 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 the internal instruction representation into the assembly file--atomic-counter-update-promotedβ do the counter update using atomic fetch add, but only for promoted counters--atomic-first-counterβ use atomic fetch add for the first counter in a function (usually the entry counter, iykyk)--bounds-checking-single-trapβ use one trap block per function πͺ€--bounds-checking-unique-trapsβ always use one trap per check--bpf-stack-size=<int>β specify the BPF stack size limit--cfg-hide-cold-paths=<number>β hide blocks whose relative frequency is below the value you give π₯Ά--cfg-hide-deoptimize-pathsβ (no description in the original, bestie β she's mysterious like that)--cfg-hide-unreachable-pathsβ (also blank in the original, matching energy π )--check-functions-filter=<regex>β only emit checks for arguments of functions whose names match the given regular expression--cost-kind=<value>β the target cost kind:=throughputβ reciprocal throughput=latencyβ instruction latency=code-sizeβ code size=size-latencyβ code size and latency
--crelβ use the CREL relocation format for ELF--cs-profile-generateβ perform context sensitive PGO instrumentation--cs-profile-path=<string>β context sensitive profile file path--debug-info-correlateβ use debug info to correlate profiles. β οΈ Deprecated, use-profile-correlate=debug-infoinstead--debugify-func-limit=<ulong>β set the max number of processed functions per pass--debugify-level=<value>β what kind of debug info to add:=locationsβ locations only=location+variablesβ locations and variables
--debugify-quietβ suppress that verbose debugify output π€«--disable-auto-upgrade-debug-infoβ disable autoupgrade of debug info--disable-i2p-p2i-optβ disables the inttoptr/ptrtoint roundtrip optimization--disable-promote-alloca-to-ldsβ disable promote alloca to LDS--disable-promote-alloca-to-vectorβ disable promote alloca to vector--do-counter-promotionβ do counter register promotion--dot-cfg-mssa=<file name for generated dot file>β file name for the generated dot file--dwarf-version=<int>β dwarf version--dwarf64β generate debugging info in the 64-bit DWARF format--emit-compact-unwind-non-canonicalβ whether to try to emit Compact Unwind for non canonical entries--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 isn't available=defaultβ use the target platform default
--emscripten-cxx-exceptions-allowed=<string>β the list of function names in which Emscripten-style exception handling is enabled (see the emscriptenEMSCRIPTEN_CATCHING_ALLOWEDoptions)--enable-cse-in-irtranslatorβ should enable CSE in irtranslator--enable-cse-in-legalizerβ should enable CSE in Legalizer--enable-emscripten-cxx-exceptionsβ WebAssembly Emscripten-style exception handling--enable-emscripten-sjljβ WebAssembly Emscripten-style setjmp/longjmp handling--enable-gvn-hoistβ enable the GVN hoisting pass (default = off)--enable-gvn-memdepβ (blank in the original, she said nothing and left π)--enable-gvn-sinkβ enable the GVN sinking pass (default = off)--enable-jump-table-to-switchβ enable the JumpTableToSwitch pass (default = off)--enable-load-in-loop-preβ (no description, matching the void π)--enable-load-preβ (also undescribed, iconic of her)--enable-loop-simplifycfg-term-foldingβ (yep, blank again π« )--enable-name-compressionβ enable name/filename string compression--enable-pgo-force-function-attrsβ enable the pass that sets function attributes based on PGO profiles--enable-split-backedge-in-load-preβ (nothing here either, bestie)--enable-split-loopiv-heuristicβ enable the loop iv regalloc heuristic--enable-vtable-profile-useβ if ThinLTO and WPD are enabled and this option is true, 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 selective vtable-based comparison π--execute-concurrency=<uint>β how many threads get used to process all files in parallel. Set it to0for hardware concurrency. π¨ This flag only applies to all-TUs--executor=<string>β the name of the executor to use--expand-variadics-override=<value>β override the behaviour of expand-variadics:=unspecifiedβ use the implementation defaults=disableβ disable the pass entirely=optimizeβ optimise without changing ABI=loweringβ change the variadic calling convention
--experimental-debug-variable-locationsβ use the experimental new value-tracking variable locations π§ͺ--experimental-debuginfo-iteratorsβ enable communicating debuginfo positions through iterators, eliminating intrinsics. Has no effect if--preserve-input-debuginfo-format=true.--fatal-warningsβ treat warnings as errors π€--fdpicβ use the FDPIC ABI--filter=<string>β only process files that match this filter. π¨ This flag only applies to all-TUs--force-tail-folding-style=<value>β force the tail folding style:=noneβ disable tail folding=dataβ create a lane mask for data only, using theactive.lane.maskintrinsic=data-without-lane-maskβ create the lane mask withcompare/stepvector=data-and-controlβ create the lane mask using theactive.lane.maskintrinsic, and use it for both data and control flow π
and that's part one bestie, we're not done yet β more incoming π
=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 is unsupported, fallback todata-without-lane-mask. β¨--fs-profile-debug-bw-threshold=<uint>β Only show debug message if the source branch weight is greater than this value.--fs-profile-debug-prob-diff-threshold=<uint>β Only show debug message if the branch probility is greater than this value (in percentage). (yes bestie, βprobilityβ is literally what it says π)--generate-merged-base-profilesβ When generating nested context-sensitive profiles, always generate extra base profile for function with all its context profiles merged into it.--gpsize=<uint>β Global Pointer Addressing Size. The default size is8. π--hash-based-counter-splitβ Rename counter variable of a comdat function based on cfg hash--hexagon-add-build-attributesβ no description in the manual, just a mystery box π--hexagon-rdf-limit=<uint>β no description, itβs giving mysterious π--hot-cold-splitβ Enable hot-cold splitting pass π₯π§--hwasan-percentile-cutoff-hot=<int>β Hot percentile cuttoff. (another iconic typo, we keep it fr fr)--hwasan-random-rate=<number>β Probability value in the range[0.0, 1.0]to keep instrumentation of a function.--import-all-indexβ Import all external functions in index.--incremental-linker-compatibleβ When used withfiletype=obj, emit an object file which can be used with an incremental linker--instcombine-code-sinkingβ Enable code sinking--instcombine-guard-widening-window=<uint>β How wide an instruction window to bypass looking for another guard--instcombine-max-num-phis=<uint>β Maximum number phis to handle in intptr/ptrint folding--instcombine-max-sink-users=<uint>β Maximum number of undroppable users for instruction sinking--instcombine-maxarray-size=<uint>β Maximum array size considered when doing a combine--instcombine-negator-enabledβ Should we attempt to sink negations?--instcombine-negator-max-depth=<uint>β What is the maximal lookup depth when trying to check for viability of negation sinking.--instrprof-atomic-counter-update-allβ Make all profile counter updates atomic (for testing only) π§ͺ donβt ship this bestie, it literally says testing only--internalize-public-api-file=<filename>β A file containing list of symbol names to preserve--internalize-public-api-list=<list>β A list of symbol names to preserve--iterative-counter-promotionβ Allow counter promotion across the whole loop nest.--lint-abort-on-errorβ In the Lint pass, abort on errors. π--lower-allow-check-percentile-cutoff-hot=<int>β Hot percentile cuttoff.--lower-allow-check-random-rate=<number>β 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 record 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 vibes π¦--max-counter-promotions=<int>β Max number of allowed counter promotions--max-counter-promotions-per-loop=<uint>β Max number counter promotions per loop to avoid increasing register pressure too much--mc-relax-allβ When used withfiletype=obj, relax all fixups in the emitted object file--mcabacβtbd(literally what it says, bestie π)--merror-missing-parenthesisβ Error for missing parenthesis around predicate registers--merror-noncontigious-registerβ Error for register names that aren't contigious--mhvxβ Enable Hexagon Vector eXtensions--mhvx=<value>β Enable Hexagon Vector eXtensions=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
--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β Enable mips16 constant islands.--mips16-hard-floatβ Enable mips16 hard float.--mir-strip-debugify-onlyβ Should mir-strip-debug only strip debug info from debugified modules by default--misexpect-tolerance=<uint>β Prevents emitting diagnostics when profile counts are within N% of the threshold.. (two dots, we donβt make the rules π)--mno-compoundβ Disable looking for compound instructions for Hexagon--mno-fixupβ Disable fixing up resolved relocations for Hexagon--mno-ldc1-sdc1β Expand double precision loads and stores to their single precision counterparts--mno-pairingβ Disable looking for duplex instructions for Hexagon--mwarn-missing-parenthesisβ Warn for missing parenthesis around predicate registers--mwarn-noncontigious-registerβ Warn for register names that arent contigious--mwarn-sign-mismatchβ Warn for mismatching a signed and unsigned value--no-deprecated-warnβ Suppress all deprecated warnings--no-discriminatorsβ Disable generation of discriminator information.--no-type-checkβ Suppress type errors (Wasm)--no-warnβ Suppress all warnings--nvptx-sched4regβ NVPTX Specific: schedule for register pressue (yes, βpressueβ π iconic)--object-size-offset-visitor-max-visit-instructions=<uint>β Maximum number of instructions for ObjectSizeOffsetVisitor to look at--pgo-block-coverageβ Use this option to enable basic block coverage instrumentation--pgo-temporal-instrumentationβ Use this option to enable temporal instrumentation--pgo-view-block-coverage-graphβ Create a dot file of CFGs with block coverage inference information--poison-checking-function-localβ Check that returns are non-poison (for testing) π§ͺ--print-pipeline-passesβ Print a'-passes'compatible string describing the pipeline (best-effort only).--profile-correlate=<value>β Use debug info or 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 loop when sorting profitable allocas--r600-ir-structurizeβ Use StructurizeCFG IR pass--riscv-add-build-attributesβ no description, itβs giving elusive π«Ά--riscv-use-aaβ Enable the use of AA during codegen.--runtime-counter-relocationβ Enable relocating counters at runtime.--safepoint-ir-verifier-print-onlyβ no description, just a little enigma π--sample-profile-check-record-coverage=<N>β Emit a warning if less than N% of records in the input profile are matched to the IR.--sample-profile-check-sample-coverage=<N>β Emit a warning if less than N% of samples in the input profile are matched to the IR.--sample-profile-max-propagate-iterations=<uint>β Maximum number of iterations to go through when propagating sample block/edge weights through the CFG.--sampled-instr-burst-duration=<uint>β Set the profile instrumentation burst duration, which can range from0to one less than the value of'sampled-instr-period'. This number of samples will be recorded for each'sampled-instr-period'count update. Setting to1enables simple sampling, in which case it is recommended to set'sampled-instr-period'to a prime number. β¨--sampled-instr-period=<uint>β okay so this one sets the profile instrumentation sample period. For each sample period, a fixed number of consecutive samples will be recorded. That number is controlled by thesampled-instr-burst-durationflag. The default sample period of65535is optimized for generating efficient code that leverages unsigned integer wrapping in overflow. slay β¨--sampled-instrumentationβ do PGO instrumentation sampling π--sanitizer-early-opt-epβ insert sanitizers on OptimizerEarlyEP. periodt--save-temp-labelsβ don't discard temporary labels π--skip-ret-exit-blockβ suppress counter promotion if exit blocks containret. iykyk--speculative-counter-promotion-max-exiting=<uint>β the max number of exiting blocks of a loop to allow speculative counter promotion. no cap--speculative-counter-promotion-to-loopβ when the option is false, if the target block is in a loop, the promotion will be disallowed unless the promoted counter update can be further/iteratively promoted into an acyclic region. the way that works π--summary-file=<string>β the summary file to use for function importing. bestie--sve-tail-folding=<string>β control the use of vectorisation using tail-folding for SVE, where the option is specified 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
bestie, the force ones are literally marked βmight be unsafeβ β respect the warning π
--thinlto-assume-mergedβ assume the input has already undergone ThinLTO function importing and the other pre-optimization pipeline changes. fr fr--threads=<int>β this one is blank in the source, bestie. No description, just silence. π--type-based-intrinsic-costβ calculate intrinsics cost based only on argument types. math girlie β¨--ubsan-guard-checksβ guard UBSAN checks withllvm.allow.ubsan.check(). obsessed--ubsan-unique-trapsβ deoptimize traps for UBSAN so there is 1 trap per check. iconic--use-undefβ use undef when generating programs. spooky but valid--verify-region-infoβ verify region info (time consuming). grab a snack, it's giving slow--vp-counters-per-site=<number>β the average number of profile counters allocated per value profiling site. numbers bestie--vp-static-allocβ do static counter allocation for value profiler. slay allocation--wasm-enable-ehβ WebAssembly exception handling. wasm girlies rise--wasm-enable-exnrefβ WebAssembly exception handling (exnref). more wasm--wasm-enable-sjljβ WebAssembly setjmp/longjmp handling. wasm said jump--write-experimental-debuginfoβ write debug info in the new non-intrinsic format. Has no effect if--preserve-input-debuginfo-format=true. note it, bestie--x86-align-branch=<string>β specify types of branches to align (plus separated list of types):jccβ indicates conditional jumpsfusedβ indicates fused conditional jumpsjmpβ indicates direct unconditional jumpscallβ indicates direct and indirect callsretβ indicates retsindirectβ indicates indirect unconditional jumps
--x86-align-branch-boundary=<uint>β control how the assembler should align branches with NOP. If the boundary's size is not 0, it should be a power of 2 and no less than 32. Branches will be aligned to prevent from being across or against the boundary of specified size. The default value 0 does not align branches. okay so boundaries matter π--x86-branches-within-32B-boundariesβ align selected instructions to mitigate negative performance impact of Intel's micro code update for errata skx102. May break assumptions about labels corresponding to particular instructions, and should be used with caution.
caution bestie, this one can break label assumptions. Use it with care, no cap.
--x86-pad-max-prefix-size=<uint>β maximum number of prefixes to use for padding. padding queen--x86-relax-relocationsβ emitGOTPCRELX/REX_GOTPCRELXinstead ofGOTPCRELon x86-64 ELF. relocation slay--x86-sse2avxβ specify that the assembler should encode SSE instructions with VEX prefix. VEX prefix era
π« Generic Options π«
--helpβ display available options (--help-hiddenfor more). the classic β¨--help-listβ display list of available options (--help-list-hiddenfor more). list mode--versionβ display the version of this program. version check bestie
π« Polly Options: Configure the polly loop optimizer π«
--pollyβ enable the polly optimizer (with-O1,-O2or-O3). polly pocket but for loops π--polly-2nd-level-tilingβ enable a 2nd level loop of loop tiling. tile on tile--polly-ast-print-accessesβ print memory access functions. show me the accesses--polly-context=<isl parameter set>β provide additional constraints on the context parameters. context queen--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. yes the source has an open paren, we're keeping it--polly-delicm-max-ops=<int>β maximum number of isl operations to invest for lifetime analysis;0=no limit. no limit bestie--polly-detect-full-functionsβ allow the detection of full functions. detect them all--polly-dump-afterβ dump module after Polly transformations into a file suffixed with"-after". dump after--polly-dump-after-file=<string>β dump module after Polly transformations to the given file. dump after, but named--polly-dump-beforeβ dump module before Polly transformations into a file suffixed with"-before". dump before--polly-dump-before-file=<string>β dump module before Polly transformations to the given file. dump before, but named--polly-enable-simplifyβ simplify SCoP after optimizations. simplify era--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. regex girlie--polly-isl-arg=<argument>β option passed to ISL. isl said here's an argument--polly-matmul-optβ perform optimizations of matrix multiplications based on pattern matching. matrix math slay--polly-on-isl-error-abortβ abort if an isl error is encountered. abort mode, dramatic--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. only these functions--polly-only-region=<identifier>β only run on certain regions (The provided identifier must appear in the name of the region's entry block. another open paren, iconic--polly-only-scop-detectionβ only run scop detection, but no other optimizations. detection only--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. polyhedral description bestie--polly-parallelβ generate thread parallel code (isl codegen only). parallel vibes--polly-parallel-forceβ force generation of thread parallel code ignoring any cost model. force it, ignore the cost model--polly-pattern-matching-based-optsβ perform optimizations based on pattern matching. pattern matching slay--polly-postoptsβ apply post-rescheduling optimizations such as tiling (requires-polly-reschedule). postopts after reschedule--polly-pragma-based-optsβ apply user-directed transformation from metadata. pragma said transform--polly-pragma-ignore-depcheckβ skip the dependency check for pragma-based transformations. skipping depcheck, bold--polly-process-unprofitableβ process scops that are unlikely to benefit from Polly optimizations. unprofitable but we process anyway--polly-register-tilingβ enable register tiling. register tiles--polly-reportβ print information about the activities of Polly. report time--polly-rescheduleβ optimize SCoPs using ISL. reschedule slay--polly-showβ highlight the code regions that will be optimized in a (CFG BBs and LLVM-IR instructions). show me the regions β¨--polly-show-onlyβ ok so this one highlights the code regions that are gonna get optimized, but in a CFG only BBs kinda way β¨ basically it's giving "here's the glow-up zone" and nothing else π--polly-stmt-granularity=<value>β picks the algorithm used to split basic blocks into multiple statements, bestie. and the options are, and I quote:=bbβ one statement per basic block. simple, iconic, no notes π=scalar-indepβ the scalar independence heuristic π=storeβ store-level granularity. granular granular π
--polly-tc-optβ performs optimizations of tensor contractions based on pattern matching π₯ pattern matching really said "I know her" fr fr--polly-tilingβ enables loop tiling π§© yes queen, tile those loops, we love a structured layout--polly-vectorizer=<value>β selects the vectorization strategy. choose your fighter:=noneβ no vectorization. we're sitting this one out π=stripmineβ strip-mines outer loops so the loop-vectorizer can trigger π it's literally setting the stage for the main character
and that's the whole page, bestie!! π«Ά this was clang-repl from 19, dated June 2025 β like, that's the source and the version and the date all wrapped up in a little bow π go forth and repl responsibly, no cap ππ
β¨
π¦ where this page comes from
- debian bookworm: clang-tools-19 1:19.1.7-3~deb12u1 Β· APACHE-2-LLVM-EXCEPTIONS
- debian trixie: clang-tools-19 1:19.1.7-3+b1 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms