CLANG-REPL(1)

πŸ“¦
version 18.1.8 Β· 5 versions
, in debian trixie, ubuntu questing

✨ CLANG-REPL(1) β€” User Commands ✨

πŸ’– NAME πŸ’–

clang-repl β€” manual page for clang-repl 18. That's the whole NAME section, bestie. Short, sweet, iconic. 🫢

🌸 DESCRIPTION 🌸

USAGE:

clang-repl [options] [code to run]

πŸŽ€ OPTIONS πŸŽ€

Okay so here come the options. There are a LOT of them. We are not skipping a single one, periodt. πŸ’…

🌈 Color Options 🌈

  • --color β€” Use colors in output (default=autodetect). Auto-detect glam, lowkey iconic. ✨

✨ General options ✨

  • --Xcc=<string> β€” Argument to pass to the CompilerInvocation. Like a little note you slip to the compiler.
  • --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, bestie.
  • --abort-on-max-devirt-iterations-reached β€” Abort when the max iterations for devirtualization CGSCC repeat pass is reached
  • --allow-ginsert-as-artifact β€” Allow G_INSERT to be considered an artifact. Hack around AMDGPU test infinite loops.
  • --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
  • --amdgpu-disable-loop-alignment β€” Do not align and prefetch loops
  • --amdgpu-dpp-combine β€” Enable DPP combiner
  • --amdgpu-dump-hsa-metadata β€” Dump AMDGPU HSA Metadata
  • --amdgpu-enable-merge-m0 β€” Merge and hoist M0 initializations
  • --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> β€” Maximum byte size to consider promote alloca to vector
  • --amdgpu-sdwa-peephole β€” Enable 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 β€” (no description in the original, just a lonely dash 🫠)
  • --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 internal instruction representation to assembly file
  • --atomic-counter-update-promoted β€” Do counter update using atomic fetch add for promoted counters only
  • --atomic-first-counter β€” Use atomic fetch add for first counter in a function (usually the entry counter)
  • --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 with relative frequency below the given value
  • --cfg-hide-deoptimize-paths β€” (no description in the original, just a dash πŸ’€)
  • --cfg-hide-unreachable-paths β€” (no description in the original, just a dash πŸ’€)
  • --cost-kind=<value> β€” Target cost kind
    • =throughput β€” Reciprocal throughput
    • =latency β€” Instruction latency
    • =code-size β€” Code size
    • =size-latency β€” Code size and latency
  • --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-info)
  • --debugify-func-limit=<ulong> β€” Set max number of processed functions per pass.
  • --debugify-level=<value> β€” Kind of debug info to add
    • =locations β€” Locations only
    • =location+variables β€” Locations and Variables
  • --debugify-quiet β€” Suppress verbose debugify output
  • --disable-auto-upgrade-debug-info β€” Disable autoupgrade of debug info
  • --disable-i2p-p2i-opt β€” Disables 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 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 is not available
    • =default β€” Use target platform default
  • --emscripten-cxx-exceptions-allowed=<string> β€” The list of function names in which Emscripten-style exception handling is enabled (see emscripten EMSCRIPTEN_CATCHING_ALLOWED options)
  • --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 β€” (no description in the original, just a dash πŸ’€)
  • --enable-gvn-sink β€” Enable the GVN sinking pass (default = off)
  • --enable-load-in-loop-pre β€” (no description in the original, just a dash πŸ’€)
  • --enable-load-pre β€” (no description in the original, just a dash πŸ’€)
  • --enable-loop-simplifycfg-term-folding β€” (no description in the original, just a dash πŸ’€)
  • --enable-name-compression β€” Enable name/filename string compression
  • --enable-split-backedge-in-load-pre β€” (no description in the original, just a dash πŸ’€)
  • --enable-split-loopiv-heuristic β€” Enable loop iv regalloc heuristic
  • --execute-concurrency=<uint> β€” The number of threads used to process all files in parallel. Set to 0 for hardware concurrency. This flag only applies to all-TUs.
  • --executor=<string> β€” The name of the executor to use.
  • --experimental-debug-variable-locations β€” Use experimental new value-tracking variable locations
  • --experimental-debuginfo-iterators β€” Enable communicating debuginfo positions through iterators, eliminating intrinsics
  • --fatal-warnings β€” Treat warnings as errors
  • --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 lane mask for data only, using active.lane.mask intrinsic
    • =data-without-lane-mask β€” Create lane mask with compare/stepvector
    • =data-and-control β€” Create lane mask using active.lane.mask intrinsic, and use it for both data and control flow
    • =data-and-control-without-rt-check β€” Similar to data-and-control, but remove the runtime check
  • --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).
  • --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 is 8.
  • --hash-based-counter-split β€” Rename counter variable of a comdat function based on cfg hash
  • --hexagon-rdf-limit=<uint> β€” (no description in the original, just a dash πŸ’€)
  • --hot-cold-split β€” Enable hot-cold splitting pass
  • --import-all-index β€” Import all external functions in index.
  • --incremental-linker-compatible β€” When used with filetype=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> β€” the ceiling on how many phis get handled when it's doing that intptr/ptrint folding. that's the cap, no cap. πŸ’…
  • --instcombine-max-sink-users=<uint> β€” max number of undroppable users for instruction sinking. like, if too many things refuse to let go, sinking just doesn't happen.
  • --instcombine-maxarray-size=<uint> β€” biggest array size that even gets considered when doing a combine.
  • --instcombine-negator-enabled β€” should we even try to sink negations? yes/no vibes.
  • --instcombine-negator-max-depth=<uint> β€” the maximal lookup depth when it's checking whether negation sinking is actually viable. it's giving "how deep do you wanna go".
  • --instrprof-atomic-counter-update-all β€” make all profile counter updates atomic. heads up bestie: for testing only, don't ship it. πŸ™ˆ
  • --internalize-public-api-file=<filename> β€” a file containing a list of symbol names to preserve. bestie energy: protect these.
  • --internalize-public-api-list=<list> β€” the same thing but you just hand it the list of symbol names to preserve directly.
  • --iterative-counter-promotion β€” allows counter promotion across the whole loop nest. going big.
  • --lto-aix-system-assembler=<path> β€” path to a system assembler. picked up on AIX only, so if you're not on AIX it's not your moment.
  • --lto-embed-bitcode=<value> β€” embed LLVM bitcode in object files produced by LTO. pick your flavor:
    • =none β€” do not embed. nothing. zero. 🚫
    • =optimized β€” embed after all optimization passes have run.
    • =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. regex girlies rise. ✨
  • --lto-pass-remarks-format=<format> β€” the format used for serializing remarks (default: YAML).
  • --lto-pass-remarks-output=<filename> β€” output filename for pass remarks. where the tea gets written. πŸ“
  • --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 β€” literally no description in the source, it's giving mystery. πŸŽ€
  • --max-counter-promotions=<int> β€” max number of allowed counter promotions.
  • --max-counter-promotions-per-loop=<uint> β€” max number of counter promotions per loop, so we don't crank register pressure too much. it's called boundaries. πŸ‘‘
  • --mc-relax-all β€” when used with filetype=obj, relax all fixups in the emitted object file.
  • --mcabac β€” tbd. that's it. that's the description. πŸ’€
  • --merror-missing-parenthesis β€” error out for a missing parenthesis around predicate registers. grammar police but make it compiler.
  • --merror-noncontigious-register β€” error for register names that aren't contigious. (yes, it's spelled that way in the source, bestie, we don't fix it. πŸ™ˆ)
  • --mhvx β€” enable Hexagon Vector eXtensions.
  • --mhvx=<value> β€” enable Hexagon Vector eXtensions, but tell it which build:
    • =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. options on options:
    • =never β€” do not use compact branches if possible.
    • =optimal β€” use compact branches where appropriate (default).
    • =always β€” always use compact branches if possible. all or nothing fr fr.
  • --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? that's the question.
  • --misexpect-tolerance=<uint> β€” prevents emiting diagnostics when profile counts are within N% of the threshold.. (yes, "emiting" and the double period are in the original β€” iconic typo behavior, we keep it verbatim. ✨)
  • --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. softer than the error version, still judging you gently. 🫢
  • --mwarn-noncontigious-register β€” warn for register names that arent contigious. (again, spelling straight from the source, don't come for me.)
  • --mwarn-sign-mismatch β€” warn for mismatching a signed and unsigned value.
  • --no-deprecated-warn β€” suppress all deprecated warnings. not me silencing the past. πŸ’€
  • --no-discriminators β€” disable generation of discriminator information.
  • --no-type-check β€” suppress type errors (Wasm).
  • --no-warn β€” suppress all warnings. living dangerously, but slay.
  • --nvptx-sched4reg β€” NVPTX Specific: schedule for register pressue. (spelled exactly like that in the source, "pressue" and all. πŸ’…)
  • --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. visual girlies, this one's for you. 🌸
  • --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). ngl, best-effort is the whole mood.
  • --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
  • --r600-ir-structurize β€” use StructurizeCFG IR pass.
  • --relink-builtin-bitcode-postop β€” re-link builtin bitcodes after optimization.
  • --riscv-add-build-attributes β€” no description, just vibes. πŸ¦‹
  • --riscv-use-aa β€” enable the use of AA during codegen.
  • --runtime-counter-relocation β€” enable relocating counters at runtime.
  • --safepoint-ir-verifier-print-only β€” also no description. mysterious icon. ✨
  • --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.
  • --sanitizer-early-opt-ep β€” insert sanitizers on OptimizerEarlyEP.
  • --skip-ret-exit-block β€” suppress 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 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.
  • --summary-file=<string> β€” the summary file to use for function importing.
  • --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-folding
    • default β€” (Initial) uses the default tail-folding settings for the target CPU
    • all β€” (Initial) all legal loop types will vectorize using tail-folding
    • simple β€” (Initial) use tail-folding for simple loops (not reductions or recurrences)
    • reductions β€” use tail-folding for loops containing reductions
    • noreductions β€” inverse of above
    • recurrences β€” use tail-folding for loops containing fixed order recurrences
    • norecurrences β€” inverse of above
    • reverse β€” use tail-folding for loops requiring reversed predicates
    • noreverse β€” 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
  • --thinlto-assume-merged β€” assume the input has already undergone ThinLTO function importing and the other pre-optimization pipeline changes.
  • --threads=<int> β€” no description given. it's giving silent main character. πŸ‘‘
  • --type-based-intrinsic-cost β€” calculate intrinsics cost based only on argument types.
  • --ubsan-unique-traps β€” deoptimize traps for UBSAN so there is 1 trap per check.
  • --verify-region-info β€” verify region info (time consuming). she takes her time and that's okay. 🧚

