MODULARIZE(1)
MODULARIZE(1) π
okay bestie, so this is the manual page for modularize, and it lives in the User Commands section of the manual π it's long, it's iconic, and we're gonna get through it together. no cap π«Ά
β¨ NAME β¨
modularize β the manual page for modularize 11 πΈ
π¦ DESCRIPTION π¦
OVERVIEW: modularize.
USAGE:
modularize [options] <list of one or more header list files> <arguments to be passed to front end>...
OPTIONS:
okay so this is the big part. buckle up, we're listing everything π
π Color Options π
--colorβ use colors in output π (default=autodetect)
π¦ General options π¦
-I=<path>β include path for the coverage check ποΈ--aarch64-neon-syntax=<value>β pick the style of NEON code that gets emitted from the AArch64 backend:=genericβ emit generic NEON assembly=appleβ emit Apple-style NEON assembly
--addrsigβ emit an address-significance table β¨--amdgpu-bypass-slow-divβ skip 64-bit divide for dynamic 32-bit values--amdgpu-disable-loop-alignmentβ do not align and prefetch loops--amdgpu-disable-power-schedβ disable scheduling to minimize mAI power bursts--amdgpu-dpp-combineβ enable DPP combiner--amdgpu-dump-hsa-metadataβ dump AMDGPU HSA Metadata--amdgpu-enable-global-sgpr-addrβ enable use of SGPR regs for GLOBAL LOAD/STORE instructions--amdgpu-enable-merge-m0β merge and hoist M0 initializations--amdgpu-promote-alloca-to-vector-limit=<uint>β maximum byte size to consider promote alloca to vector--amdgpu-reserve-vgpr-for-sgpr-spillβ allocates one VGPR for future SGPR Spill--amdgpu-sdwa-peepholeβ enable SDWA peepholer--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 original gives us nothing here, no description, zero notes, it's giving mysterious π)--arm-implicit-it=<value>β allow conditional instructions outside of an IT block:=alwaysβ accept in both ISAs, emit implicit ITs in Thumb=neverβ warn in ARM, reject in Thumb=armβ accept in ARM, reject in Thumb=thumbβ warn in ARM, emit implicit ITs in Thumb
--asm-show-instβ emit internal instruction representation to 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)--basicblock-sections=<all | <function list (file)> | labels | none>β emit basic blocks into separate sections--block-check-header-list-onlyβ only warn if#includedirectives are inside extern or namespace blocks when the included header is in the header list.--bounds-checking-single-trapβ use one trap block per function--cfg-hide-deoptimize-pathsβ (no description in the original, bestie, it's just vibes π)--cfg-hide-unreachable-pathsβ (again, no description given π)--code-model=<value>β choose the code model:=tinyβ tiny code model=smallβ small code model=kernelβ kernel code model=mediumβ medium code model=largeβ large code model
--cost-kind=<value>β target cost kind:=throughputβ reciprocal throughput=latencyβ instruction latency=code-sizeβ code size
--coverage-check-onlyβ only do the coverage check.--cvp-dont-add-nowrap-flagsβ (yep, no description here either π« )--data-sectionsβ emit data into separate sections--debug-entry-valuesβ enable debug info for the debug entry values.--debugger-tune=<value>β tune debug info for a particular debugger:=gdbβ gdb=lldbβ lldb=sceβ SCE targets (e.g. PS4)
--debugify-level=<value>β the kind of debug info to add:=locationsβ locations only=location+variablesβ locations and Variables
--debugify-quietβ suppress verbose debugify output π€«--denormal-fp-math=<value>β select which denormal numbers the code is permitted to require:=ieeeβ IEEE 754 denormal numbers=preserve-signβ the sign of a flushed-to-zero number is preserved in the sign of 0=positive-zeroβ denormals are flushed to positive zero
--denormal-fp-math-f32=<value>β select which denormal numbers the code is permitted to require, but forfloat:=ieeeβ IEEE 754 denormal numbers=preserve-signβ the sign of a flushed-to-zero number is preserved in the sign of 0=positive-zeroβ denormals are flushed to positive zero
--disable-promote-alloca-to-ldsβ disable promote alloca to LDS--disable-promote-alloca-to-vectorβ disable promote alloca to vector--disable-tail-callsβ never emit tail calls--display-file-listsβ display lists of good files (no compile errors), problem files, and a combined list with problem files preceded by a'#'.--do-counter-promotionβ do counter register promotion--dwarf-version=<int>β Dwarf version--dwarf64β generate debugging info in the 64-bit DWARF format--emit-call-site-infoβ emit call site debug information, if debug information is enabled.--emscripten-cxx-exceptions-allowed=<string>β the list of function names in which Emscripten-style exception handling is enabled (see emscriptenEMSCRIPTEN_CATCHING_ALLOWEDoptions)--emulated-tlsβ use emulated TLS model--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 a mystery, we respect it π)--enable-gvn-sinkβ enable the GVN sinking pass (default = off)--enable-load-in-loop-preβ (no description given π)--enable-load-preβ (no description given π)--enable-loop-simplifycfg-term-foldingβ (no description given π)--enable-name-compressionβ enable name/filename string compression--enable-no-infs-fp-mathβ enable FP math optimizations that assume no +-Infs--enable-no-nans-fp-mathβ enable FP math optimizations that assume no NaNs--enable-no-signed-zeros-fp-mathβ enable FP math optimizations that assume the sign of 0 is insignificant--enable-no-trapping-fp-mathβ enable setting the FP exceptions build attribute not to use exceptions--enable-unsafe-fp-mathβ enable optimizations that may decrease FP precision--exception-model=<value>β exception model:=defaultβ default exception handling model=dwarfβ DWARF-like CFI based exception handling=sjljβ SjLj exception handling=armβ ARM EHABI exceptions=winehβ Windows exception model=wasmβ WebAssembly exception handling
--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.--fatal-warningsβ treat warnings as errors π€--filetype=<value>β choose a file type (not all types are supported by all targets):=asmβ emit an assembly ('.s') file=objβ emit a native object ('.o') file=nullβ emit nothing, for performance testing
--filter=<string>β only process files that match this filter. this flag only applies to all-TUs.--float-abi=<value>β choose float ABI type:=defaultβ target default float ABI type=softβ soft float ABI (implied by-soft-float)=hardβ hard float ABI (uses FP registers)
bestie we are NOT done, the options keep going π part 2 incoming π
β¨ OPTIONS β¨
okay so like, this is the part where the magic happens π« every single flag you could ever want (and some you didn't know you needed) is right here. let's get into it, bestie π«Ά
--force-dwarf-frame-sectionβ Always emit a debug frame section. like, no matter what, it's gonna be there πββοΈ--fp-contract=<value>β Enable aggressive formation of fused FP ops. here's the vibe:=fastβ Fuse FP ops whenever profitable. if it makes sense, do it π=onβ Only fuse 'blessed' FP ops. just the chosen ones β¨=offβ Only fuse FP ops when the result won't be affected. safety first, bestie π‘οΈ
--frame-pointer=<value>β Specify frame pointer elimination optimization. choices, choices:=allβ Disable frame pointer elimination. keep that pointer around π=non-leafβ Disable frame pointer elimination for non-leaf frame. only for the non-leaf ones πΏ=noneβ Enable frame pointer elimination. bye bye pointer π
--function-sectionsβ Emit functions into separate sections. each function gets its own lil section π--gpsize=<uint>β Global Pointer Addressing Size. The default size is 8. so like, if you don't say anything, it's 8, periodt π―--hash-based-counter-splitβ Rename counter variable of a comdat function based on cfg hash. it's giving hash-based renaming π’--hot-cold-splitβ Enable hot-cold splitting pass. hot stuff and cold stuff get separated π₯βοΈ--import-all-indexβ Import all external functions in index. bring 'em all in π«--incremental-linker-compatibleβ When used withfiletype=obj, emit an object file which can be used with an incremental linker. so like, only when you're doingfiletype=objπ§©--instcombine-code-sinkingβ Enable code sinking. sinking code, not the vibe π--instcombine-guard-widening-window=<uint>β How wide an instruction window to bypass looking for another guard. how wide? you tell me π--instcombine-max-iterations=<uint>β Limit the maximum number of instruction combining iterations. don't overdo it, bestie π--instcombine-max-num-phis=<uint>β Maximum number phis to handle in intptr/ptrint folding. max phis, got it π’--instcombine-maxarray-size=<uint>β Maximum array size considered when doing a combine. if it's too big, we don't combine it π«--instcombine-negator-enabledβ Should we attempt to sink negations? like, should we? π€--instcombine-negator-max-depth=<uint>β What is the maximal lookup depth when trying to check for viability of negation sinking. how deep do we go? π΅οΈββοΈ--instrprof-atomic-counter-update-allβ Make all profile counter updates atomic (for testing only). testing only, don't @ me π§ͺ--internalize-public-api-file=<filename>β A file containing list of symbol names to preserve. keep these symbols safe π‘οΈ--internalize-public-api-list=<list>β A list of symbol names to preserve. same but as a list π--iterative-counter-promotionβ Allow counter promotion across the whole loop nest. promote those counters everywhere π--lto-embed-bitcodeβ Embed LLVM bitcode in object files produced by LTO. bitcode goes inside π₯--lto-pass-remarks-filter=<regex>β Only record optimization remarks from passes whose names match the given regular expression. regex filter, fancy π--lto-pass-remarks-format=<format>β The format used for serializing remarks (default: YAML). default is YAML, fyi π--lto-pass-remarks-output=<filename>β Output filename for pass remarks. where do the remarks go? here π--march=<string>β Architecture to generate code for (see--version). check--versionfor the tea ποΈ--matrix-default-layout=<value>β Sets the default matrix layout. how do you like your matrices?=column-majorβ Use column-major layout. columns first ποΈ=row-majorβ Use row-major layout. rows first π
--mattr=<a1,+a2,-a3,...>β Target specific attributes (-mattr=helpfor details). need help?-mattr=helpis your friend π--max-counter-promotions=<int>β Max number of allowed counter promotions. don't promote too many π¦--max-counter-promotions-per-loop=<uint>β Max number counter promotions per loop to avoid increasing register pressure too much. keep that register pressure in check π§ββοΈ--mc-relax-allβ When used withfiletype=obj, relax all fixups in the emitted object file. relax, take it easy ποΈ--mcpu=<cpu-name>β Target a specific cpu type (-mcpu=helpfor details).-mcpu=helphas the deets π₯οΈ--meabi=<value>β Set EABI type (default depends on triple). depends on the triple, so like, it varies π€·ββοΈ=defaultβ Triple default EABI version. the default default π=4β EABI version 4. version 4, got it 4οΈβ£=5β EABI version 5. version 5, slay 5οΈβ£=gnuβ EABI GNU. GNU style π
--memop-size-large=<uint>β Set large value thresthold in memory intrinsic size profiling. Value of 0 disables the large value profiling. (yes, it says "thresthold" β we keep it exactly as is, bestie π)--memop-size-range=<string>β Set the range of size in memory intrinsic calls to be profiled precisely, in a format of<start_val>:<end_val>. format is start:end, periodt π―--merror-missing-parenthesisβ Error for missing parenthesis around predicate registers. missing parenthesis? error. simple π₯--merror-noncontigious-registerβ Error for register names that aren't contigious. (typo in the original β "contigious" stays π) if it's not contigious, error π¨--mhvxβ Enable Hexagon Vector eXtensions. HVX on, bestie β¨--mhvx=<value>β Enable Hexagon Vector eXtensions. which version?=v60β Build for HVX v60. v60 vibes π=v62β Build for HVX v62. v62 vibes π=v65β Build for HVX v65. v65 vibes π=v66β Build for HVX v66. v66 vibes π=v67β Build for HVX v67. v67 vibes π
--mips-compact-branches=<value>β MIPS Specific: Compact branch policy. MIPS only, just so you know π§=neverβ Do not use compact branches if possible. never ever π«=optimalβ Use compact branches where appropriate (default). the default, optimal π―=alwaysβ Always use compact branches if possible. always, no exceptions π―
--mips16-constant-islandsβ Enable mips16 constant islands. islands of constants ποΈ--mips16-hard-floatβ Enable mips16 hard float. hard float, not soft π§--mir-strip-debugify-onlyβ Should mir-strip-debug only strip debug info from debugified modules by default. only from debugified ones, by default π€--mno-compoundβ Disable looking for compound instructions for Hexagon. no compound for Hexagon π«--mno-fixupβ Disable fixing up resolved relocations for Hexagon. no fixup for Hexagon π«--mno-ldc1-sdc1β Expand double precision loads and stores to their single precision counterparts. double becomes single, interesting π--mno-pairingβ Disable looking for duplex instructions for Hexagon. no pairing for Hexagon π«--module-map-path=<string>β Turn on module map output and specify output path or file name. If no path is specified and if prefix option is specified, use prefix for file path. so like, if no path and prefix is there, use prefix π--mwarn-missing-parenthesisβ Warn for missing parenthesis around predicate registers. warn, not error β οΈ--mwarn-noncontigious-registerβ Warn for register names that arent contigious. (another typo β "arent" and "contigious" stay exactly π ) warn for non-contigious registers β οΈ--mwarn-sign-mismatchβ Warn for mismatching a signed and unsigned value. signed vs unsigned mismatch? warn β οΈ--no-coverage-checkβ Don't do the coverage check. skip the coverage check, live a little π’--no-deprecated-warnβ Suppress all deprecated warnings. no deprecated warnings, periodt π«--no-discriminatorsβ Disable generation of discriminator information. no discriminators here π«--no-warnβ Suppress all warnings. all warnings? gone. silence π€«--no-xray-indexβ Don't emitxray_fn_idxsection. no xray index section π«--nozero-initialized-in-bssβ Don't place zero-initialized symbols into bss section. zero-init symbols not in bss π«--nvptx-sched4regβ NVPTX Specific: schedule for register pressue. (yep, "pressue" is another typo, we keep it π) NVPTX only, schedule for register pressue π―--poison-checking-function-localβ Check that returns are non-poison (for testing). testing only, checking for poison β οΈ--prefix=<string>β Prepend header file paths with this prefix. If not specified, the files are considered to be relative to the header list file. so like, if you don't give a prefix, they're relative to the header list file π--problem-files-list=<string>β List of files with compilation or modularization problems for assistant mode. This will be excluded. assistant mode, and these get excluded π«--r600-ir-structurizeβ Use StructurizeCFG IR pass. structurize that CFG ποΈ--rdf-dumpβ (no description, just vibes) π€·ββοΈ--rdf-limit=<uint>β (no description, just vibes) π€·ββοΈ--relax-elf-relocationsβ EmitGOTPCRELX/REX_GOTPCRELXinstead ofGOTPCRELon x86-64 ELF. x86-64 ELF specific, fancy relocations π--relocation-model=<value>β Choose relocation model. pick your fighter:=staticβ Non-relocatable code. static, no relocation π§±=picβ Fully relocatable, position independent code. PIC, fully relocatable ποΈ=dynamic-no-picβ Relocatable external references, non-relocatable code. dynamic but no pic π€=ropiβ Code and read-only data relocatable, accessed PC-relative. ropi, PC-relative π₯οΈ=rwpiβ Read-write data relocatable, accessed relative to static base. rwpi, static base π=ropi-rwpiβ Combination of ropi and rwpi. both, why not? π€
--root-module=<string>β Specify the name of the root module. name that root module π³--runtime-counter-relocationβ Enable relocating counters at runtime. relocate counters at runtime β±οΈ--safepoint-ir-verifier-print-onlyβ (no description, just vibes) π€·ββοΈ--sample-profile-check-record-coverage=<N>β Emit a warning if less than N% of records in the input profile are matched to the IR. less than N%? warning β οΈ--sample-profile-check-sample-coverage=<N>β Emit a warning if less than N% of samples in the input profile are matched to the IR. same but for samples β οΈ--sample-profile-max-propagate-iterations=<uint>β the max number of iterations to go through when you're propagating sample block/edge weights through the CFG. like, how many laps around the block before we stop. πββοΈ--speculative-counter-promotion-max-exiting=<uint>β the max number of exiting blocks of a loop that's allowed before we'll do speculative counter promotion. over that count? nope.--speculative-counter-promotion-to-loopβ when this is false, if the target block is in a loop, the promotion gets disallowed unless the promoted counter update can be further/iteratively promoted into an acyclic region. iykyk. π--stack-alignment=<uint>β override the default stack alignment, bestie. you're the boss now.--stack-size-sectionβ emit a section that holds stack size metadata. it's giving receipts. π§Ύ--stack-symbol-orderingβ order local stack symbols. that's it, that's the whole thing.--stackrealignβ force-align the stack to the minimum alignment. no negotiating. πͺ--summary-file=<string>β the summary file to use for function importing.--tail-predication=<value>β MVE tail-predication options. here's the menu, pick your vibe:=disabledβ don't tail-predicate loops. π«=enabled-no-reductionsβ enable tail-predication, but not for reduction loops.=enabledβ enable tail-predication, reduction loops included. β=force-enabled-no-reductionsβ enable tail-predication, but not for reduction loops, and force this β which might be unsafe. β οΈ=force-enabledβ enable tail-predication, reduction loops included, and force this β which might be unsafe. β οΈ
--tailcalloptβ turnfastcccalls into tail calls by (potentially) changing the ABI. yes, the ABI. that's the tradeoff, bestie. π--thread-model=<value>β choose your threading model:=posixβ POSIX thread model.=singleβ Single thread model.
--threads=<int>β okay so this one literally has no description on the page. it's just sitting there. mysterious main character energy. π--tls-size=<uint>β bit size of immediate TLS offsets.--unique-bb-section-namesβ give unique names to every basic block section. no dupes allowed. β¨--unique-section-namesβ give unique names to every section. same energy, bigger scope.--use-ctorsβ use.ctorsinstead of.init_array. switching it up.--verify-region-infoβ verify region info. heads up: this is 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 the value profiler.--x86-align-branch=<string>β specify types of branches to align (it's a plus-separated list of types). the roster: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 isn't0, 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 specified size. the default value0does not align branches. π--x86-branches-within-32B-boundariesβ align selected instructions to mitigate the negative performance impact of Intel's micro code update for errataskx102.
β οΈ real talk: this may break assumptions about labels corresponding to particular instructions, and should be used with caution. do not just send it. π
--x86-pad-max-prefix-size=<uint>β maximum number of prefixes to use for padding.
β¨ Generic Options β¨
the classics, the icons, the ones everyone knows:
--helpβ display available options (--help-hiddenfor more). π--help-listβ display the list of available options (--help-list-hiddenfor more).--versionβ display the version of this program.
πΈ Polly Options: Configure the polly loop optimizer πΈ
--pollyβ enable the polly optimizer (only at-O3, don't forget). π¦--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-1schedules another approximation stage before the actual dead code elimination. β and yes, the paren really is left hanging open like that, we don't fix it, we respect it π )--polly-delicm-max-ops=<int>β maximum number of isl operations to invest for lifetime analysis;0= no limit.--polly-detect-full-functionsβ allow the detection of full functions.--polly-dump-afterβ dump 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 provided.--polly-isl-arg=<argument>β option passed to ISL.--polly-on-isl-error-abortβ abort if an isl error is encountered. π΅--polly-only-func=<string>β only run on functions that match a regex. multiple regexes can be comma separated. Scop detection will run on all functions that match ANY of the regexes provided.--polly-only-region=<identifier>β only run on certain regions (the provided identifier must appear in the name of the region's entry block β again, the original paren just stops there, we keep it exactly as it is π)--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 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-process-unprofitableβ process scops that are unlikely to benefit from Polly optimizations.--polly-register-tilingβ enable register tiling.--polly-reportβ print information about the activities of Polly.--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-target=<value>β the hardware to target:=cpuβ generate CPU code.
--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 whole page, bestie!! π«Ά you just read the entire thing, and honestly? iconic. this is modularize version 11, dated January 2022, from the MODULARIZE(1) manual page β go forth and modularize responsibly, mwah πβ¨
π¦ where this page comes from
- ubuntu jammy: clang-tools-11 1:11.1.0-6 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms