CLANG-REPL(1)

πŸ“¦
version 16.0.6 Β· 2 versions
, in debian bookworm

πŸ’… clang-repl πŸ’…

okay so bestie, welcome to the manual page for clang-repl 16 β€” it's a User Command, it's iconic, and it's about to make your whole terminal pop off. πŸ’–


🌸 NAME 🌸

clang-repl β€” manual page for clang-repl 16 ✨


πŸŽ€ DESCRIPTION πŸŽ€

okay so here's the whole vibe of how you actually call this thing:

USAGE: clang-repl [options] [code to run]

that's it. that's the shape of it. options go in, code goes in, magic happens. πŸͺ„

and then there's OPTIONS: β€” and bestie, there are a LOT of them. buckle up. 🌈


πŸ‘‘ OPTIONS πŸ‘‘

🎨 Color Options 🎨

  • --color β€” use colors in your output, obviously πŸ’… (default is autodetect, so it figures it out on its own, slay)

πŸ”§ General options πŸ”§

ngl this list is long, but every single one of these is a real flag and we're going through ALL of them. no skipping. periodt. πŸ’€
  • --Xcc=<string> β€” an argument you hand straight over to the CompilerInvocation
  • --aarch64-neon-syntax=<value> β€” pick which style of NEON code the AArch64 backend emits:
    • =generic β€” emit generic NEON assembly
    • =apple β€” emit Apple-style NEON assembly 🍎
  • --aarch64-use-aa β€” turn on using AA during codegen
  • --abort-on-max-devirt-iterations-reached β€” bail out (abort!) once the max iterations for the devirtualization CGSCC repeat pass is hit
  • --allow-ginsert-as-artifact β€” let G_INSERT count as an artifact. it's literally a hack around AMDGPU test infinite loops 🫠
  • --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 hoist M0 initializations
  • --amdgpu-enable-power-sched β€” enable scheduling to minimize mAI power bursts
  • --amdgpu-promote-alloca-to-vector-limit=<uint> β€” the maximum byte size you'll consider for promoting alloca to vector
  • --amdgpu-sdwa-peephole β€” enable the SDWA peepholer
  • --amdgpu-use-aa-in-codegen β€” turn on using 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 on this one bestie, it just exists and vibes ✨
  • --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 counter updates using atomic fetch add, but for promoted counters only
  • --atomic-first-counter β€” use atomic fetch add for the first counter in a function (usually that's the entry counter)
  • --bounds-checking-single-trap β€” use one trap block per function
  • --cfg-hide-cold-paths=<number> β€” hide blocks whose relative frequency sits below the value you give
  • --cfg-hide-deoptimize-paths β€” no description, it's mysterious like that πŸ™ˆ
  • --cfg-hide-unreachable-paths β€” also no description, also mysterious πŸ™ˆ
  • --cost-kind=<value> β€” the 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 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 the verbose debugify output (shhh 🀫)
  • --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> β€” the Dwarf version
  • --dwarf64 β€” generate debugging info in the 64-bit DWARF format
  • --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 where Emscripten-style exception handling is enabled (peep the emscripten EMSCRIPTEN_CATCHING_ALLOWED options)
  • --enable-cse-in-irtranslator β€” should CSE be enabled in the irtranslator?
  • --enable-cse-in-legalizer β€” should CSE be enabled in the 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 keeping its secrets πŸ™ˆ
  • --enable-gvn-sink β€” enable the GVN sinking pass (default = off)
  • --enable-load-in-loop-pre β€” no description, just vibes ✨
  • --enable-load-pre β€” no description, just vibes ✨
  • --enable-loop-simplifycfg-term-folding β€” no description, just vibes ✨
  • --enable-name-compression β€” enable name/filename string compression
  • --enable-split-backedge-in-load-pre β€” no description, just vibes ✨
  • --execute-concurrency=<uint> β€” how many threads get used to process all 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
  • --experimental-debug-variable-locations β€” use the experimental new value-tracking variable locations πŸ§ͺ
  • --fatal-warnings β€” treat warnings as errors (no more ignoring them bestie 😭)
  • --filter=<string> β€” only process files that match this filter. this flag only applies to all-TUs
  • --fs-profile-debug-bw-threshold=<uint> β€” only show the debug message if the source branch weight is greater than this value
  • --fs-profile-debug-prob-diff-threshold=<uint> β€” only show the 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 the 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 the cfg hash
  • --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 that 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 while looking for another guard
  • --instcombine-max-iterations=<uint> β€” cap the maximum number of instruction combining iterations
  • --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> β€” the maximal lookup depth when you're trying to check whether negation sinking is viable
  • --instrprof-atomic-counter-update-all β€” make ALL profile counter updates atomic (for testing only, bestie, don't ship this 🚨)
  • --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
  • --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, it's just there looking cute πŸ™ˆ
  • --max-counter-promotions=<int> β€” max number of allowed counter promotions

okay bestie that's the end of part 1 β€” but we are SO not done, there's more coming, don't go anywhere πŸŒΈπŸ’–

okay so the option buffet continues, bestie, and it is giving a lot, but we're gonna get through every single one together, no skips πŸ’–βœ¨

  • --max-counter-promotions-per-loop=<uint> β€” max number of counter promotions per loop, so we don't crank register pressure too hard. chill vibes only.
  • --mc-relax-all β€” when you're using filetype=obj, relax all fixups in the emitted object file. slay.
  • --mcabac β€” tbd. literally tbd, the manual said it, not me πŸ’€.
  • --merror-missing-parenthesis β€” error out if a predicate register is missing its parenthesis. strict mode.
  • --merror-noncontigious-register β€” error for register names that aren't contigious. (yes, that spelling, bestie, we keep it exactly.)
  • --mhvx β€” enable Hexagon Vector eXtensions. hexagon girlies rise.
  • --mhvx=<value> β€” enable Hexagon Vector eXtensions, but pick your vibe:
    • =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. pick your 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. island era.
  • --mips16-hard-float β€” enable mips16 hard float. float like a butterfly.
  • --mir-strip-debugify-only β€” should mir-strip-debug only strip debug info from debugified modules by default. niche but valid.
  • --misexpect-tolerance=<uint> β€” prevents emitting diagnostics when profile counts are within N% of the threshold. tolerance is self-care.
  • --mno-compound β€” disable looking for compound instructions for Hexagon. no compound for you.
  • --mno-fixup β€” disable fixing up resolved relocations for Hexagon. leave it unresolved.
  • --mno-ldc1-sdc1 β€” expand double precision loads and stores to their single precision counterparts. split it.
  • --mno-pairing β€” disable looking for duplex instructions for Hexagon. no pairing today.
  • --mwarn-missing-parenthesis β€” warn for missing parenthesis around predicate registers. gentle reminder.
  • --mwarn-noncontigious-register β€” warn for register names that arent contigious. (again, spelling kept, iykyk.)
  • --mwarn-sign-mismatch β€” warn for mismatching a signed and unsigned value. signed vs unsigned drama.
  • --no-deprecated-warn β€” suppress all deprecated warnings. peace and quiet.
  • --no-discriminators β€” disable generation of discriminator information. no discriminators, we're inclusive.
  • --no-type-check β€” suppress type errors (Wasm). wasm said relax.
  • --no-warn β€” suppress all warnings. no warnings, periodt.
  • --nvptx-sched4reg β€” NVPTX specific: schedule for register pressue. (yes, pressue, we keep it.)
  • --opaque-pointers β€” use opaque pointers. mysterious pointer energy.
  • --poison-checking-function-local β€” check that returns are non-poison (for testing). poison check, bestie.
  • --print-pipeline-passes β€” print a -passes compatible string describing the pipeline (best-effort only). pipeline reveal.
  • --r600-ir-structurize β€” use StructurizeCFG IR pass. structure it.
  • --rdf-dump β€” no description given, mysterious.
  • --rdf-limit=<uint> β€” no description given, mysterious.
  • --runtime-counter-relocation β€” enable relocating counters at runtime. move them counters.
  • --safepoint-ir-verifier-print-only β€” no description given, mysterious.
  • --sample-profile-check-record-coverage=<N> β€” emit a warning if less than N% of records in the input profile are matched to the IR. coverage check.
  • --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 check.
  • --sample-profile-max-propagate-iterations=<uint> β€” maximum number of iterations to go through when propagating sample block/edge weights through the CFG. propagate responsibly.
  • --sanitizer-early-opt-ep β€” insert sanitizers on OptimizerEarlyEP. sanitize early.
  • --skip-ret-exit-block β€” suppress counter promotion if exit blocks contain ret. skip it.
  • --speculative-counter-promotion-max-exiting=<uint> β€” the max number of exiting blocks of a loop to allow speculative counter promotion. speculative but bounded.
  • --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. big brain logic.
  • --summary-file=<string> β€” the summary file to use for function importing. summary slay.
  • --sve-tail-folding=<string> β€” control the use of vectorisation using tail-folding for SVE. tail-folding era:
    • disabled β€” No loop types will vectorize using tail-folding
    • default β€” Uses the default tail-folding settings for the target CPU
    • all β€” All legal loop types will vectorize using tail-folding
    • simple β€” Use tail-folding for simple loops (not reductions or recurrences)
    • reductions β€” Use tail-folding for loops containing reductions
    • recurrences β€” Use tail-folding for loops containing fixed order recurrences
  • --tail-predication=<value> β€” MVE tail-predication pass options. pick your predication:
    • =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. assume merged.
  • --threads=<int> β€” no description given, mysterious.
  • --type-based-intrinsic-cost β€” calculate intrinsics cost based only on argument types. type-based math.
  • --verify-region-info β€” verify region info (time consuming). time consuming, bestie, beware.
  • --vp-counters-per-site=<number> β€” the average number of profile counters allocated per value profiling site. value profiling counters.
  • --vp-static-alloc β€” do static counter allocation for value profiler. static alloc.
  • --wasm-enable-eh β€” WebAssembly exception handling. wasm eh.
  • --wasm-enable-sjlj β€” WebAssembly setjmp/longjmp handling. setjmp longjmp.
  • --x86-align-branch=<string> β€” specify types of branches to align (plus separated list of types). branch alignment:
    • 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. NOP alignment realness.
  • --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!
  • --x86-pad-max-prefix-size=<uint> β€” maximum number of prefixes to use for padding. prefix padding.

Generic Options

  • --help β€” display available options (--help-hidden for more). help me help you.
  • --help-list β€” display list of available options (--help-list-hidden for more). list it.
  • --version β€” display the version of this program. version check.

Polly Options: Configure the polly loop optimizer

  • --polly β€” enable the polly optimizer (with -O1, -O2 or -O3). polly want a cracker? no, polly want optimization.
  • --polly-2nd-level-tiling β€” enable a 2nd level loop of loop tiling. double tiling.
  • --polly-ast-print-accesses β€” print memory access functions. print it.
  • --polly-context=<isl parameter set> β€” provide additional constraints on the context parameters. context constraints.
  • --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. precise steps.
  • --polly-delicm-max-ops=<int> β€” maximum number of isl operations to invest for lifetime analysis; 0=no limit. no limit at 0.
  • --polly-detect-full-functions β€” allow the detection of full functions. full function detection.
  • --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 file.
  • --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 file.
  • --polly-enable-simplify β€” simplify SCoP after optimizations. simplify slay.
  • --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 ignore.
  • --polly-isl-arg=<argument> β€” option passed to ISL. ISL arg.
  • --polly-matmul-opt β€” perform optimizations of matrix multiplications based on pattern matching. matrix multiplication optimization, periodt.
  • --polly-on-isl-error-abort β€” the second an isl error shows up, we abort. no gentle vibes, just πŸ’€
  • --polly-only-func=<string> β€” only run on functions that match a regex, bestie. multiple regexes? comma-separate them. scop detection will run on all functions that match ANY of the regexes you handed over. ANY of them ✨
  • --polly-only-region=<identifier> β€” only run on certain regions. the identifier you pass has to appear in the name of the region's entry block, periodt πŸŽ€
  • --polly-only-scop-detection β€” do the scop detection and literally nothing else. no other optimizations, we're just looking πŸ‘€
  • --polly-optimized-scops β€” Polly dumps the polyhedral description of Scops optimized with the isl scheduling optimizer, and the set of post-scheduling transformations gets applied on the schedule tree. iconic dump behavior πŸ’œ
  • --polly-parallel β€” generate thread parallel code (isl codegen only, iykyk) πŸ”₯
  • --polly-parallel-force β€” force generation of thread parallel code and ignore any cost model entirely. no cap, it does not care 🫢
  • --polly-pattern-matching-based-opts β€” do optimizations based on pattern matching 🧚
  • --polly-postopts β€” apply post-rescheduling optimizations such as tiling. heads up: it requires -polly-reschedule, so don't come crying to me if you skipped that πŸ™ˆ
  • --polly-pragma-based-opts β€” apply user-directed transformation from metadata ✨
  • --polly-pragma-ignore-depcheck β€” skip the dependency check for pragma-based transformations. bold move, bestie πŸ’…
  • --polly-process-unprofitable β€” process scops that are unlikely to benefit from Polly optimizations. yes, the unprofitable ones. we love an underdog 🌸
  • --polly-register-tiling β€” enable register tiling πŸŽ€
  • --polly-report β€” print information about the activities of Polly. she's giving full transparency πŸ’–
  • --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
    • =polly β€” Polly internal vectorizer
    • =stripmine β€” Strip-mine outer loops for the loop-vectorizer to trigger

and that's a wrap on the Polly parade, bestie πŸ’– this whole page is serving clang-repl 16, dated October 2023 β€” go forth and optimize, you absolute main character πŸ‘‘βœ¨

πŸ“¦ where this page comes from