…okay and the flag parade continues, no skips, no gaps, we're getting through every single one πŸ’…

  • --vp-counters-per-site=<number> β€” how many profile counters get allocated, on average, per value profiling site. (average, bestie, not a hard cap)
  • --vp-static-alloc β€” do static counter allocation for the value profiler
  • --wasm-enable-eh β€” WebAssembly exception handling ✨
  • --wasm-enable-sjlj β€” WebAssembly setjmp/longjmp handling πŸ¦‹
  • --x86-align-branch=<string> β€” tell it which types of branches to align (it's a plus-separated list of types):
    • jcc β€” indicates conditional jumps
    • fused β€” indicates fused conditional jumps
    • jmp β€” indicates direct unconditional jumps
    • call β€” indicates direct and indirect calls
    • ret β€” indicates rets
    • indirect β€” indicates indirect unconditional jumps
  • --x86-align-branch-boundary=<uint> β€” controls how the assembler should align branches using NOP. if the boundary's size isn't 0, it has to be a power of 2 and no less than 32. branches get aligned so they don't end up across or against the boundary of the size you specified. and the default value, 0, does not align branches at all β€” it's giving leave-me-alone energy
  • --x86-branches-within-32B-boundaries β€” aligns selected instructions to soften the negative performance hit from Intel's micro code update for errata skx102.
⚠️ bestie this one can break assumptions about labels corresponding to particular instructions, so use it with caution. like, respectfully, careful.
  • --x86-pad-max-prefix-size=<uint> β€” max number of prefixes to use for padding

πŸŽ€ Generic Options πŸŽ€

  • --help β€” display available options (--help-hidden for more πŸ‘€)
  • --help-list β€” display a list of available options (--help-list-hidden for more)
  • --version β€” display the version of this program πŸ’–

🌸 Polly Options 🌸 β€” configure the polly loop optimizer

  • --polly β€” enable the polly optimizer (works with -O1, -O2 or -O3)
  • --polly-2nd-level-tiling β€” enable a 2nd level loop of loop tiling 🧚
  • --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 -1 schedules another approximation stage before the actual dead code elimination. β€” yes the original parenthesis is unbalanced, no we're not fixing it, periodt πŸ’…)
  • --polly-delicm-max-ops=<int> β€” maximum number of isl operations to invest in lifetime analysis; 0 = no limit 🫢
  • --polly-detect-full-functions β€” allow the detection of full functions
  • --polly-dump-after β€” dump the module after Polly transformations into a file suffixed with "-after"
  • --polly-dump-after-file=<string> β€” dump the module after Polly transformations to the given file
  • --polly-dump-before β€” dump the module before Polly transformations into a file suffixed with "-before"
  • --polly-dump-before-file=<string> β€” dump the 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 you 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 you provided
  • --polly-only-region=<identifier> β€” only run on certain regions (the identifier you provide must appear in the name of the region's entry block β€” again, original parenthesis never closes, iconic behavior πŸ™ˆ)
  • --polly-only-scop-detection β€” only run scop detection, but no other optimizations
  • --polly-optimized-scops β€” Polly β€” dump the polyhedral description of Scops optimized with the isl scheduling optimizer, and the set of post-scheduling transformations gets 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-process-unprofitable β€” process scops that are unlikely to benefit from Polly optimizations. (yes there's a period at the end, she said what she said)
  • --polly-register-tiling β€” enable register tiling
  • --polly-report β€” print information about the activities of Polly πŸ“‹
  • --polly-reschedule β€” optimize SCoPs using ISL
  • --polly-show β€” highlight the code regions that will be optimized in a (CFG BBs and LLVM-IR instructions)
  • --polly-show-only β€” highlight the code regions that will be optimized in a (CFG only BBs)
  • --polly-stmt-granularity=<value> β€” the algorithm to use for splitting basic blocks into multiple statements
    • =bb β€” one statement per basic block
    • =scalar-indep β€” scalar independence heuristic
    • =store β€” store-level granularity
  • --polly-tc-opt β€” perform optimizations of tensor contractions based on pattern matching πŸ“
  • --polly-tiling β€” enable loop tiling
  • --polly-vectorizer=<value> β€” select the vectorization strategy
    • =none β€” no Vectorization
    • =stripmine β€” strip-mine outer loops for the loop-vectorizer to trigger

and that's the whole flag list, you made it to the end bestie 🏁✨ this page was clang-repl 18, dated June 2025, and it lives under the name CLANG-REPL(1) πŸ’– go forth and repl, ily, bye πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from