OVERVIEW: Swift refactor
USAGE: swift-refactor [options] [input files...]
OPTIONS:
Color Options:
--color - Use colors in output (default=autodetect)
General options:
-I <string> - Add a directory to the import search path
--aa-kind=<value> - Alias Analysis Kinds:
=none - Do not perform any AA
=basic-aa - basic-aa
=typed-access-tb-aa - typed-access-tb-aa
=all - all
--abort-on-max-devirt-iterations-reached - Abort when the max iterations for devirtualization CGSCC repeat pass is reached
--actions - Dump the available refactoring kind for a given range
--allocbox-to-stack-analyze-apply - Analyze functions into while alloc_box is passed
--allow-critical-edges -
--allow-ginsert-as-artifact - Allow G_INSERT to be considered an artifact. Hack around AMDGPU test infinite loops.
--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)
--basic-dynamic-replacement - Basic implementation of dynamic replacement
--bounds-checking-single-trap - Use one trap block per function
--bug-reducer-tester-failure-kind=<value> - The type of failure to perform
=opt-crasher - Crash the optimizer when we see the specified apply
=miscompile - Delete the target function call to cause a runtime miscompile that is not a crasher
=runtime-crasher - Delete the target function call to cause a runtime miscompile that is not a crasher
--bug-reducer-tester-target-func=<string> - Function that when called by an apply should cause BugReducerTester to blow up or miscompile if the pass visits the apply
--canonical-ossa-rewrite-borrows - Enable rewriting borrow scopes
--cfg-hide-cold-paths=<number> - Hide blocks with relative frequency below the given value
--cfg-hide-deoptimize-paths -
--cfg-hide-unreachable-paths -
--closure-specialize-eliminate-dead-closures - Do not eliminate dead closures after closure specialization. This is meant ot be used when testing.
--cmo-function-size-limit=<int> -
--constexpr-limit=<uint> - Number of instructions interpreted in a constexpr function
kind:
--rename - Perform rename refactoring
--extract-expr - Perform extract expression refactoring
--extract-repeat - Perform extract repeated expression refactoring
--fill-stub - Perform fill protocol stub refactoring
--expand-default - Perform expand default statement refactoring
--expand-switch-cases - Perform switch cases expand refactoring
--localize-string - Perform string localization refactoring
--collapse-nested-if - Perform collapse nested if statements
--convert-to-do-catch - Perform force try to do try catch refactoring
--simplify-long-number - Perform simplify long number literal refactoring
--strings-concatenation-to-interpolation - Perform strings concatenation to interpolation refactoring
--expand-ternary-expr - Perform expand ternary expression
--convert-to-ternary-expr - Perform convert to ternary expression
--convert-to-guard - Perform convert to guard expression
--convert-to-iflet - Perform convert to iflet expression
--extract-function - Perform extract function refactoring
--move-to-extension - Move selected members to an extension
--syntactic-rename - Perform syntactic rename
--find-rename-ranges - Find detailed ranges for syntactic rename
--find-local-rename-ranges - Find detailed ranges for local rename
--trailingclosure - Perform trailing closure refactoring
--replace-bodies-with-fatalError - Perform trailing closure refactoring
--memberwise-init - Generate member wise initializer
--add-equatable-conformance - Add Equatable conformance
--add-explicit-codable-implementation - Add Explicit Codable Implementation
--convert-to-computed-property - Convert from field initialization to computed property
--convert-to-switch-stmt - Perform convert to switch statement
--convert-call-to-async-alternative - Convert call to use its async alternative (if any)
--convert-to-async - Convert the entire function to async
--add-async-alternative - Add an async alternative of a function taking a callback
--add-async-wrapper - Add an async alternative that forwards onto the function taking a callback
--cost-kind=<value> - Target cost kind
=throughput - Reciprocal throughput
=latency - Instruction latency
=code-size - Code size
=size-latency - Code size and latency
--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-arc-cm -
--disable-i2p-p2i-opt - Disables inttoptr/ptrtoint roundtrip optimization
--disable-llvm-arc-opts -
--disable-populate-ownership-flags - Disable populating ownership flags
--disable-sil-cm-rr-cm -
--disable-sil-ownership-verification -
--do-counter-promotion - Do counter register promotion
--dont-abort-on-memory-lifetime-errors - Don't abort compilation if the memory lifetime checker detects an error.
--dot-cfg-mssa=<file name for generated dot file> - file name for generated dot file
Dump edits to stdout as:
--dump-rewritten - rewritten file
--dump-json - JSON
--dump-text - text
--enable-abc-hoisting -
--enable-abcopts -
--enable-access-storage-dump-uses - With --sil-access-storage-dumper, dump all uses
--enable-copyforwarding -
--enable-cse-in-irtranslator - Should enable CSE in irtranslator
--enable-cse-in-legalizer - Should enable CSE in Legalizer
--enable-destroy-hoisting - Enable the DestroyHoisting pass.
--enable-eager-specializer - Run the eager-specializer pass.
--enable-expand-all -
--enable-experimental-concurrency - Whether to enable experimental concurrency or not
--enable-experimental-linear-map-transposition -
--enable-gvn-hoist - Enable the GVN hoisting pass (default = off)
--enable-gvn-memdep -
--enable-gvn-sink - Enable the GVN sinking pass (default = off)
--enable-load-in-loop-pre -
--enable-load-pre -
--enable-loop-arc -
--enable-loop-simplifycfg-term-folding -
--enable-name-compression - Enable name/filename string compression
--enable-ossa-checked-cast-br-jump-threading - Enable OSSA checked cast branch jump threading (staging).
--enable-ossa-dominator-based-simplify - Enable OSSA dominator based simplifications (staging).
--enable-ossa-simple-jump-threading - Enable OSSA simple jump threading (staging).
--enable-rc-identity-arg-strip - Should RC identity try to strip off arguments
--enable-sil-passmanager-verifier-analysis - Enable verification of the passmanagers function notification infrastructure
--enable-split-backedge-in-load-pre -
--enable-swifttailcc-musttail-check - Check that tail calls from swifttailcc functions to swifttailcc functions are marked musttail.
--end-pos=<string> - Line:Column pair or /*label*/
--experimental-debug-variable-locations - Use experimental new value-tracking variable locations
--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.
--hash-based-counter-split - Rename counter variable of a comdat function based on cfg hash
--hot-cold-split - Enable hot-cold splitting pass
--import-all-index - Import all external functions in index.
--inline-tree-no-demangle - Don't demangle symbols in inline tree output
--instcombine-code-sinking - Enable code sinking
--instcombine-guard-widening-window=<uint> - How wide an instruction window to bypass looking for another guard
--instcombine-max-iterations=<uint> - Limit 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> - 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 list of symbol names to preserve
--internalize-public-api-list=<list> - A list of symbol names to preserve
--is-function-like - The symbol being renamed is function-like
--is-non-protocol-type - The symbol being renamed is a type and not a protocol
--iterative-counter-promotion - Allow counter promotion across the whole loop nest.
--keep-will-throw-call - Keep calls to swift_willThrow, even if the throw is optimized away
--looprotate-single-block-loop -
--looprotate-size-limit=<int> -
--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
--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 -
--max-counter-promotions=<int> - Max number of allowed counter promotions
--max-counter-promotions-per-loop=<uint> - Max number counter promotions per loop to avoid increasing register pressure too much
--max-local-apply-recur-depth=<uint> - Max recursive depth for analyzing local functions
--mir-strip-debugify-only - Should mir-strip-debug only strip debug info from debugified modules by default
--misexpect-tolerance=<uint> - Prevents emiting diagnostics when profile counts are within N% of the threshold..
--module-name=<string> - The module name of the given test.
--move-only-address-checker-disable-lifetime-extension - Disable the lifetime extension of non-consumed fields of move-only values.
--move-only-diagnostics-silently-emit-diagnostics - For testing purposes, emit the diagnostic silently so we can filecheck the result of emitting an error from the move checkers
--new-name=<string> - A given name to rename to
--no-discriminators - Disable generation of discriminator information.
--old-name=<string> - The expected existing name
--opaque-pointers - Use opaque pointers
--parse-incomplete-ossa - Parse OSSA with incomplete lifetimes
--parse-serialized-sil - Parse the output of a serialized module
--poison-checking-function-local - Check that returns are non-poison (for testing)
--pos=<string> - Line:Column pair or /*label*/
--print-pipeline-passes - Print a '-passes' compatible string describing the pipeline (best-effort only).
--print-shortest-path-info - Print shortest-path information for inlining
--print-swift-mangling-stats - Print statistics about Swift symbol mangling
--resource-dir=<string> - The directory that holds the compiler resource files
--rewritten-output-file=<string> - Name of the rewritten output file
--runtime-counter-relocation - Enable relocating counters at runtime.
--safepoint-ir-verifier-print-only -
--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.
--sdk=<string> - Path to the SDK to build against
--sil-abcopts-report -
--sil-aggressive-inline - Enable aggressive inlining
--sil-assert-on-exclusivity-failure - Should the compiler assert when it diagnoses conflicting accesses rather than emitting a diagnostic? Intended for use only with debugging.
--sil-break-on-function=<string> - Break before running each function pass on a particular function
--sil-break-on-pass=<string> - Break before running a particular function pass
--sil-combine-disable-alloc-stack-opts -
--sil-consume-operator-disable-unknown-move-diagnostic -
--sil-consume-operator-disable-unknown-moveaddr-diagnostic -
--sil-disable-input-verify - Disable verification of input SIL
--sil-disable-late-ome-by-default - Disable late OME for non-transparent functions by default
--sil-disable-pass=<string> - Disable passes which contain a string from this list
--sil-disable-pass-only-function=<string> - Apply -sil-disable-pass only on this function
--sil-disable-skipping-passes - Do not skip passes even if nothing was changed
--sil-disable-typelowering-constantinfo-cache -
--sil-dump-functions-before-outliner=<string> - Break before running each function pass on a particular function
--sil-fso-disable-arg-explosion - Do not perform argument explosion during FSO. Intended only for testing purposes
--sil-fso-disable-dead-argument - Do not perform dead argument elimination during FSO. Intended only for testing purposes
--sil-fso-disable-owned-to-guaranteed - Do not perform owned to guaranteed during FSO. Intended only for testing purposes.
--sil-fso-enable-generics - Support function signature optimization of generic functions
--sil-fso-optimize-if-not-called - Optimize even if a function isn't called. For testing only!
--sil-full-demangle - Fully demangle symbol names in SIL output
--sil-generic-dump-functions-after-specialization -
--sil-generic-verify-after-specialization - Verify functions after they are specialized 'PrettyStackTraceFunction'-ing the original function if we fail.
--sil-infinite-jump-threading-budget - Use infinite budget for jump threading. Useful for testing purposes
--sil-inline-generics - Enable inlining of generics
--sil-inline-never-function=<string> - Never inline functions whose name is this string
--sil-inline-never-functions=<string> - Never inline functions whose name includes this string.
--sil-inline-verify-after-each-inline - Run sil verification after inlining each found callee apply site into a caller.
--sil-inline-verify-after-inline - Run sil verification after inlining all found callee apply sites into a caller.
--sil-loop-region-view-cfg-only-function=<string> - Only produce a graphviz file for the loop region info of this function
--sil-loop-region-view-cfg-only-functions=<string> - Only produce a graphviz file for the loop region info for the functions whose name contains this substring
--sil-lower-agg-instrs-expand-all -
--sil-mem2reg-disable-lifetime-canonicalization - Don't canonicalize any lifetimes during Mem2Reg.
--sil-merge-stack-slots - Merge generic alloc_stack instructions
--sil-min-pass-time=<uint> - The minimum number of milliseconds for which a pass is printed with -sil-print-pass-time
--sil-move-only-address-checker-dump-before-removing-mark-must-check - When bisecting it is useful to dump the SIL before the rest of the checker removes mark_unresolved_non_copyable_value. This lets one grab the SIL of a bad variable after all of the rest have been processed to work with further in sil-opt.
--sil-move-only-address-checker-num-top-level-to-process=<ulong> - Allows for bisecting on move introducer that causes an error. Only meant for debugging!
--sil-move-only-checker-emit-pruned-liveness-logging -
--sil-opt-pass-count=<string> - Stop optimizing after <N> passes or <N>.<M> passes/sub-passes
--sil-opt-profile-repeat=<uint> - repeat passes N times and report the run time
--sil-optimized-access-markers - Enable memory access markers during optimization passes.
--sil-ownership-verifier-enable-testing - Put the sil ownership verifier in testing mode. See comment in SILOwnershipVerifier.cpp above option for more information.
--sil-partial-specialization - Enable partial specialization of generics
--sil-partial-specialization-with-generic-substitutions - Enable partial specialization with generic substitutions
--sil-print-after=<string> - Print out the sil after passes which contain a string from this list.
--sil-print-all - Print SIL after each pass
--sil-print-around=<string> - Print out the sil before and after passes which contain a string from this list
--sil-print-before=<string> - Print out the sil before passes which contain a string from this list.
--sil-print-canonical-module - Print the textual SIL module after diagnostics
--sil-print-debuginfo - Include debug info in SIL output
--sil-print-final-ossa-module - Print the textual SIL module before lowering from OSSA
--sil-print-function=<string> - Only print out the sil for this function
--sil-print-functions=<string> - Only print out the sil for the functions whose name contains this substring
--sil-print-generic-specialization-info - Include generic specializationinformation info in SIL output
--sil-print-generic-specialization-loops - Print detected infinite generic specialization loops that were prevented
--sil-print-inlining-callee - Print functions that are inlined into other functions.
--sil-print-inlining-caller-after - Print functions into which another function has been inlined.
--sil-print-inlining-caller-before - Print functions into which another function is about to be inlined.
--sil-print-last - Print the last optimized function before and after the last pass
--sil-print-module-on-error - Printing SIL module in crash diagnostics.
--sil-print-no-color - Don't use color when printing SIL
--sil-print-on-error - Printing SIL function bodies in crash diagnostics.
--sil-print-pass-name - Print the name of each SIL pass before it runs
--sil-print-pass-time - Print the execution time of each SIL pass
--sil-print-sourceinfo - Include source annotation in SIL output
--sil-reference-binding-diagnostics-silently-emit-diagnostics - For testing purposes, emit the diagnostic silently so we can filecheck the result of emitting an error from the move checkers
For testing purposes only run the specified list of semantic arc optimization. If the list is empty, we run all transforms
--sil-semantic-arc-peepholes-all - Perform All ARC canonicalizations and peepholes
--sil-semantic-arc-peepholes-loadcopy-to-loadborrow - Perform the load [copy] to load_borrow peephole
--sil-semantic-arc-peepholes-redundant-borrowscope-elim - Perform the redundant borrow scope elimination peephole
--sil-semantic-arc-peepholes-redundant-copyvalue-elim - Perform the redundant copy_value peephole
--sil-semantic-arc-peepholes-lifetime-joining - Perform the join lifetimes peephole
--sil-semantic-arc-peepholes-ownership-conversion-elim - Eliminate unchecked_ownership_conversion insts that are not needed
--sil-semantic-arc-owned-to-guaranteed-phi - Perform Owned To Guaranteed Phi. NOTE: Seeded by peephole optimizer for compile time saving purposes, so run this after running peepholes)
--sil-semantic-arc-redundant-move-value-elim - Eliminate move_value which don't change owned lifetime characteristics. (Escaping, Lexical).
--sil-stats-block-count-delta-threshold=<number> - Threshold for reporting changed basic block count numbers
--sil-stats-dump-all - Dump all SIL module and SIL function stats
--sil-stats-func-block-count-delta-threshold=<number> - Threshold for reporting changed basic block count numbers for a function
--sil-stats-func-block-count-min-threshold=<int> - Min threshold for reporting changed basic block count numbers for a function
--sil-stats-func-inst-count-delta-threshold=<number> - Threshold for reporting changed instruction count numbers for a function
--sil-stats-func-inst-count-min-threshold=<int> - Min threshold for reporting changed instruction count numbers for a function
--sil-stats-function-count-delta-threshold=<number> - Threshold for reporting changed function count numbers
--sil-stats-functions - Enable computation of statistics for SIL functions
--sil-stats-inst-count-delta-threshold=<number> - Threshold for reporting changed instruction count numbers
--sil-stats-modules - Enable computation of statistics for SIL modules
--sil-stats-only-function=<string> - Function name, whose stats should be tracked
--sil-stats-only-functions=<string> - Pattern of a function name, whose stats should be tracked
--sil-stats-output-file=<string> - The name of the output file for optimizer counters
--sil-stats-used-memory-delta-threshold=<number> - Threshold for reporting changed memory usage numbers
--sil-stats-used-memory-min-threshold=<number> - Min threshold for reporting changed memory usage numbers
--sil-verify-after-pass=<string> - Verify the module/analyses after we run a pass from this list
--sil-verify-around-pass=<string> - Verify the module/analyses before/after we run a pass from this list
--sil-verify-before-pass=<string> - Verify the module/analyses before we run a pass from this list
--sil-verify-force-analysis - For all passes, precompute analyses before the pass and verify analyses after the pass
--sil-verify-force-analysis-around-pass=<string> - For the given passes, precompute analyses before the pass and verify analyses after the pass
--sil-verify-without-invalidation - Verify after passes even if the pass has not invalidated
--sil-view-canonical-cfg - Enable the sil cfg viewer pass after diagnostics
--sil-view-cfg - Enable the sil cfg viewer pass
--sil-view-cfg-only-function=<string> - Only produce a graphviz file for this function
--sil-view-cfg-only-functions=<string> - Only produce a graphviz file for the sil for the functions whose name contains this substring
--sil-view-silgen-cfg - Enable the sil cfg viewer pass before diagnostics
--simplify-cfg-simplify-unconditional-branches -
--simplify-instruction=<string> - Simplify instruction of specified kind(s)
--skip-ret-exit-block - Suppress counter promotion if exit blocks contain ret.
--source-filename=<string> - Name of the source file
--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.
--sroa-args-remove-dead-args-after -
--summary-file=<string> - The summary file to use for function importing.
--swift-diagnostics-assert-on-error -
--swift-diagnostics-assert-on-warning -
--target=<string> - target triple
--thinlto-assume-merged - Assume the input has already undergone ThinLTO function importing and the other pre-optimization pipeline changes.
--type-based-intrinsic-cost - Calculate intrinsics cost based only on argument types
--type-lowering-force-opaque-value-lowering - Force TypeLowering to behave as if building with opaque values enabled
--verify-abort-on-failure -
--verify-arc-loop-summary - Verify if loop summary is correct in ARCLoopsOpts
--verify-continue-on-failure -
--verify-di-holes -
--verify-dump-module-on-failure -
--verify-legalizer-debug-locs=<value> - Verify that debug locations are handled
=none - No verification
=legalizations - Verify legalizations
=legalizations+artifactcombiners - Verify legalizations and artifact combines
--verify-linetable - Verify that the debug locations within one scope are contiguous.
--verify-region-info - Verify region info (time consuming)
--verify-skip-convert-escape-to-noescape-attributes -
--view-cfg-long-line-behavior=<value> - Behavior when line width is greater than the value provided my -view-cfg-max-columns option
=none - Print everything
=truncate - Truncate long lines
=wrap - Wrap long lines
--view-cfg-max-columns=<uint> - Maximum width of a printed node
--view-cfg-only-for-function=<string> - Only print out the cfg for this function
--view-cfg-remove-use-list-comments - Should use list comments be removed
--view-loop-regions-long-line-behavior=<value> - Behavior when line width is greater than the value provided my -view-loop-regions-max-columns option
=none - Print everything
=truncate - Truncate long lines
=wrap - Wrap long lines
--view-loop-regions-max-columns=<uint> - Maximum width of a printed node
--view-loop-regions-only-for-function=<string> - Only print out the loop regions for this function
--view-loop-regions-remove-use-list-comments - Should use list comments be removed
--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
--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.
--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
Options (291)
| Option | Description | Source |
|---|---|---|
--color | - Use colors in output (default=autodetect) | help |
-I string | - Add a directory to the import search path | help |
--aa-kind value | - Alias Analysis Kinds: =none - Do not perform any AA =basic-aa - basic-aa =typed-access-tb-aa - typed-access-tb-aa =all - all | help |
--abort-on-max-devirt-iterations-reached | - Abort when the max iterations for devirtualization CGSCC repeat pass is reached | help |
--actions | - Dump the available refactoring kind for a given range | help |
--allocbox-to-stack-analyze-apply | - Analyze functions into while alloc_box is passed | help |
--allow-critical-edges | - | help |
--allow-ginsert-as-artifact | - Allow G_INSERT to be considered an artifact. | help |
--atomic-counter-update-promoted | - Do counter update using atomic fetch add for promoted counters only | help |
--atomic-first-counter | - Use atomic fetch add for first counter in a function (usually the entry counter) | help |
--basic-dynamic-replacement | - Basic implementation of dynamic replacement | help |
--bounds-checking-single-trap | - Use one trap block per function | help |
--bug-reducer-tester-failure-kind value | - The type of failure to perform =opt-crasher - Crash the optimizer when we see the specified apply =miscompile - Delete the target function call to cause a runtime miscompile that is not a crasher… | help |
--bug-reducer-tester-target-func string | - Function that when called by an apply should cause BugReducerTester to blow up or miscompile if the pass visits the apply | help |
--canonical-ossa-rewrite-borrows | - Enable rewriting borrow scopes | help |
--cfg-hide-cold-paths number | - Hide blocks with relative frequency below the given value | help |
--cfg-hide-deoptimize-paths | - | help |
--cfg-hide-unreachable-paths | - | help |
--closure-specialize-eliminate-dead-closures | - Do not eliminate dead closures after closure specialization. | help |
--cmo-function-size-limit int | - | help |
--constexpr-limit uint | - Number of instructions interpreted in a constexpr function | help |
--rename | - Perform rename refactoring | help |
--extract-expr | - Perform extract expression refactoring | help |
--extract-repeat | - Perform extract repeated expression refactoring | help |
--fill-stub | - Perform fill protocol stub refactoring | help |
--expand-default | - Perform expand default statement refactoring | help |
--expand-switch-cases | - Perform switch cases expand refactoring | help |
--localize-string | - Perform string localization refactoring | help |
--collapse-nested-if | - Perform collapse nested if statements | help |
--convert-to-do-catch | - Perform force try to do try catch refactoring | help |
--simplify-long-number | - Perform simplify long number literal refactoring | help |
--strings-concatenation-to-interpolation | - Perform strings concatenation to interpolation refactoring | help |
--expand-ternary-expr | - Perform expand ternary expression | help |
--convert-to-ternary-expr | - Perform convert to ternary expression | help |
--convert-to-guard | - Perform convert to guard expression | help |
--convert-to-iflet | - Perform convert to iflet expression | help |
--extract-function | - Perform extract function refactoring | help |
--move-to-extension | - Move selected members to an extension | help |
--syntactic-rename | - Perform syntactic rename | help |
--find-rename-ranges | - Find detailed ranges for syntactic rename | help |
--find-local-rename-ranges | - Find detailed ranges for local rename | help |
--trailingclosure | - Perform trailing closure refactoring | help |
--replace-bodies-with-fatalError | - Perform trailing closure refactoring | help |
--memberwise-init | - Generate member wise initializer | help |
--add-equatable-conformance | - Add Equatable conformance | help |
--add-explicit-codable-implementation | - Add Explicit Codable Implementation | help |
--convert-to-computed-property | - Convert from field initialization to computed property | help |
--convert-to-switch-stmt | - Perform convert to switch statement | help |
--convert-call-to-async-alternative | - Convert call to use its async alternative (if any) | help |
--convert-to-async | - Convert the entire function to async | help |
--add-async-alternative | - Add an async alternative of a function taking a callback | help |
--add-async-wrapper | - Add an async alternative that forwards onto the function taking a callback | help |
--cost-kind value | - Target cost kind =throughput - Reciprocal throughput =latency - Instruction latency =code-size - Code size =size-latency - Code size and latency | help |
--debug-info-correlate | - Use debug info to correlate profiles. | help |
--debugify-func-limit ulong | - Set max number of processed functions per pass. | help |
--debugify-level value | - Kind of debug info to add =locations - Locations only =location+variables - Locations and Variables | help |
--debugify-quiet | - Suppress verbose debugify output | help |
--disable-arc-cm | - | help |
--disable-i2p-p2i-opt | - Disables inttoptr/ptrtoint roundtrip optimization | help |
--disable-llvm-arc-opts | - | help |
--disable-populate-ownership-flags | - Disable populating ownership flags | help |
--disable-sil-cm-rr-cm | - | help |
--disable-sil-ownership-verification | - | help |
--do-counter-promotion | - Do counter register promotion | help |
--dont-abort-on-memory-lifetime-errors | - Don't abort compilation if the memory lifetime checker detects an error. | help |
--dot-cfg-mssa file | - file name for generated dot file | help |
--dump-rewritten | - rewritten file | help |
--dump-json | - JSON | help |
--dump-text | - text | help |
--enable-abc-hoisting | - | help |
--enable-abcopts | - | help |
--enable-access-storage-dump-uses | - With --sil-access-storage-dumper, dump all uses | help |
--enable-copyforwarding | - | help |
--enable-cse-in-irtranslator | - Should enable CSE in irtranslator | help |
--enable-cse-in-legalizer | - Should enable CSE in Legalizer | help |
--enable-destroy-hoisting | - Enable the DestroyHoisting pass. | help |
--enable-eager-specializer | - Run the eager-specializer pass. | help |
--enable-expand-all | - | help |
--enable-experimental-concurrency | - Whether to enable experimental concurrency or not | help |
--enable-experimental-linear-map-transposition | - | help |
--enable-gvn-hoist | - Enable the GVN hoisting pass (default = off) | help |
--enable-gvn-memdep | - | help |
--enable-gvn-sink | - Enable the GVN sinking pass (default = off) | help |
--enable-load-in-loop-pre | - | help |
--enable-load-pre | - | help |
--enable-loop-arc | - | help |
--enable-loop-simplifycfg-term-folding | - | help |
--enable-name-compression | - Enable name/filename string compression | help |
--enable-ossa-checked-cast-br-jump-threading | - Enable OSSA checked cast branch jump threading (staging). | help |
--enable-ossa-dominator-based-simplify | - Enable OSSA dominator based simplifications (staging). | help |
--enable-ossa-simple-jump-threading | - Enable OSSA simple jump threading (staging). | help |
--enable-rc-identity-arg-strip | - Should RC identity try to strip off arguments | help |
--enable-sil-passmanager-verifier-analysis | - Enable verification of the passmanagers function notification infrastructure | help |
--enable-split-backedge-in-load-pre | - | help |
--enable-swifttailcc-musttail-check | - Check that tail calls from swifttailcc functions to swifttailcc functions are marked musttail. | help |
--end-pos string | - Line:Column pair or /*label*/ | help |
--experimental-debug-variable-locations | - Use experimental new value-tracking variable locations | help |
--fs-profile-debug-bw-threshold uint | - Only show debug message if the source branch weight is greater than this value. | help |
--fs-profile-debug-prob-diff-threshold uint | - Only show debug message if the branch probility is greater than this value (in percentage). | help |
--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. | help |
--hash-based-counter-split | - Rename counter variable of a comdat function based on cfg hash | help |
--hot-cold-split | - Enable hot-cold splitting pass | help |
--import-all-index | - Import all external functions in index. | help |
--inline-tree-no-demangle | - Don't demangle symbols in inline tree output | help |
--instcombine-code-sinking | - Enable code sinking | help |
--instcombine-guard-widening-window uint | - How wide an instruction window to bypass looking for another guard | help |
--instcombine-max-iterations uint | - Limit the maximum number of instruction combining iterations | help |
--instcombine-max-num-phis uint | - Maximum number phis to handle in intptr/ptrint folding | help |
--instcombine-max-sink-users uint | - Maximum number of undroppable users for instruction sinking | help |
--instcombine-maxarray-size uint | - Maximum array size considered when doing a combine | help |
--instcombine-negator-enabled | - Should we attempt to sink negations? | help |
--instcombine-negator-max-depth uint | - What is the maximal lookup depth when trying to check for viability of negation sinking. | help |
--instrprof-atomic-counter-update-all | - Make all profile counter updates atomic (for testing only) | help |
--internalize-public-api-file filename | - A file containing list of symbol names to preserve | help |
--internalize-public-api-list list | - A list of symbol names to preserve | help |
--is-function-like | - The symbol being renamed is function-like | help |
--is-non-protocol-type | - The symbol being renamed is a type and not a protocol | help |
--iterative-counter-promotion | - Allow counter promotion across the whole loop nest. | help |
--keep-will-throw-call | - Keep calls to swift_willThrow, even if the throw is optimized away | help |
--looprotate-single-block-loop | - | help |
--looprotate-size-limit int | - | help |
--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 | help |
--matrix-default-layout value | - Sets the default matrix layout =column-major - Use column-major layout =row-major - Use row-major layout | help |
--matrix-print-after-transpose-opt | - | help |
--max-counter-promotions int | - Max number of allowed counter promotions | help |
--max-counter-promotions-per-loop uint | - Max number counter promotions per loop to avoid increasing register pressure too much | help |
--max-local-apply-recur-depth uint | - Max recursive depth for analyzing local functions | help |
--mir-strip-debugify-only | - Should mir-strip-debug only strip debug info from debugified modules by default | help |
--misexpect-tolerance uint | - Prevents emiting diagnostics when profile counts are within N% of the threshold.. | help |
--module-name string | - The module name of the given test. | help |
--move-only-address-checker-disable-lifetime-extension | - Disable the lifetime extension of non-consumed fields of move-only values. | help |
--move-only-diagnostics-silently-emit-diagnostics | - For testing purposes, emit the diagnostic silently so we can filecheck the result of emitting an error from the move checkers | help |
--new-name string | - A given name to rename to | help |
--no-discriminators | - Disable generation of discriminator information. | help |
--old-name string | - The expected existing name | help |
--opaque-pointers | - Use opaque pointers | help |
--parse-incomplete-ossa | - Parse OSSA with incomplete lifetimes | help |
--parse-serialized-sil | - Parse the output of a serialized module | help |
--poison-checking-function-local | - Check that returns are non-poison (for testing) | help |
--pos string | - Line:Column pair or /*label*/ | help |
--print-pipeline-passes | - Print a '-passes' compatible string describing the pipeline (best-effort only). | help |
--print-shortest-path-info | - Print shortest-path information for inlining | help |
--print-swift-mangling-stats | - Print statistics about Swift symbol mangling | help |
--resource-dir string | - The directory that holds the compiler resource files | help |
--rewritten-output-file string | - Name of the rewritten output file | help |
--runtime-counter-relocation | - Enable relocating counters at runtime. | help |
--safepoint-ir-verifier-print-only | - | help |
--sample-profile-check-record-coverage N | - Emit a warning if less than N% of records in the input profile are matched to the IR. | help |
--sample-profile-check-sample-coverage N | - Emit a warning if less than N% of samples in the input profile are matched to the IR. | help |
--sample-profile-max-propagate-iterations uint | - Maximum number of iterations to go through when propagating sample block/edge weights through the CFG. | help |
--sanitizer-early-opt-ep | - Insert sanitizers on OptimizerEarlyEP. | help |
--sdk string | - Path to the SDK to build against | help |
--sil-abcopts-report | - | help |
--sil-aggressive-inline | - Enable aggressive inlining | help |
--sil-assert-on-exclusivity-failure | - Should the compiler assert when it diagnoses conflicting accesses rather than emitting a diagnostic? Intended for use only with debugging. | help |
--sil-break-on-function string | - Break before running each function pass on a particular function | help |
--sil-break-on-pass string | - Break before running a particular function pass | help |
--sil-combine-disable-alloc-stack-opts | - | help |
--sil-consume-operator-disable-unknown-move-diagnostic | - | help |
--sil-consume-operator-disable-unknown-moveaddr-diagnostic | - | help |
--sil-disable-input-verify | - Disable verification of input SIL | help |
--sil-disable-late-ome-by-default | - Disable late OME for non-transparent functions by default | help |
--sil-disable-pass string | - Disable passes which contain a string from this list | help |
--sil-disable-pass-only-function string | - Apply -sil-disable-pass only on this function | help |
--sil-disable-skipping-passes | - Do not skip passes even if nothing was changed | help |
--sil-disable-typelowering-constantinfo-cache | - | help |
--sil-dump-functions-before-outliner string | - Break before running each function pass on a particular function | help |
--sil-fso-disable-arg-explosion | - Do not perform argument explosion during FSO. | help |
--sil-fso-disable-dead-argument | - Do not perform dead argument elimination during FSO. | help |
--sil-fso-disable-owned-to-guaranteed | - Do not perform owned to guaranteed during FSO. | help |
--sil-fso-enable-generics | - Support function signature optimization of generic functions | help |
--sil-fso-optimize-if-not-called | - Optimize even if a function isn't called. | help |
--sil-full-demangle | - Fully demangle symbol names in SIL output | help |
--sil-generic-dump-functions-after-specialization | - | help |
--sil-generic-verify-after-specialization | - Verify functions after they are specialized 'PrettyStackTraceFunction'-ing the original function if we fail. | help |
--sil-infinite-jump-threading-budget | - Use infinite budget for jump threading. | help |
--sil-inline-generics | - Enable inlining of generics | help |
--sil-inline-never-function string | - Never inline functions whose name is this string | help |
--sil-inline-never-functions string | - Never inline functions whose name includes this string. | help |
--sil-inline-verify-after-each-inline | - Run sil verification after inlining each found callee apply site into a caller. | help |
--sil-inline-verify-after-inline | - Run sil verification after inlining all found callee apply sites into a caller. | help |
--sil-loop-region-view-cfg-only-function string | - Only produce a graphviz file for the loop region info of this function | help |
--sil-loop-region-view-cfg-only-functions string | - Only produce a graphviz file for the loop region info for the functions whose name contains this substring | help |
--sil-lower-agg-instrs-expand-all | - | help |
--sil-mem2reg-disable-lifetime-canonicalization | - Don't canonicalize any lifetimes during Mem2Reg. | help |
--sil-merge-stack-slots | - Merge generic alloc_stack instructions | help |
--sil-min-pass-time uint | - The minimum number of milliseconds for which a pass is printed with -sil-print-pass-time | help |
--sil-move-only-address-checker-num-top-level-to-process ulong | - Allows for bisecting on move introducer that causes an error. | help |
--sil-move-only-checker-emit-pruned-liveness-logging | - | help |
--sil-opt-pass-count string | - Stop optimizing after <N> passes or <N>.<M> passes/sub-passes | help |
--sil-opt-profile-repeat uint | - repeat passes N times and report the run time | help |
--sil-optimized-access-markers | - Enable memory access markers during optimization passes. | help |
--sil-ownership-verifier-enable-testing | - Put the sil ownership verifier in testing mode. | help |
--sil-partial-specialization | - Enable partial specialization of generics | help |
--sil-partial-specialization-with-generic-substitutions | - Enable partial specialization with generic substitutions | help |
--sil-print-after string | - Print out the sil after passes which contain a string from this list. | help |
--sil-print-all | - Print SIL after each pass | help |
--sil-print-around string | - Print out the sil before and after passes which contain a string from this list | help |
--sil-print-before string | - Print out the sil before passes which contain a string from this list. | help |
--sil-print-canonical-module | - Print the textual SIL module after diagnostics | help |
--sil-print-debuginfo | - Include debug info in SIL output | help |
--sil-print-final-ossa-module | - Print the textual SIL module before lowering from OSSA | help |
--sil-print-function string | - Only print out the sil for this function | help |
--sil-print-functions string | - Only print out the sil for the functions whose name contains this substring | help |
--sil-print-generic-specialization-info | - Include generic specializationinformation info in SIL output | help |
--sil-print-generic-specialization-loops | - Print detected infinite generic specialization loops that were prevented | help |
--sil-print-inlining-callee | - Print functions that are inlined into other functions. | help |
--sil-print-inlining-caller-after | - Print functions into which another function has been inlined. | help |
--sil-print-inlining-caller-before | - Print functions into which another function is about to be inlined. | help |
--sil-print-last | - Print the last optimized function before and after the last pass | help |
--sil-print-module-on-error | - Printing SIL module in crash diagnostics. | help |
--sil-print-no-color | - Don't use color when printing SIL | help |
--sil-print-on-error | - Printing SIL function bodies in crash diagnostics. | help |
--sil-print-pass-name | - Print the name of each SIL pass before it runs | help |
--sil-print-pass-time | - Print the execution time of each SIL pass | help |
--sil-print-sourceinfo | - Include source annotation in SIL output | help |
--sil-reference-binding-diagnostics-silently-emit-diagnostics | - For testing purposes, emit the diagnostic silently so we can filecheck the result of emitting an error from the move checkers | help |
--sil-semantic-arc-peepholes-all | - Perform All ARC canonicalizations and peepholes | help |
--sil-semantic-arc-peepholes-loadcopy-to-loadborrow | - Perform the load [copy] to load_borrow peephole | help |
--sil-semantic-arc-peepholes-redundant-borrowscope-elim | - Perform the redundant borrow scope elimination peephole | help |
--sil-semantic-arc-peepholes-redundant-copyvalue-elim | - Perform the redundant copy_value peephole | help |
--sil-semantic-arc-peepholes-lifetime-joining | - Perform the join lifetimes peephole | help |
--sil-semantic-arc-peepholes-ownership-conversion-elim | - Eliminate unchecked_ownership_conversion insts that are not needed | help |
--sil-semantic-arc-owned-to-guaranteed-phi | - Perform Owned To Guaranteed Phi. | help |
--sil-semantic-arc-redundant-move-value-elim | - Eliminate move_value which don't change owned lifetime characteristics. | help |
--sil-stats-block-count-delta-threshold number | - Threshold for reporting changed basic block count numbers | help |
--sil-stats-dump-all | - Dump all SIL module and SIL function stats | help |
--sil-stats-func-block-count-delta-threshold number | - Threshold for reporting changed basic block count numbers for a function | help |
--sil-stats-func-block-count-min-threshold int | - Min threshold for reporting changed basic block count numbers for a function | help |
--sil-stats-func-inst-count-delta-threshold number | - Threshold for reporting changed instruction count numbers for a function | help |
--sil-stats-func-inst-count-min-threshold int | - Min threshold for reporting changed instruction count numbers for a function | help |
--sil-stats-function-count-delta-threshold number | - Threshold for reporting changed function count numbers | help |
--sil-stats-functions | - Enable computation of statistics for SIL functions | help |
--sil-stats-inst-count-delta-threshold number | - Threshold for reporting changed instruction count numbers | help |
--sil-stats-modules | - Enable computation of statistics for SIL modules | help |
--sil-stats-only-function string | - Function name, whose stats should be tracked | help |
--sil-stats-only-functions string | - Pattern of a function name, whose stats should be tracked | help |
--sil-stats-output-file string | - The name of the output file for optimizer counters | help |
--sil-stats-used-memory-delta-threshold number | - Threshold for reporting changed memory usage numbers | help |
--sil-stats-used-memory-min-threshold number | - Min threshold for reporting changed memory usage numbers | help |
--sil-verify-after-pass string | - Verify the module/analyses after we run a pass from this list | help |
--sil-verify-around-pass string | - Verify the module/analyses before/after we run a pass from this list | help |
--sil-verify-before-pass string | - Verify the module/analyses before we run a pass from this list | help |
--sil-verify-force-analysis | - For all passes, precompute analyses before the pass and verify analyses after the pass | help |
--sil-verify-force-analysis-around-pass string | - For the given passes, precompute analyses before the pass and verify analyses after the pass | help |
--sil-verify-without-invalidation | - Verify after passes even if the pass has not invalidated | help |
--sil-view-canonical-cfg | - Enable the sil cfg viewer pass after diagnostics | help |
--sil-view-cfg | - Enable the sil cfg viewer pass | help |
--sil-view-cfg-only-function string | - Only produce a graphviz file for this function | help |
--sil-view-cfg-only-functions string | - Only produce a graphviz file for the sil for the functions whose name contains this substring | help |
--sil-view-silgen-cfg | - Enable the sil cfg viewer pass before diagnostics | help |
--simplify-cfg-simplify-unconditional-branches | - | help |
--simplify-instruction string | - Simplify instruction of specified kind(s) | help |
--skip-ret-exit-block | - Suppress counter promotion if exit blocks contain ret. | help |
--source-filename string | - Name of the source file | help |
--speculative-counter-promotion-max-exiting uint | - The max number of exiting blocks of a loop to allow speculative counter promotion | help |
--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. | help |
--sroa-args-remove-dead-args-after | - | help |
--summary-file string | - The summary file to use for function importing. | help |
--swift-diagnostics-assert-on-error | - | help |
--swift-diagnostics-assert-on-warning | - | help |
--target string | - target triple | help |
--thinlto-assume-merged | - Assume the input has already undergone ThinLTO function importing and the other pre-optimization pipeline changes. | help |
--type-based-intrinsic-cost | - Calculate intrinsics cost based only on argument types | help |
--type-lowering-force-opaque-value-lowering | - Force TypeLowering to behave as if building with opaque values enabled | help |
--verify-abort-on-failure | - | help |
--verify-arc-loop-summary | - Verify if loop summary is correct in ARCLoopsOpts | help |
--verify-continue-on-failure | - | help |
--verify-di-holes | - | help |
--verify-dump-module-on-failure | - | help |
--verify-legalizer-debug-locs value | - Verify that debug locations are handled =none - No verification =legalizations - Verify legalizations =legalizations+artifactcombiners - Verify legalizations and artifact combines | help |
--verify-linetable | - Verify that the debug locations within one scope are contiguous. | help |
--verify-region-info | - Verify region info (time consuming) | help |
--verify-skip-convert-escape-to-noescape-attributes | - | help |
--view-cfg-long-line-behavior value | - Behavior when line width is greater than the value provided my -view-cfg-max-columns option =none - Print everything =truncate - Truncate long lines =wrap - Wrap long lines | help |
--view-cfg-max-columns uint | - Maximum width of a printed node | help |
--view-cfg-only-for-function string | - Only print out the cfg for this function | help |
--view-cfg-remove-use-list-comments | - Should use list comments be removed | help |
--view-loop-regions-long-line-behavior value | - Behavior when line width is greater than the value provided my -view-loop-regions-max-columns option =none - Print everything =truncate - Truncate long lines =wrap - Wrap long lines | help |
--view-loop-regions-max-columns uint | - Maximum width of a printed node | help |
--view-loop-regions-only-for-function string | - Only print out the loop regions for this function | help |
--view-loop-regions-remove-use-list-comments | - Should use list comments be removed | help |
--vp-counters-per-site number | - The average number of profile counters allocated per value profiling site. | help |
--vp-static-alloc | - Do static counter allocation for value profiler | help |
--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… | help |
--x86-align-branch-boundary uint | - Control how the assembler should align branches with NOP. | help |
--x86-branches-within-32B-boundaries | - Align selected instructions to mitigate negative performance impact of Intel's micro code update for errata skx102. | help |
--x86-pad-max-prefix-size uint | - Maximum number of prefixes to use for padding | help |
--help | - Display available options (--help-hidden for more) | help |
--help-list | - Display list of available options (--help-list-hidden for more) | help |
--version | - Display the version of this program | help |