CLANG-REPL(1)

πŸ“¦
version 17.0.6 Β· 4 versions
, in debian trixie, ubuntu questing

🌸 NAME 🌸

clang-repl β€” bestie, this is the manual page for clang-repl 17 πŸ’–


✨ DESCRIPTION ✨

okay so here's the whole vibe. you run it like this:

clang-repl [options] [code to run]

that's the usage, periodt. then there's a whole OPTIONS: section, and it's long β€” like, it ate and left no crumbs long. we got two little families in there: Color Options and General options. let's get into it 🫢


πŸ‘‘ OPTIONS πŸ‘‘

🎨 Color Options

  • --color β€” use colors in your output, so it's giving cute terminal instead of sad monochrome (default=autodetect) 🌈

πŸ› οΈ General options

  • --Xcc=<string> β€” an argument you wanna pass straight to the CompilerInvocation. yes, it goes to the compiler, no cap
  • --aarch64-neon-syntax=<value> β€” pick what style of NEON code the AArch64 backend emits:
    • =generic β€” emit generic NEON assembly
    • =apple β€” emit Apple-style NEON assembly 🍎
  • --aarch64-use-aa β€” turn on the use of AA during codegen.
  • --abort-on-max-devirt-iterations-reached β€” abort when we hit the max iterations for the devirtualization CGSCC repeat pass. dramatic but fair πŸ’€
  • --allow-ginsert-as-artifact β€” let G_INSERT be considered an artifact. it's literally a hack around AMDGPU test infinite loops, so don't @ me
  • --amdgpu-atomic-optimizer-strategy=<value> β€” choose 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 β€” don't align and prefetch loops, we're keeping it casual
  • --amdgpu-dpp-combine β€” enable the 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-promote-alloca-to-vector-limit=<uint> β€” 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 β€” (no description bestie, it's just there, mysterious main character energy πŸ™ˆ)
  • --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 the 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 the first counter in a function (usually the entry counter)
  • --bounds-checking-single-trap β€” use one trap block per function
  • --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, it's just doing its thing ✨)
  • --cfg-hide-unreachable-paths β€” (also no description, mysterious queen)
  • --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.
  • --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 the 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, it's lowkey keeping secrets πŸ’…)
  • --enable-gvn-sink β€” enable the GVN sinking pass (default = off)
  • --enable-load-in-loop-pre β€” (no description, iconic and unexplained)
  • --enable-load-pre β€” (no description, still slaying)
  • --enable-loop-simplifycfg-term-folding β€” (no description, we love a mystery πŸ¦‹)
  • --enable-name-compression β€” enable name/filename string compression
  • --enable-split-backedge-in-load-pre β€” (no description, it said nothing and left)
  • --execute-concurrency=<uint> β€” the number of threads used to process all files in parallel. set it to 0 for hardware concurrency. heads up bestie, 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
  • --fatal-warnings β€” treat warnings as errors. no more soft launches, it's all consequences now 😀
  • --filter=<string> β€” only process files that match this filter. reminder: 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 the active.lane.mask intrinsic
    • =data-without-lane-mask β€” create lane mask with compare/stepvector
    • =data-and-control β€” create lane mask using the 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 an extra base profile for a 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 the counter variable of a comdat function based on cfg hash
  • --hexagon-rdf-limit=<uint> β€” (no description, it's giving enigma πŸŽ€)
  • --hot-cold-split β€” enable the 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> β€” 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) πŸ§ͺ
  • --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
  • --iterative-counter-promotion β€” allow counter promotion across the whole loop nest.
okay bestie that's part 1 of 3, don't go anywhere β€” more options are literally on the way πŸ’–
  • --lto-aix-system-assembler=<path> β€” the path to a system assembler. AIX only, bestie, it literally only picks this up on AIX.
  • --lto-embed-bitcode=<value> β€” embed LLVM bitcode inside the object files that LTO produces. ✨
    • =none β€” do not embed. simple as that.
    • =optimized β€” embed after all the 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. picky, and honestly? valid. πŸ’…
  • --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 given, it's just out here vibing. πŸ¦‹
  • --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 the register pressure too much.
  • --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. iconic honestly. πŸ’€
  • --merror-missing-parenthesis β€” throw an error for missing parenthesis around predicate registers.
  • --merror-noncontigious-register β€” throw an error for register names that aren't contigious. (yes, spelled exactly like that, we don't fix the spelling, that's the bit.)
  • --mhvx β€” enable Hexagon Vector eXtensions. 🐝
  • --mhvx=<value> β€” enable Hexagon Vector eXtensions, but tell it which one:
    • =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, canonically, we respect it πŸ’…)
  • --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. chaos mode, love that for you 🫢
  • --nvptx-sched4reg β€” NVPTX specific: schedule for register pressue. (again, exact spelling, we keep it.)
  • --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. ✨ dot files, so aesthetic.
  • --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).
  • --r600-ir-structurize β€” use StructurizeCFG IR pass.
  • --riscv-add-build-attributes β€” no description, just here. 🌸
  • --runtime-counter-relocation β€” enable relocating counters at runtime.
  • --safepoint-ir-verifier-print-only β€” no description given. πŸŽ€
  • --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. πŸ™ˆ
  • --type-based-intrinsic-cost β€” calculate intrinsics cost based only on argument types.
  • --verify-region-info β€” verify region info (time consuming).
  • --vp-counters-per-site=<number> β€” the average number of profile counters allocated per value profiling site.
  • --vp-static-alloc β€” do static counter allocation for value profiler.
  • --wasm-enable-eh β€” WebAssembly exception handling.
  • --wasm-enable-sjlj β€” WebAssembly setjmp/longjmp handling.
  • --x86-align-branch=<string> β€” specify types of branches to align (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> β€” 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.
  • --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. bestie, read that again. caution.
  • --x86-pad-max-prefix-size=<uint> β€” maximum number of prefixes to use for padding.

🌟 Generic Options 🌟

  • --help β€” display available options (--help-hidden for more).
  • --help-list β€” display 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 (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> β€” extra constraints on the context parameters, bestie. Just drop them in πŸ’…
  • --polly-dce-precise-steps=<int> β€” the number of precise steps hanging out between two approximating iterations. And if you set it to -1? It schedules another approximation stage before the actual dead code elimination even happens. Iconic behavior fr.
  • --polly-delicm-max-ops=<int> β€” max number of isl operations you're willing to invest in lifetime analysis. 0 means no limit at all, go feral 🫢
  • --polly-detect-full-functions β€” lets the detection of full functions happen. periodt.
  • --polly-dump-after β€” dumps the module after Polly transformations into a file suffixed with "-after".
  • --polly-dump-after-file=<string> β€” dumps the module after Polly transformations to the file you literally name here.
  • --polly-dump-before β€” dumps the module before Polly transformations into a file suffixed with "-before".
  • --polly-dump-before-file=<string> β€” dumps the module before Polly transformations straight to the given file.
  • --polly-enable-simplify β€” simplifies the SCoP after optimizations ✨
  • --polly-ignore-func=<string> β€” ignores functions matching a regex. Multiple regexes? Comma separate them, queen. Scop detection will ignore every function that matches ANY of the regexes you handed over.
  • --polly-isl-arg=<argument> β€” an option passed to ISL. that's it, that's the tweet.
  • --polly-matmul-opt β€” performs optimizations of matrix multiplications based on pattern matching 🧚
  • --polly-on-isl-error-abort β€” aborts if an isl error is encountered. no chill, no mercy πŸ’€
  • --polly-only-func=<string> β€” only runs on functions matching a regex. Multiple regexes get comma separated, and scop detection will run on all functions that match ANY of the regexes provided.
  • --polly-only-region=<identifier> β€” only runs on certain regions (the provided identifier must appear in the name of the region's entry block
  • --polly-only-scop-detection β€” runs scop detection only, no other optimizations. just a lil peek πŸ‘€
  • --polly-optimized-scops β€” Polly dumps the 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 β€” generates thread parallel code (isl codegen only).
  • --polly-parallel-force β€” forces generation of thread parallel code, ignoring any cost model. main character energy, honestly.
  • --polly-pattern-matching-based-opts β€” performs optimizations based on pattern matching πŸ”₯
  • --polly-postopts β€” applies post-rescheduling optimizations such as tiling (requires -polly-reschedule).
  • --polly-pragma-based-opts β€” applies user-directed transformation from metadata.
  • --polly-pragma-ignore-depcheck β€” skips the dependency check for pragma-based transformations. living dangerously, i respect it πŸ™ˆ
  • --polly-process-unprofitable β€” processes scops that are unlikely to benefit from Polly optimizations.
  • --polly-register-tiling β€” enables register tiling ⭐
  • --polly-report β€” 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 β€” highlights the code regions that will be optimized in a (CFG only BBs).
  • --polly-stmt-granularity=<value> β€” the algorithm used 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 β€” performs optimizations of tensor contractions based on pattern matching πŸ’œ
  • --polly-tiling β€” enables loop tiling 🌸
  • --polly-vectorizer=<value> β€” selects the vectorization strategy:
    • =none β€” no Vectorization
    • =stripmine β€” strip-mine outer loops for the loop-vectorizer to trigger

okay bestie that's the whole page, every last Polly flag accounted for, no cap πŸŽ€ that was <rainbow>clang-repl 17</rainbow>, dated June 2025 β€” go forth and optimize, you absolute icon πŸ‘‘πŸ’–

πŸ“¦ where this page comes from