Class: LLVM::PassBuilder

Inherits:
Object
  • Object
show all
Extended by:
FFI::Library
Defined in:
lib/llvm/pass_builder.rb

Overview

rubocop:disable Metrics/ClassLength

Constant Summary collapse

OPT_PASSES =

rubocop:disable Layout/LineLength

{
  # :nocov:
  '0' => 'function(ee-instrument<>),always-inline,coro-cond(coro-early,cgscc(coro-split),coro-cleanup,globaldce),function(annotation-remarks),verify',
  '1' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,lower-expect,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,libcalls-shrinkwrap,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<no-nontrivial;trivial>),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,memcpyopt,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,coro-elide,adce,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),function-attrs,function(require<should-not-run-function-passes>),coro-split)),deadargelim,coro-cleanup,globalopt,globaldce,elim-avail-extern,rpo-function-attrs,recompute-globalsaa,function<eager-inv>(float2int,lower-constant-intrinsics,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O1>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
  '2' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,lower-expect,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,libcalls-shrinkwrap,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<no-nontrivial;trivial>),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),function-attrs,function(require<should-not-run-function-passes>),coro-split)),deadargelim,coro-cleanup,globalopt,globaldce,elim-avail-extern,rpo-function-attrs,recompute-globalsaa,function<eager-inv>(float2int,lower-constant-intrinsics,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
  '3' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,lower-expect,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>,callsite-splitting),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,argpromotion,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,libcalls-shrinkwrap,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<nontrivial;trivial>),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),function-attrs,function(require<should-not-run-function-passes>),coro-split)),deadargelim,coro-cleanup,globalopt,globaldce,elim-avail-extern,rpo-function-attrs,recompute-globalsaa,function<eager-inv>(float2int,lower-constant-intrinsics,chr,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
  's' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,lower-expect,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<no-nontrivial;trivial>),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),function-attrs,function(require<should-not-run-function-passes>),coro-split)),deadargelim,coro-cleanup,globalopt,globaldce,elim-avail-extern,rpo-function-attrs,recompute-globalsaa,function<eager-inv>(float2int,lower-constant-intrinsics,loop(loop-rotate<header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;no-vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
  'z' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,lower-expect,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;no-switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,jump-threading,correlated-propagation,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,reassociate,constraint-elimination,loop-mssa(loop-instsimplify,loop-simplifycfg,licm<no-allowspeculation>,loop-rotate<no-header-duplication;no-prepare-for-lto>,licm<allowspeculation>,simple-loop-unswitch<no-nontrivial;trivial>),simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,jump-threading,correlated-propagation,adce,memcpyopt,dse,move-auto-init,loop-mssa(licm<allowspeculation>),coro-elide,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),function-attrs,function(require<should-not-run-function-passes>),coro-split)),deadargelim,coro-cleanup,globalopt,globaldce,elim-avail-extern,rpo-function-attrs,recompute-globalsaa,function<eager-inv>(float2int,lower-constant-intrinsics,loop(loop-rotate<no-header-duplication;no-prepare-for-lto>,loop-deletion),loop-distribute,inject-tli-mappings,loop-vectorize<no-interleave-forced-only;vectorize-forced-only;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,simplifycfg<bonus-inst-threshold=1;forward-switch-cond;switch-range-to-icmp;switch-to-lookup;no-keep-loops;hoist-common-insts;sink-common-insts;speculate-blocks;simplify-cond-branch;no-speculate-unpredictables>,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-mssa(licm<allowspeculation>),alignment-from-assumptions,loop-sink,instsimplify,div-rem-pairs,tailcallelim,simplifycfg<bonus-inst-threshold=1;no-forward-switch-cond;switch-range-to-icmp;no-switch-to-lookup;keep-loops;no-hoist-common-insts;no-sink-common-insts;speculate-blocks;simplify-cond-branch;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
  # :nocov:
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePassBuilder

rubocop:enable Layout/LineLength


23
24
25
26
27
# File 'lib/llvm/pass_builder.rb', line 23

def initialize
  @passes = []
  @inliner_threshold = nil
  @merge_functions = nil
end

Instance Attribute Details

#inliner_thresholdObject

Returns the value of attribute inliner_threshold.


8
9
10
# File 'lib/llvm/pass_builder.rb', line 8

def inliner_threshold
  @inliner_threshold
end

#merge_functionsObject

Returns the value of attribute merge_functions.


8
9
10
# File 'lib/llvm/pass_builder.rb', line 8

def merge_functions
  @merge_functions
end

#passesObject

Returns the value of attribute passes.


7
8
9
# File 'lib/llvm/pass_builder.rb', line 7

def passes
  @passes
end

Instance Method Details

#adce!Object

Aggressive Dead Code Elimination

Returns:

  • self


463
464
465
# File 'lib/llvm/pass_builder.rb', line 463

def adce!
  add_pass('adce')
end

#add_discriminators!Object

Returns self.

Returns:

  • self


349
350
351
# File 'lib/llvm/pass_builder.rb', line 349

def add_discriminators!
  add_pass('add-discriminators')
end

#add_function_passObject


29
30
31
32
33
34
35
36
# File 'lib/llvm/pass_builder.rb', line 29

def add_function_pass
  pb = PassBuilder.new
  if block_given?
    yield pb
  end

  add_pass("function(#{pb.pass_string})")
end

#add_pass(pass) ⇒ Object

Returns self.

Returns:

  • self


63
64
65
66
# File 'lib/llvm/pass_builder.rb', line 63

def add_pass(pass)
  passes << pass
  self
end

#alignment_from_assumptions!Object

Returns self.

Returns:

  • self


142
143
144
# File 'lib/llvm/pass_builder.rb', line 142

def alignment_from_assumptions!
  add_pass('alignment-from-assumptions')
end

#always_inline!Object

Returns:

  • self


406
407
408
# File 'lib/llvm/pass_builder.rb', line 406

def always_inline!
  add_pass('always-inline')
end

#argpromotion!Object Also known as: arg_promote!

Returns self.

Returns:

  • self


547
548
549
# File 'lib/llvm/pass_builder.rb', line 547

def argpromotion!
  add_pass('argpromotion')
end

#asan!(options = {}) ⇒ Object

Returns:

  • self


591
592
593
594
# File 'lib/llvm/pass_builder.rb', line 591

def asan!(options = {})
  opt_str = options[:kernel] ? '<kernel>' : ''
  add_pass("asan#{opt_str}")
end

#atomic_expand!Object


700
701
702
# File 'lib/llvm/pass_builder.rb', line 700

def atomic_expand!
  add_pass('atomic-expand')
end

#basic_aa!Object Also known as: basicaa!

Returns self.

Returns:

  • self


364
365
366
# File 'lib/llvm/pass_builder.rb', line 364

def basic_aa!
  add_pass('require<basic-aa>')
end

#bb_vectorize!Object


675
676
677
678
# File 'lib/llvm/pass_builder.rb', line 675

def bb_vectorize!
  warn('bb_vectorize! / LLVMAddBBVectorizePass was removed from LLVM - replace with slp_vectorize!')
  slp_vectorize!
end

#bdce!Object

Bit-Tracking Dead Code Elimination pass

Returns:

  • self


534
535
536
# File 'lib/llvm/pass_builder.rb', line 534

def bdce!
  add_pass('bdce')
end

#called_value_propagation!Object

Propagate called values This file implements a transformation that attaches !callees metadata to indirect call sites. For a given call site, the metadata, if present, indicates the set of functions the call site could possibly target at run-time. This metadata is added to indirect call sites when the set of possible targets can be determined by analysis and is known to be small. The analysis driving the transformation is similar to constant propagation and makes uses of the generic sparse propagation solver. llvm.org/doxygen/CalledValuePropagation_8h_source.html

Returns:

  • self


440
441
442
# File 'lib/llvm/pass_builder.rb', line 440

def called_value_propagation!
  add_pass('called-value-propagation')
end

#constmerge!Object Also known as: const_merge!

ConstantMerge is designed to build up a map of available constants and eliminate duplicates when it is initialized. llvm.org/doxygen/ConstantMerge_8cpp_source.html llvm.org/doxygen/ConstantMerge_8h_source.html

Returns:

  • self


455
456
457
# File 'lib/llvm/pass_builder.rb', line 455

def constmerge!
  add_pass('constmerge')
end

#constprop!Object


680
681
682
# File 'lib/llvm/pass_builder.rb', line 680

def constprop!
  warn('constprop! / LLVMAddConstantPropagationPass was removed from LLVM')
end

#correlated_propagation!Object

Returns self.

Returns:

  • self


329
330
331
# File 'lib/llvm/pass_builder.rb', line 329

def correlated_propagation!
  add_pass('correlated-propagation')
end

#cvprop!Object

Returns self.

Returns:

  • self


324
325
326
# File 'lib/llvm/pass_builder.rb', line 324

def cvprop!
  correlated_propagation!
end

#dce!Object

Returns self.

Returns:

  • self


69
70
71
# File 'lib/llvm/pass_builder.rb', line 69

def dce!
  add_pass('dce')
end

#deadargelim!Object Also known as: dae!

Returns self.

Returns:

  • self


445
446
447
# File 'lib/llvm/pass_builder.rb', line 445

def deadargelim!
  add_pass('deadargelim')
end

#dfsan!Object

Returns:

  • self


611
612
613
# File 'lib/llvm/pass_builder.rb', line 611

def dfsan!
  add_pass('dfsan')
end

#dse!Object

Dead Store Elimination his file implements a trivial dead store elimination that only considers basic-block local redundant stores. llvm.org/doxygen/DeadStoreElimination_8h_source.html

Returns:

  • self


542
543
544
# File 'lib/llvm/pass_builder.rb', line 542

def dse!
  add_pass('dse')
end

#early_cse!Object

A simple and fast domtree-based CSE pass.

This pass does a simple depth-first walk over the dominator tree, eliminating trivially redundant instructions and using instsimplify to canonicalize things as it goes. It is intended to be fast and catch obvious cases so that instcombine and other passes are more effective. It is expected that a later pass of GVN will catch the interesting/hard cases. llvm.org/doxygen/EarlyCSE_8h_source.html llvm.org/doxygen/EarlyCSE_8cpp.html

Returns:

  • self


288
289
290
# File 'lib/llvm/pass_builder.rb', line 288

def early_cse!
  add_pass('early-cse')
end

#early_cse_memssa!Object

Returns:

  • self


296
297
298
# File 'lib/llvm/pass_builder.rb', line 296

def early_cse_memssa!
  add_pass('early-cse<memssa>')
end

#expand_variadics!Object


684
685
686
# File 'lib/llvm/pass_builder.rb', line 684

def expand_variadics!
  add_pass('expand-variadics')
end

#function_attrs!Object Also known as: fun_attrs!

Returns self.

Returns:

  • self


468
469
470
# File 'lib/llvm/pass_builder.rb', line 468

def function_attrs!
  add_pass('function-attrs')
end

#global_opt!Object

Returns self.

Returns:

  • self


519
520
521
# File 'lib/llvm/pass_builder.rb', line 519

def global_opt!
  add_pass('globalopt')
end

#globaldce!Object Also known as: gdce!

Global Dead Code Elimination TODO: takes params

Returns:

  • self


526
527
528
# File 'lib/llvm/pass_builder.rb', line 526

def globaldce!
  add_pass('globaldce')
end

#gobals_aa!Object

Returns self.

Returns:

  • self


391
392
393
# File 'lib/llvm/pass_builder.rb', line 391

def gobals_aa!
  add_pass('require<globals-aa>')
end

#gvn!Object

Global Value Numbering pass llvm.org/doxygen/GVN_8h_source.html TODO: takes params

Returns:

  • self


106
107
108
# File 'lib/llvm/pass_builder.rb', line 106

def gvn!
  add_pass('gvn')
end

#gvn_hoist!Object

hoists expressions from branches to a common dominator. llvm.org/doxygen/GVNHoist_8cpp_source.html

Returns:

  • self


120
121
122
# File 'lib/llvm/pass_builder.rb', line 120

def gvn_hoist!
  add_pass('gvn-hoist')
end

#gvn_sink!Object

sink instructions into successors llvm.org/doxygen/GVNSink_8cpp_source.html

Returns:

  • self


127
128
129
# File 'lib/llvm/pass_builder.rb', line 127

def gvn_sink!
  add_pass('gvn-sink')
end

#hwasan!(_options = {}) ⇒ Object

Returns:

  • self


581
582
583
# File 'lib/llvm/pass_builder.rb', line 581

def hwasan!(_options = {})
  add_pass('hwasan')
end

#indvars!Object

Returns self.

Returns:

  • self


137
138
139
# File 'lib/llvm/pass_builder.rb', line 137

def indvars!
  add_pass('indvars')
end

#inline!Object

Returns:

  • self


558
559
560
# File 'lib/llvm/pass_builder.rb', line 558

def inline!
  add_pass('inline')
end

#instcombine!Object

Combine instructions to form fewer, simple instructions. This pass does not modify the CFG. This pass is where algebraic simplification happens. llvm.org/doxygen/InstructionCombining_8cpp_source.html llvm.org/doxygen/InstCombineInternal_8h_source.html

Returns:

  • self


208
209
210
# File 'lib/llvm/pass_builder.rb', line 208

def instcombine!
  add_pass('instcombine')
end

#instsimplify!Object

Returns self.

Returns:

  • self


213
214
215
# File 'lib/llvm/pass_builder.rb', line 213

def instsimplify!
  add_pass('instsimplify')
end

#internalize!(preserve_gv = []) ⇒ Object

preserve_gv - true / false to support previous option of all_but_main otherwise preserve_gv is assumed to be an array of global variable names internalize<preserve-gv=GV> tests showing usage: github.com/llvm/llvm-project/blob/a4b429f9e4175a06cc95f054c5dab3d4bc8fa690/llvm/test/Transforms/Internalize/lists.ll#L17

Returns:

  • self


491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
# File 'lib/llvm/pass_builder.rb', line 491

def internalize!(preserve_gv = [])
  preserved = case preserve_gv
  when true
    ['main']
  when false
    []
  else
    preserve_gv
  end
  preserved_string = preserved.map { |gv| "preserve-gv=#{gv}" }.join(';')

  if preserved_string.empty?
    add_pass('internalize')
  else
    add_pass("internalize<#{preserved_string}>")
  end
end

#ipcp!Object


645
646
647
# File 'lib/llvm/pass_builder.rb', line 645

def ipcp!
  deprecated('ipcp! / LLVMAddIPConstantPropagationPass was removed from LLVM')
end

#ipsccp!Object

TODO:

accept parameters ipsccp<no-func-spec;func-spec>

This pass implements interprocedural sparse conditional constant propagation and merging. llvm.org/doxygen/IPO_2SCCP_8h_source.html llvm.org/doxygen/IPO_2SCCP_8cpp_source.html

Returns:

  • self


514
515
516
# File 'lib/llvm/pass_builder.rb', line 514

def ipsccp!
  add_pass('ipsccp')
end

#jump_table_to_switch!Object


704
705
706
# File 'lib/llvm/pass_builder.rb', line 704

def jump_table_to_switch!
  add_pass('jump-table-to-switch')
end

#jump_threading!Object

Returns self.

Returns:

  • self


132
133
134
# File 'lib/llvm/pass_builder.rb', line 132

def jump_threading!
  add_pass('jump-threading')
end

#lcssa!Object

Returns self.

Returns:

  • self


301
302
303
# File 'lib/llvm/pass_builder.rb', line 301

def lcssa!
  add_pass('lcssa')
end

#licm!Object

Returns self.

Returns:

  • self


74
75
76
# File 'lib/llvm/pass_builder.rb', line 74

def licm!
  add_pass('licm')
end

#loop_deletion!Object

Returns self.

Returns:

  • self


147
148
149
# File 'lib/llvm/pass_builder.rb', line 147

def loop_deletion!
  add_pass('loop-deletion')
end

#loop_idiom!Object

Returns self.

Returns:

  • self


152
153
154
# File 'lib/llvm/pass_builder.rb', line 152

def loop_idiom!
  add_pass('loop-idiom')
end

#loop_idiom_vectorize!Object


738
739
740
# File 'lib/llvm/pass_builder.rb', line 738

def loop_idiom_vectorize!
  add_pass('loop-idiom-vectorize')
end

#loop_reroll!Object

Returns self.

Returns:

  • self


162
163
164
# File 'lib/llvm/pass_builder.rb', line 162

def loop_reroll!
  deprecated('loop-reroll pass was removed in LLVM 19')
end

#loop_rotate!Object

Returns self.

Returns:

  • self


157
158
159
# File 'lib/llvm/pass_builder.rb', line 157

def loop_rotate!
  add_pass('loop-rotate')
end

#loop_unroll!Object

Returns self.

Returns:

  • self


167
168
169
# File 'lib/llvm/pass_builder.rb', line 167

def loop_unroll!
  add_pass('loop-unroll')
end

#loop_unroll_and_jam!Object

Returns self.

Returns:

  • self


172
173
174
# File 'lib/llvm/pass_builder.rb', line 172

def loop_unroll_and_jam!
  add_pass('loop-unroll-and-jam')
end

#loop_unswitch!Object

Returns self.

Returns:

  • self


182
183
184
# File 'lib/llvm/pass_builder.rb', line 182

def loop_unswitch!
  simple_loop_unswitch!
end

#loop_vectorize!Object

TODO: takes params

Returns:

  • self


188
189
190
# File 'lib/llvm/pass_builder.rb', line 188

def loop_vectorize!
  add_pass('loop-vectorize')
end

#lower_allow_check!Object


708
709
710
# File 'lib/llvm/pass_builder.rb', line 708

def lower_allow_check!
  add_pass('lower-allow-check')
end

#lower_atomic!Object Also known as: loweratomic!

Returns self.

Returns:

  • self


218
219
220
# File 'lib/llvm/pass_builder.rb', line 218

def lower_atomic!
  add_pass('lower-atomic')
end

#lower_constant_intrinsics!Object

Returns self.

Returns:

  • self


334
335
336
# File 'lib/llvm/pass_builder.rb', line 334

def lower_constant_intrinsics!
  add_pass('lower-constant-intrinsics')
end

#lower_expect!Object

Returns self.

Returns:

  • self


319
320
321
# File 'lib/llvm/pass_builder.rb', line 319

def lower_expect!
  add_pass('lower-expect')
end

#lower_guard_intrinsic!Object


718
719
720
# File 'lib/llvm/pass_builder.rb', line 718

def lower_guard_intrinsic!
  add_pass('lower-guard-intrinsic')
end

#lower_invoke!Object Also known as: lowerinvoke!


712
713
714
# File 'lib/llvm/pass_builder.rb', line 712

def lower_invoke!
  add_pass('lower-invoke')
end

#lower_switch!Object Also known as: lowerswitch!

Returns self.

Returns:

  • self


396
397
398
# File 'lib/llvm/pass_builder.rb', line 396

def lower_switch!
  add_pass('lower-switch')
end

#lower_widenable_condition!Object


722
723
724
# File 'lib/llvm/pass_builder.rb', line 722

def lower_widenable_condition!
  add_pass('lower-widenable-condition')
end

#mem2reg!Object

Returns self.

Returns:

  • self


244
245
246
# File 'lib/llvm/pass_builder.rb', line 244

def mem2reg!
  add_pass('mem2reg')
end

#memcpyopt!Object

Returns self.

Returns:

  • self


193
194
195
# File 'lib/llvm/pass_builder.rb', line 193

def memcpyopt!
  add_pass('memcpyopt')
end

#memoryssa!Object

Returns self.

Returns:

  • self


306
307
308
# File 'lib/llvm/pass_builder.rb', line 306

def memoryssa!
  add_pass('require<memoryssa>')
end

#mergefunc!Object

Returns:

  • self


426
427
428
# File 'lib/llvm/pass_builder.rb', line 426

def mergefunc!
  add_pass('mergefunc')
end

#mergeicmps!Object

Returns self.

Returns:

  • self


359
360
361
# File 'lib/llvm/pass_builder.rb', line 359

def mergeicmps!
  add_pass('mergeicmps')
end

#mergereturn!Object

Returns self.

Returns:

  • self


354
355
356
# File 'lib/llvm/pass_builder.rb', line 354

def mergereturn!
  add_pass('mergereturn')
end

#mldst_motion!Object

Merged Load Store Motion

Returns:

  • self


98
99
100
# File 'lib/llvm/pass_builder.rb', line 98

def mldst_motion!
  add_pass('mldst-motion')
end

#module_summary!Object

Returns self.

Returns:

  • self


254
255
256
# File 'lib/llvm/pass_builder.rb', line 254

def module_summary!
  add_pass('require<module-summary>')
end

#msan!(options = {}) ⇒ Object

Memory Sanitizer TODO: takes params llvm.org/doxygen/MemorySanitizer_8cpp.html llvm.org/doxygen/MemorySanitizer_8h_source.html clang.llvm.org/docs/MemorySanitizer.html KernelMemorySanitizer only supports X86_64 and SystemZ at the moment.

Returns:

  • self


603
604
605
606
# File 'lib/llvm/pass_builder.rb', line 603

def msan!(options = {})
  opt_str = options[:kernel] ? '<kernel>' : ''
  add_pass("msan#{opt_str}")
end

#newgvn!Object

New Global Value Numbering pass llvm.org/doxygen/NewGVN_8cpp.html#details

Returns:

  • self


113
114
115
# File 'lib/llvm/pass_builder.rb', line 113

def newgvn!
  add_pass('newgvn')
end

#no_op_cgscc!Object

Returns self.

Returns:

  • self


264
265
266
# File 'lib/llvm/pass_builder.rb', line 264

def no_op_cgscc!
  add_pass('no-op-cgscc')
end

#no_op_function!Object

Returns self.

Returns:

  • self


269
270
271
# File 'lib/llvm/pass_builder.rb', line 269

def no_op_function!
  add_pass('no-op-function')
end

#no_op_module!Object

Returns self.

Returns:

  • self


259
260
261
# File 'lib/llvm/pass_builder.rb', line 259

def no_op_module!
  add_pass('no-op-module')
end

#nsan!Object


692
693
694
# File 'lib/llvm/pass_builder.rb', line 692

def nsan!
  add_pass('nsan')
end

#o!(opt_level = '0', options = {}) ⇒ Object

–O0 - Optimization level 0. Similar to clang -O0. Use -passes=‘default<O0>’ for the new PM –O1 - Optimization level 1. Similar to clang -O1. Use -passes=‘default<O1>’ for the new PM –O2 - Optimization level 2. Similar to clang -O2. Use -passes=‘default<O2>’ for the new PM –O3 - Optimization level 3. Similar to clang -O3. Use -passes=‘default<O3>’ for the new PM –Os - Like -O2 but size-conscious. Similar to clang -Os. Use -passes=‘default<Os>’ for the new PM –Oz - Like -O2 but optimize for code size above all else. Similar to clang -Oz. Use -passes=‘default<Oz>’ for the new PM

Returns:

  • self


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/llvm/pass_builder.rb', line 45

def o!(opt_level = '0', options = {})
  opt_level = opt_level.to_s
  expanded_pass = OPT_PASSES[opt_level]

  if expanded_pass.nil?
    return add_pass("default<O#{opt_level}>")
  end

  if options[:disable_inline]
    expanded_pass = expanded_pass.gsub('devirt<4>(inline,', 'devirt<4>(')
  end
  if options[:disable_always_inline]
    expanded_pass = expanded_pass.gsub('always-inline,', '')
  end
  add_pass(expanded_pass)
end

#objc_arc_aa!Object

Returns self.

Returns:

  • self


371
372
373
# File 'lib/llvm/pass_builder.rb', line 371

def objc_arc_aa!
  add_pass('require<objc-arc-aa>')
end

#partial_inliner!Object

This pass performs partial inlining, typically by inlining an if statement that surrounds the body of the function. llvm.org/doxygen/PartialInlining_8h_source.html llvm.org/doxygen/PartialInlining_8cpp_source.html llvm.org/doxygen/PartialInlining_8h.html llvm.org/doxygen/PartialInlining_8cpp.html

Returns:

  • self


417
418
419
# File 'lib/llvm/pass_builder.rb', line 417

def partial_inliner!
  add_pass('partial-inliner')
end

#partially_inline_libcalls!Object

Returns self.

Returns:

  • self


224
225
226
# File 'lib/llvm/pass_builder.rb', line 224

def partially_inline_libcalls!
  add_pass('partially-inline-libcalls')
end

#pass_stringObject


641
642
643
# File 'lib/llvm/pass_builder.rb', line 641

def pass_string
  passes.join(',')
end

#pgo_force_function_attrs!Object


688
689
690
# File 'lib/llvm/pass_builder.rb', line 688

def pgo_force_function_attrs!
  add_pass('pgo-force-function-attrs')
end

#pre_isel_intrinsic_lowering!Object


696
697
698
# File 'lib/llvm/pass_builder.rb', line 696

def pre_isel_intrinsic_lowering!
  add_pass('pre-isel-intrinsic-lowering')
end

#prune_eh!Object


649
650
651
# File 'lib/llvm/pass_builder.rb', line 649

def prune_eh!
  deprecated('prune_eh! / LLVMAddPruneEHPass was removed in LLVM 16')
end

#reassociate!Object

Returns self.

Returns:

  • self


229
230
231
# File 'lib/llvm/pass_builder.rb', line 229

def reassociate!
  add_pass('reassociate')
end

#reg2mem!Object

Returns self.

Returns:

  • self


239
240
241
# File 'lib/llvm/pass_builder.rb', line 239

def reg2mem!
  add_pass('reg2mem')
end

#run(mod, target) ⇒ Object


627
628
629
630
631
632
633
634
635
636
637
638
639
# File 'lib/llvm/pass_builder.rb', line 627

def run(mod, target)
  return self if passes.empty?

  error = with_options { |options| C.run_passes(mod, pass_string, target, options) }
  if !error.null?
    error_msg = C.get_error_message(error)
    # TODO: clone then dispose of error_msg, currently produces "munmap_chunk(): invalid pointer"
    # save_message = error_msg.clone
    # C.dispose_error_message(error_msg)
    raise ArgumentError, error_msg
  end
  self
end

#sancov_module!Object

Returns:

  • self


617
618
619
# File 'lib/llvm/pass_builder.rb', line 617

def sancov_module!
  add_pass('sancov-module')
end

#sanmd_module!Object

Returns:

  • self


623
624
625
# File 'lib/llvm/pass_builder.rb', line 623

def sanmd_module!
  add_pass('sanmd-module')
end

#scalarizer!Object

Returns self.

Returns:

  • self


92
93
94
# File 'lib/llvm/pass_builder.rb', line 92

def scalarizer!
  add_pass('scalarizer')
end

#scalarrepl!Object


658
659
660
661
# File 'lib/llvm/pass_builder.rb', line 658

def scalarrepl!
  deprecated('scalarrepl was removed from LLVM in 2016 - use sroa')
  sroa!
end

#scalarrepl_ssa!Object


664
665
666
667
# File 'lib/llvm/pass_builder.rb', line 664

def scalarrepl_ssa!
  deprecated('scalarrepl_ssa was removed from LLVM in 2016 - use sroa')
  sroa!
end

#scalarrepl_threshold!(_threshold = 0) ⇒ Object


670
671
672
673
# File 'lib/llvm/pass_builder.rb', line 670

def scalarrepl_threshold!(_threshold = 0)
  deprecated('scalarrepl_threshold was removed from LLVM in 2016 - use sroa')
  sroa!
end

#sccp!Object

Returns self.

Returns:

  • self


198
199
200
# File 'lib/llvm/pass_builder.rb', line 198

def sccp!
  add_pass('sccp')
end

#scev_aa!Object

Returns self.

Returns:

  • self


376
377
378
# File 'lib/llvm/pass_builder.rb', line 376

def scev_aa!
  add_pass('require<scev-aa>')
end

#scoped_noalias_aa!Object

Returns self.

Returns:

  • self


381
382
383
# File 'lib/llvm/pass_builder.rb', line 381

def scoped_noalias_aa!
  add_pass('require<scoped-noalias-aa>')
end

#simple_loop_unswitch!Object

Returns self.

Returns:

  • self


177
178
179
# File 'lib/llvm/pass_builder.rb', line 177

def simple_loop_unswitch!
  add_pass('simple-loop-unswitch')
end

#simplify_libcalls!Object


653
654
655
# File 'lib/llvm/pass_builder.rb', line 653

def simplify_libcalls!
  deprecated('simplify_libcalls! / LLVMAddSimplifyLibCallsPass was removed from LLVM')
end

#simplifycfg!Object

A pass to simplify and canonicalize the CFG of a function. This pass iteratively simplifies the entire CFG of a function. It may change or remove control flow to put the CFG into a canonical form expected by other passes of the mid-level optimizer. Depending on the specified options, it may further optimize control-flow to create non-canonical form llvm.org/doxygen/SimplifyCFG_8h_source.html TODO: takes params Options: simplifycfg<no-forward-switch-cond;forward-switch-cond;no-switch-range-to-icmp;switch-range-to-icmp;no-switch-to-lookup;switch-to-lookup;no-keep-loops;keep-loops;no-hoist-common-insts;hoist-common-insts;no-sink-common-insts;sink-common-insts;bonus-inst-threshold=N>

Returns:

  • self


87
88
89
# File 'lib/llvm/pass_builder.rb', line 87

def simplifycfg!
  add_pass('simplifycfg')
end

#slp_vectorize!Object

Returns self.

Returns:

  • self


339
340
341
# File 'lib/llvm/pass_builder.rb', line 339

def slp_vectorize!
  slp_vectorizer!
end

#slp_vectorizer!Object

Returns self.

Returns:

  • self


344
345
346
# File 'lib/llvm/pass_builder.rb', line 344

def slp_vectorizer!
  add_pass('slp-vectorizer')
end

#sroa!Object

Returns:

  • self


314
315
316
# File 'lib/llvm/pass_builder.rb', line 314

def sroa!
  add_pass('sroa')
end

#stack_safety!Object

Returns self.

Returns:

  • self


274
275
276
# File 'lib/llvm/pass_builder.rb', line 274

def stack_safety!
  add_pass('require<stack-safety>')
end

#strip!Object

Returns self.

Returns:

  • self


475
476
477
# File 'lib/llvm/pass_builder.rb', line 475

def strip!
  add_pass('strip')
end

#strip_dead_prototypes!Object Also known as: sdp!

Returns self.

Returns:

  • self


480
481
482
# File 'lib/llvm/pass_builder.rb', line 480

def strip_dead_prototypes!
  add_pass('strip-dead-prototypes')
end

#tailcallelim!Object

Returns self.

Returns:

  • self


234
235
236
# File 'lib/llvm/pass_builder.rb', line 234

def tailcallelim!
  add_pass('tailcallelim')
end

#tbaa!Object

Returns self.

Returns:

  • self


386
387
388
# File 'lib/llvm/pass_builder.rb', line 386

def tbaa!
  add_pass('require<tbaa>')
end

#transform_warning!Object


726
727
728
# File 'lib/llvm/pass_builder.rb', line 726

def transform_warning!
  add_pass('transform-warning')
end

#trigger_crash_function!Object


730
731
732
# File 'lib/llvm/pass_builder.rb', line 730

def trigger_crash_function!
  add_pass('trigger-crash-function')
end

#trigger_verifier_error!Object


734
735
736
# File 'lib/llvm/pass_builder.rb', line 734

def trigger_verifier_error!
  add_pass('trigger-verifier-error')
end

#tsan!Object

Returns:

  • self


565
566
567
# File 'lib/llvm/pass_builder.rb', line 565

def tsan!
  add_pass('tsan')
end

#tsan_module!Object

Thread Sanitiver - Module clang.llvm.org/docs/ThreadSanitizer.html

Returns:

  • self


572
573
574
# File 'lib/llvm/pass_builder.rb', line 572

def tsan_module!
  add_pass('tsan-module')
end

#verify!Object

Returns self.

Returns:

  • self


249
250
251
# File 'lib/llvm/pass_builder.rb', line 249

def verify!
  add_pass('verify')
end