Class: LLVM::PassBuilder
- Inherits:
-
Object
- Object
- LLVM::PassBuilder
- Extended by:
- FFI::Library
- Defined in:
- lib/llvm/transforms/pass_builder.rb
Overview
rubocop:disable Metrics/ClassLength
Constant Summary collapse
- OPT_PASSES =
rubocop:disable Layout/LineLength
{ '0' => '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>(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>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1000;no-use-loop-info>,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>),require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline<only-mandatory>,inline,function-attrs<skip-non-recursive>,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>,instcombine<max-iterations=1000;no-use-loop-info>,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>,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>,instcombine<max-iterations=1000;no-use-loop-info>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,memcpyopt,sccp,bdce,instcombine<max-iterations=1000;no-use-loop-info>,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>,instcombine<max-iterations=1000;no-use-loop-info>),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;>,loop-load-elim,instcombine<max-iterations=1000;no-use-loop-info>,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>,vector-combine,instcombine<max-iterations=1000;no-use-loop-info>,loop-unroll<O1>,transform-warning,sroa<preserve-cfg>,instcombine<max-iterations=1000;no-use-loop-info>,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>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify', '2' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(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>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1000;no-use-loop-info>,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>),require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline<only-mandatory>,inline,function-attrs<skip-non-recursive>,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution,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>,instcombine<max-iterations=1000;no-use-loop-info>,aggressive-instcombine,constraint-elimination,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>,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>,instcombine<max-iterations=1000;no-use-loop-info>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1000;no-use-loop-info>,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>,instcombine<max-iterations=1000;no-use-loop-info>),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;>,loop-load-elim,instcombine<max-iterations=1000;no-use-loop-info>,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>,slp-vectorizer,vector-combine,instcombine<max-iterations=1000;no-use-loop-info>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,instcombine<max-iterations=1000;no-use-loop-info>,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>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify', '3' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(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>,sroa<modify-cfg>,early-cse<>,callsite-splitting),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1000;no-use-loop-info>,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>),require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline<only-mandatory>,inline,function-attrs<skip-non-recursive>,argpromotion,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution,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>,instcombine<max-iterations=1000;no-use-loop-info>,aggressive-instcombine,constraint-elimination,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>,reassociate,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>,instcombine<max-iterations=1000;no-use-loop-info>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1000;no-use-loop-info>,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>,instcombine<max-iterations=1000;no-use-loop-info>),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;>,loop-load-elim,instcombine<max-iterations=1000;no-use-loop-info>,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>,slp-vectorizer,vector-combine,instcombine<max-iterations=1000;no-use-loop-info>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,instcombine<max-iterations=1000;no-use-loop-info>,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>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify', 's' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(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>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1000;no-use-loop-info>,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>),require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline<only-mandatory>,inline,function-attrs<skip-non-recursive>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution,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>,instcombine<max-iterations=1000;no-use-loop-info>,aggressive-instcombine,constraint-elimination,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>,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>,instcombine<max-iterations=1000;no-use-loop-info>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1000;no-use-loop-info>,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>,instcombine<max-iterations=1000;no-use-loop-info>),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;>,loop-load-elim,instcombine<max-iterations=1000;no-use-loop-info>,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>,slp-vectorizer,vector-combine,instcombine<max-iterations=1000;no-use-loop-info>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,instcombine<max-iterations=1000;no-use-loop-info>,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>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify', 'z' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(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>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1000;no-use-loop-info>,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>),require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline<only-mandatory>,inline,function-attrs<skip-non-recursive>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution,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>,instcombine<max-iterations=1000;no-use-loop-info>,aggressive-instcombine,constraint-elimination,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>,reassociate,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>,instcombine<max-iterations=1000;no-use-loop-info>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1000;no-use-loop-info>,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>,instcombine<max-iterations=1000;no-use-loop-info>),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;>,loop-load-elim,instcombine<max-iterations=1000;no-use-loop-info>,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>,vector-combine,instcombine<max-iterations=1000;no-use-loop-info>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,instcombine<max-iterations=1000;no-use-loop-info>,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>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify', }.freeze
Instance Attribute Summary collapse
-
#inliner_threshold ⇒ Object
Returns the value of attribute inliner_threshold.
-
#passes ⇒ Object
readonly
Returns the value of attribute passes.
Instance Method Summary collapse
-
#adce! ⇒ Object
Aggressive Dead Code Elimination.
-
#add_discriminators! ⇒ Object
Self.
- #add_function_pass ⇒ Object
-
#add_pass(pass) ⇒ Object
Self.
-
#alignment_from_assumptions! ⇒ Object
Self.
-
#always_inline! ⇒ Object
Inlines functions marked as “always_inline”.
-
#argpromotion! ⇒ Object
(also: #arg_promote!)
Self.
-
#asan!(options = {}) ⇒ Object
Address Sanitizer TODO: takes params clang.llvm.org/docs/AddressSanitizer.html llvm.org/doxygen/AddressSanitizer_8h_source.html llvm.org/doxygen/AddressSanitizer_8cpp_source.html.
-
#basic_aa! ⇒ Object
(also: #basicaa!)
Self.
- #bb_vectorize! ⇒ Object
-
#bdce! ⇒ Object
Bit-Tracking Dead Code Elimination pass.
-
#called_value_propagation! ⇒ Object
Propagate called values This file implements a transformation that attaches !callees metadata to indirect call sites.
-
#constmerge! ⇒ Object
(also: #const_merge!)
ConstantMerge is designed to build up a map of available constants and eliminate duplicates when it is initialized.
- #constprop! ⇒ Object
-
#correlated_propagation! ⇒ Object
Self.
-
#cvprop! ⇒ Object
Self.
-
#dce! ⇒ Object
Self.
-
#deadargelim! ⇒ Object
(also: #dae!)
Self.
-
#dfsan! ⇒ Object
DataFlow Sanitizer clang.llvm.org/docs/DataFlowSanitizer.html.
-
#dse! ⇒ Object
Dead Store Elimination his file implements a trivial dead store elimination that only considers basic-block local redundant stores.
-
#early_cse! ⇒ Object
A simple and fast domtree-based CSE pass.
-
#early_cse_memssa! ⇒ Object
A simple and fast domtree-based CSE pass.
-
#function_attrs! ⇒ Object
(also: #fun_attrs!)
Self.
-
#global_opt! ⇒ Object
Self.
-
#globaldce! ⇒ Object
(also: #gdce!)
Global Dead Code Elimination TODO: takes params.
-
#gobals_aa! ⇒ Object
Self.
-
#gvn! ⇒ Object
Global Value Numbering pass llvm.org/doxygen/GVN_8h_source.html TODO: takes params.
-
#gvn_hoist! ⇒ Object
hoists expressions from branches to a common dominator.
-
#gvn_sink! ⇒ Object
sink instructions into successors llvm.org/doxygen/GVNSink_8cpp_source.html.
-
#hwasan!(_options = {}) ⇒ Object
Hardware Assisted Address Sanitiver TODO: takes params clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html llvm.org/doxygen/HWAddressSanitizer_8cpp_source.html.
-
#indvars! ⇒ Object
Self.
-
#initialize ⇒ PassBuilder
constructor
rubocop:enable Layout/LineLength.
-
#inline! ⇒ Object
The inliner pass for the new pass manager.
-
#instcombine! ⇒ Object
Combine instructions to form fewer, simple instructions.
-
#instsimplify! ⇒ Object
Self.
-
#internalize!(_all_but_main = true) ⇒ Object
TODO: test this.
- #ipcp! ⇒ Object
-
#ipsccp! ⇒ Object
This pass implements interprocedural sparse conditional constant propagation and merging.
-
#jump_threading! ⇒ Object
Self.
-
#lcssa! ⇒ Object
Self.
-
#licm! ⇒ Object
Self.
-
#loop_deletion! ⇒ Object
Self.
-
#loop_idiom! ⇒ Object
Self.
-
#loop_reroll! ⇒ Object
Self.
-
#loop_rotate! ⇒ Object
Self.
-
#loop_unroll! ⇒ Object
Self.
-
#loop_unroll_and_jam! ⇒ Object
Self.
-
#loop_unswitch! ⇒ Object
Self.
-
#loop_vectorize! ⇒ Object
TODO: takes params.
-
#lower_constant_intrinsics! ⇒ Object
Self.
-
#lower_expect! ⇒ Object
Self.
-
#loweratomic! ⇒ Object
Self.
-
#lowerswitch! ⇒ Object
Self.
-
#mem2reg! ⇒ Object
Self.
-
#memcpyopt! ⇒ Object
Self.
-
#memoryssa! ⇒ Object
Self.
-
#mergefunc! ⇒ Object
This pass looks for equivalent functions that are mergable and folds them.
-
#mergeicmps! ⇒ Object
Self.
-
#mergereturn! ⇒ Object
Self.
-
#mldst_motion! ⇒ Object
Merged Load Store Motion.
-
#module_summary! ⇒ Object
Self.
-
#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.
-
#newgvn! ⇒ Object
New Global Value Numbering pass llvm.org/doxygen/NewGVN_8cpp.html#details.
-
#no_op_cgscc! ⇒ Object
Self.
-
#no_op_function! ⇒ Object
Self.
-
#no_op_module! ⇒ Object
Self.
-
#o!(opt_level = '0') ⇒ Object
–O0 - Optimization level 0.
-
#objc_arc_aa ⇒ Object
Self.
-
#partially_inline_libcalls! ⇒ Object
Self.
- #pass_string ⇒ Object
- #prune_eh! ⇒ Object
-
#reassociate! ⇒ Object
Self.
-
#reg2mem! ⇒ Object
Self.
- #run(mod, target) ⇒ Object
- #sancov_module! ⇒ Object
- #sanmd_module! ⇒ Object
-
#scalarizer! ⇒ Object
Self.
- #scalarrepl! ⇒ Object
- #scalarrepl_ssa! ⇒ Object
- #scalarrepl_threshold!(_threshold = 0) ⇒ Object
-
#sccp! ⇒ Object
Self.
-
#scev_aa! ⇒ Object
Self.
-
#scoped_noalias_aa! ⇒ Object
Self.
-
#simple_loop_unswitch! ⇒ Object
Self.
- #simplify_libcalls! ⇒ Object
-
#simplifycfg! ⇒ Object
A pass to simplify and canonicalize the CFG of a function.
-
#slp_vectorize! ⇒ Object
Self.
-
#slp_vectorizer! ⇒ Object
Self.
-
#sroa! ⇒ Object
Scalar Replacement Of Aggregates llvm.org/doxygen/SROA_8h_source.html llvm.org/doxygen/SROA_8cpp.html.
-
#stack_safety! ⇒ Object
Self.
-
#strip! ⇒ Object
Self.
-
#strip_dead_prototypes! ⇒ Object
(also: #sdp!)
Self.
-
#tailcallelim! ⇒ Object
Self.
-
#tbaa! ⇒ Object
Self.
-
#tsan! ⇒ Object
Thread Sanitizer clang.llvm.org/docs/ThreadSanitizer.html.
-
#tsan_module! ⇒ Object
Thread Sanitiver - Module clang.llvm.org/docs/ThreadSanitizer.html.
-
#verify! ⇒ Object
Self.
Constructor Details
#initialize ⇒ PassBuilder
rubocop:enable Layout/LineLength
22 23 24 25 |
# File 'lib/llvm/transforms/pass_builder.rb', line 22 def initialize @passes = [] @inliner_threshold = nil end |
Instance Attribute Details
#inliner_threshold ⇒ Object
Returns the value of attribute inliner_threshold.
9 10 11 |
# File 'lib/llvm/transforms/pass_builder.rb', line 9 def inliner_threshold @inliner_threshold end |
#passes ⇒ Object
Returns the value of attribute passes.
8 9 10 |
# File 'lib/llvm/transforms/pass_builder.rb', line 8 def passes @passes end |
Instance Method Details
#adce! ⇒ Object
Aggressive Dead Code Elimination
439 440 441 |
# File 'lib/llvm/transforms/pass_builder.rb', line 439 def adce! add_pass('adce') end |
#add_discriminators! ⇒ Object
Returns self.
338 339 340 |
# File 'lib/llvm/transforms/pass_builder.rb', line 338 def add_discriminators! add_pass('add-discriminators') end |
#add_function_pass ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/llvm/transforms/pass_builder.rb', line 27 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.
53 54 55 56 |
# File 'lib/llvm/transforms/pass_builder.rb', line 53 def add_pass(pass) passes << pass self end |
#alignment_from_assumptions! ⇒ Object
Returns self.
132 133 134 |
# File 'lib/llvm/transforms/pass_builder.rb', line 132 def alignment_from_assumptions! add_pass('alignment-from-assumptions') end |
#always_inline! ⇒ Object
Inlines functions marked as “always_inline”. llvm.org/doxygen/AlwaysInliner_8h_source.html llvm.org/doxygen/AlwaysInliner_8cpp_source.html
393 394 395 |
# File 'lib/llvm/transforms/pass_builder.rb', line 393 def always_inline! add_pass('always-inline') end |
#argpromotion! ⇒ Object Also known as: arg_promote!
Returns self.
506 507 508 |
# File 'lib/llvm/transforms/pass_builder.rb', line 506 def argpromotion! add_pass('argpromotion') end |
#asan!(options = {}) ⇒ Object
Address Sanitizer TODO: takes params clang.llvm.org/docs/AddressSanitizer.html llvm.org/doxygen/AddressSanitizer_8h_source.html llvm.org/doxygen/AddressSanitizer_8cpp_source.html
550 551 552 553 |
# File 'lib/llvm/transforms/pass_builder.rb', line 550 def asan!( = {}) opt_str = [:kernel] ? '<kernel>' : '' add_pass("asan#{opt_str}") end |
#basic_aa! ⇒ Object Also known as: basicaa!
Returns self.
353 354 355 |
# File 'lib/llvm/transforms/pass_builder.rb', line 353 def basic_aa! add_pass('require<basic-aa>') end |
#bb_vectorize! ⇒ Object
628 629 630 631 |
# File 'lib/llvm/transforms/pass_builder.rb', line 628 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
493 494 495 |
# File 'lib/llvm/transforms/pass_builder.rb', line 493 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
416 417 418 |
# File 'lib/llvm/transforms/pass_builder.rb', line 416 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
431 432 433 |
# File 'lib/llvm/transforms/pass_builder.rb', line 431 def constmerge! add_pass('constmerge') end |
#constprop! ⇒ Object
633 634 635 |
# File 'lib/llvm/transforms/pass_builder.rb', line 633 def constprop! warn('constprop! / LLVMAddConstantPropagationPass was removed from LLVM') end |
#correlated_propagation! ⇒ Object
Returns self.
318 319 320 |
# File 'lib/llvm/transforms/pass_builder.rb', line 318 def add_pass('correlated-propagation') end |
#cvprop! ⇒ Object
Returns self.
313 314 315 |
# File 'lib/llvm/transforms/pass_builder.rb', line 313 def cvprop! end |
#dce! ⇒ Object
Returns self.
59 60 61 |
# File 'lib/llvm/transforms/pass_builder.rb', line 59 def dce! add_pass('dce') end |
#deadargelim! ⇒ Object Also known as: dae!
Returns self.
421 422 423 |
# File 'lib/llvm/transforms/pass_builder.rb', line 421 def deadargelim! add_pass('deadargelim') end |
#dfsan! ⇒ Object
DataFlow Sanitizer clang.llvm.org/docs/DataFlowSanitizer.html
570 571 572 |
# File 'lib/llvm/transforms/pass_builder.rb', line 570 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
501 502 503 |
# File 'lib/llvm/transforms/pass_builder.rb', line 501 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
277 278 279 |
# File 'lib/llvm/transforms/pass_builder.rb', line 277 def early_cse! add_pass('early-cse') end |
#early_cse_memssa! ⇒ Object
A simple and fast domtree-based CSE pass. llvm.org/doxygen/EarlyCSE_8h_source.html llvm.org/doxygen/EarlyCSE_8cpp.html
285 286 287 |
# File 'lib/llvm/transforms/pass_builder.rb', line 285 def early_cse_memssa! add_pass('early-cse<memssa>') end |
#function_attrs! ⇒ Object Also known as: fun_attrs!
Returns self.
444 445 446 |
# File 'lib/llvm/transforms/pass_builder.rb', line 444 def function_attrs! add_pass('function-attrs') end |
#global_opt! ⇒ Object
Returns self.
478 479 480 |
# File 'lib/llvm/transforms/pass_builder.rb', line 478 def global_opt! add_pass('globalopt') end |
#globaldce! ⇒ Object Also known as: gdce!
Global Dead Code Elimination TODO: takes params
485 486 487 |
# File 'lib/llvm/transforms/pass_builder.rb', line 485 def globaldce! add_pass('globaldce') end |
#gobals_aa! ⇒ Object
Returns self.
380 381 382 |
# File 'lib/llvm/transforms/pass_builder.rb', line 380 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
96 97 98 |
# File 'lib/llvm/transforms/pass_builder.rb', line 96 def gvn! add_pass('gvn') end |
#gvn_hoist! ⇒ Object
hoists expressions from branches to a common dominator. llvm.org/doxygen/GVNHoist_8cpp_source.html
110 111 112 |
# File 'lib/llvm/transforms/pass_builder.rb', line 110 def gvn_hoist! add_pass('gvn-hoist') end |
#gvn_sink! ⇒ Object
sink instructions into successors llvm.org/doxygen/GVNSink_8cpp_source.html
117 118 119 |
# File 'lib/llvm/transforms/pass_builder.rb', line 117 def gvn_sink! add_pass('gvn-sink') end |
#hwasan!(_options = {}) ⇒ Object
Hardware Assisted Address Sanitiver TODO: takes params clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html llvm.org/doxygen/HWAddressSanitizer_8cpp_source.html
540 541 542 |
# File 'lib/llvm/transforms/pass_builder.rb', line 540 def hwasan!( = {}) add_pass('hwasan') end |
#indvars! ⇒ Object
Returns self.
127 128 129 |
# File 'lib/llvm/transforms/pass_builder.rb', line 127 def indvars! add_pass('indvars') end |
#inline! ⇒ Object
The inliner pass for the new pass manager. llvm.org/doxygen/classllvm_1_1InlinerPass.html llvm.org/doxygen/Inliner_8h_source.html llvm.org/doxygen/Inliner_8cpp_source.html
517 518 519 |
# File 'lib/llvm/transforms/pass_builder.rb', line 517 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
198 199 200 |
# File 'lib/llvm/transforms/pass_builder.rb', line 198 def instcombine! add_pass('instcombine') end |
#instsimplify! ⇒ Object
Returns self.
203 204 205 |
# File 'lib/llvm/transforms/pass_builder.rb', line 203 def instsimplify! add_pass('instsimplify') end |
#internalize!(_all_but_main = true) ⇒ Object
TODO: test this
464 465 466 |
# File 'lib/llvm/transforms/pass_builder.rb', line 464 def internalize!(_all_but_main = true) # rubocop:disable Style/OptionalBooleanParameter add_pass('internalize') end |
#ipcp! ⇒ Object
604 605 606 |
# File 'lib/llvm/transforms/pass_builder.rb', line 604 def ipcp! deprecated('ipcp! / LLVMAddIPConstantPropagationPass was removed from LLVM') end |
#ipsccp! ⇒ Object
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
473 474 475 |
# File 'lib/llvm/transforms/pass_builder.rb', line 473 def ipsccp! add_pass('ipsccp') end |
#jump_threading! ⇒ Object
Returns self.
122 123 124 |
# File 'lib/llvm/transforms/pass_builder.rb', line 122 def jump_threading! add_pass('jump-threading') end |
#lcssa! ⇒ Object
Returns self.
290 291 292 |
# File 'lib/llvm/transforms/pass_builder.rb', line 290 def lcssa! add_pass('lcssa') end |
#licm! ⇒ Object
Returns self.
64 65 66 |
# File 'lib/llvm/transforms/pass_builder.rb', line 64 def licm! add_pass('licm') end |
#loop_deletion! ⇒ Object
Returns self.
137 138 139 |
# File 'lib/llvm/transforms/pass_builder.rb', line 137 def loop_deletion! add_pass('loop-deletion') end |
#loop_idiom! ⇒ Object
Returns self.
142 143 144 |
# File 'lib/llvm/transforms/pass_builder.rb', line 142 def loop_idiom! add_pass('loop-idiom') end |
#loop_reroll! ⇒ Object
Returns self.
152 153 154 |
# File 'lib/llvm/transforms/pass_builder.rb', line 152 def loop_reroll! add_pass('loop-reroll') end |
#loop_rotate! ⇒ Object
Returns self.
147 148 149 |
# File 'lib/llvm/transforms/pass_builder.rb', line 147 def loop_rotate! add_pass('loop-rotate') end |
#loop_unroll! ⇒ Object
Returns self.
157 158 159 |
# File 'lib/llvm/transforms/pass_builder.rb', line 157 def loop_unroll! add_pass('loop-unroll') end |
#loop_unroll_and_jam! ⇒ Object
Returns self.
162 163 164 |
# File 'lib/llvm/transforms/pass_builder.rb', line 162 def loop_unroll_and_jam! add_pass('loop-unroll-and-jam') end |
#loop_unswitch! ⇒ Object
Returns self.
172 173 174 |
# File 'lib/llvm/transforms/pass_builder.rb', line 172 def loop_unswitch! simple_loop_unswitch! end |
#loop_vectorize! ⇒ Object
TODO: takes params
178 179 180 |
# File 'lib/llvm/transforms/pass_builder.rb', line 178 def loop_vectorize! add_pass('loop-vectorize') end |
#lower_constant_intrinsics! ⇒ Object
Returns self.
323 324 325 |
# File 'lib/llvm/transforms/pass_builder.rb', line 323 def lower_constant_intrinsics! add_pass('lower-constant-intrinsics') end |
#lower_expect! ⇒ Object
Returns self.
308 309 310 |
# File 'lib/llvm/transforms/pass_builder.rb', line 308 def lower_expect! add_pass('lower-expect') end |
#loweratomic! ⇒ Object
Returns self.
208 209 210 |
# File 'lib/llvm/transforms/pass_builder.rb', line 208 def loweratomic! add_pass('loweratomic') end |
#lowerswitch! ⇒ Object
Returns self.
385 386 387 |
# File 'lib/llvm/transforms/pass_builder.rb', line 385 def lowerswitch! add_pass('lowerswitch') end |
#mem2reg! ⇒ Object
Returns self.
233 234 235 |
# File 'lib/llvm/transforms/pass_builder.rb', line 233 def mem2reg! add_pass('mem2reg') end |
#memcpyopt! ⇒ Object
Returns self.
183 184 185 |
# File 'lib/llvm/transforms/pass_builder.rb', line 183 def memcpyopt! add_pass('memcpyopt') end |
#memoryssa! ⇒ Object
Returns self.
295 296 297 |
# File 'lib/llvm/transforms/pass_builder.rb', line 295 def memoryssa! add_pass('require<memoryssa>') end |
#mergefunc! ⇒ Object
This pass looks for equivalent functions that are mergable and folds them. llvm.org/docs/MergeFunctions.html llvm.org/doxygen/MergeFunctions_8cpp_source.html llvm.org/doxygen/MergeFunctions_8h_source.html
402 403 404 |
# File 'lib/llvm/transforms/pass_builder.rb', line 402 def mergefunc! add_pass('mergefunc') end |
#mergeicmps! ⇒ Object
Returns self.
348 349 350 |
# File 'lib/llvm/transforms/pass_builder.rb', line 348 def mergeicmps! add_pass('mergeicmps') end |
#mergereturn! ⇒ Object
Returns self.
343 344 345 |
# File 'lib/llvm/transforms/pass_builder.rb', line 343 def mergereturn! add_pass('mergereturn') end |
#mldst_motion! ⇒ Object
Merged Load Store Motion
88 89 90 |
# File 'lib/llvm/transforms/pass_builder.rb', line 88 def mldst_motion! add_pass('mldst-motion') end |
#module_summary! ⇒ Object
Returns self.
243 244 245 |
# File 'lib/llvm/transforms/pass_builder.rb', line 243 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.
562 563 564 565 |
# File 'lib/llvm/transforms/pass_builder.rb', line 562 def msan!( = {}) opt_str = [:kernel] ? '<kernel>' : '' add_pass("msan#{opt_str}") end |
#newgvn! ⇒ Object
New Global Value Numbering pass llvm.org/doxygen/NewGVN_8cpp.html#details
103 104 105 |
# File 'lib/llvm/transforms/pass_builder.rb', line 103 def newgvn! add_pass('newgvn') end |
#no_op_cgscc! ⇒ Object
Returns self.
253 254 255 |
# File 'lib/llvm/transforms/pass_builder.rb', line 253 def no_op_cgscc! add_pass('no-op-cgscc') end |
#no_op_function! ⇒ Object
Returns self.
258 259 260 |
# File 'lib/llvm/transforms/pass_builder.rb', line 258 def no_op_function! add_pass('no-op-function') end |
#no_op_module! ⇒ Object
Returns self.
248 249 250 |
# File 'lib/llvm/transforms/pass_builder.rb', line 248 def no_op_module! add_pass('no-op-module') end |
#o!(opt_level = '0') ⇒ 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
43 44 45 46 47 48 49 50 |
# File 'lib/llvm/transforms/pass_builder.rb', line 43 def o!(opt_level = '0') opt_level = opt_level.to_s if inliner_threshold || !OPT_PASSES.key?(opt_level) add_pass("default<O#{opt_level}>") else add_pass(OPT_PASSES[opt_level].gsub(',inline,', ',')) end end |
#objc_arc_aa ⇒ Object
Returns self.
360 361 362 |
# File 'lib/llvm/transforms/pass_builder.rb', line 360 def objc_arc_aa add_pass('require<objc-arc-aa>') end |
#partially_inline_libcalls! ⇒ Object
Returns self.
213 214 215 |
# File 'lib/llvm/transforms/pass_builder.rb', line 213 def partially_inline_libcalls! add_pass('partially-inline-libcalls') end |
#pass_string ⇒ Object
600 601 602 |
# File 'lib/llvm/transforms/pass_builder.rb', line 600 def pass_string passes.join(',') end |
#prune_eh! ⇒ Object
608 609 610 |
# File 'lib/llvm/transforms/pass_builder.rb', line 608 def prune_eh! deprecated('prune_eh! / LLVMAddPruneEHPass was removed in LLVM 16') end |
#reassociate! ⇒ Object
Returns self.
218 219 220 |
# File 'lib/llvm/transforms/pass_builder.rb', line 218 def reassociate! add_pass('reassociate') end |
#reg2mem! ⇒ Object
Returns self.
228 229 230 |
# File 'lib/llvm/transforms/pass_builder.rb', line 228 def reg2mem! add_pass('reg2mem') end |
#run(mod, target) ⇒ Object
586 587 588 589 590 591 592 593 594 595 596 597 598 |
# File 'lib/llvm/transforms/pass_builder.rb', line 586 def run(mod, target) return self if passes.empty? = error = C.run_passes(mod, pass_string, target, ) if !error.null? error_msg = (error) # save_message = error_msg.clone # dispose_error_message(error_msg) raise "There was an error: #{error_msg}" end self end |
#sancov_module! ⇒ Object
576 577 578 |
# File 'lib/llvm/transforms/pass_builder.rb', line 576 def sancov_module! add_pass('sancov-module') end |
#sanmd_module! ⇒ Object
582 583 584 |
# File 'lib/llvm/transforms/pass_builder.rb', line 582 def sanmd_module! add_pass('sanmd-module') end |
#scalarizer! ⇒ Object
Returns self.
82 83 84 |
# File 'lib/llvm/transforms/pass_builder.rb', line 82 def scalarizer! add_pass('scalarizer') end |
#scalarrepl! ⇒ Object
616 617 618 |
# File 'lib/llvm/transforms/pass_builder.rb', line 616 def scalarrepl! deprecated('TODO: scalarrepl') end |
#scalarrepl_ssa! ⇒ Object
620 621 622 |
# File 'lib/llvm/transforms/pass_builder.rb', line 620 def scalarrepl_ssa! deprecated('TODO: scalarrepl_ssa') end |
#scalarrepl_threshold!(_threshold = 0) ⇒ Object
624 625 626 |
# File 'lib/llvm/transforms/pass_builder.rb', line 624 def scalarrepl_threshold!(_threshold = 0) deprecated('TODO: scalarrepl_threshold') end |
#sccp! ⇒ Object
Returns self.
188 189 190 |
# File 'lib/llvm/transforms/pass_builder.rb', line 188 def sccp! add_pass('sccp') end |
#scev_aa! ⇒ Object
Returns self.
365 366 367 |
# File 'lib/llvm/transforms/pass_builder.rb', line 365 def scev_aa! add_pass('require<scev-aa>') end |
#scoped_noalias_aa! ⇒ Object
Returns self.
370 371 372 |
# File 'lib/llvm/transforms/pass_builder.rb', line 370 def scoped_noalias_aa! add_pass('require<scoped-noalias-aa>') end |
#simple_loop_unswitch! ⇒ Object
Returns self.
167 168 169 |
# File 'lib/llvm/transforms/pass_builder.rb', line 167 def simple_loop_unswitch! add_pass('simple-loop-unswitch') end |
#simplify_libcalls! ⇒ Object
612 613 614 |
# File 'lib/llvm/transforms/pass_builder.rb', line 612 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>
77 78 79 |
# File 'lib/llvm/transforms/pass_builder.rb', line 77 def simplifycfg! add_pass('simplifycfg') end |
#slp_vectorize! ⇒ Object
Returns self.
328 329 330 |
# File 'lib/llvm/transforms/pass_builder.rb', line 328 def slp_vectorize! slp_vectorizer! end |
#slp_vectorizer! ⇒ Object
Returns self.
333 334 335 |
# File 'lib/llvm/transforms/pass_builder.rb', line 333 def slp_vectorizer! add_pass('slp-vectorizer') end |
#sroa! ⇒ Object
Scalar Replacement Of Aggregates llvm.org/doxygen/SROA_8h_source.html llvm.org/doxygen/SROA_8cpp.html
303 304 305 |
# File 'lib/llvm/transforms/pass_builder.rb', line 303 def sroa! add_pass('sroa') end |
#stack_safety! ⇒ Object
Returns self.
263 264 265 |
# File 'lib/llvm/transforms/pass_builder.rb', line 263 def stack_safety! add_pass('require<stack-safety>') end |
#strip! ⇒ Object
Returns self.
451 452 453 |
# File 'lib/llvm/transforms/pass_builder.rb', line 451 def strip! add_pass('strip') end |
#strip_dead_prototypes! ⇒ Object Also known as: sdp!
Returns self.
456 457 458 |
# File 'lib/llvm/transforms/pass_builder.rb', line 456 def strip_dead_prototypes! add_pass('strip-dead-prototypes') end |
#tailcallelim! ⇒ Object
Returns self.
223 224 225 |
# File 'lib/llvm/transforms/pass_builder.rb', line 223 def tailcallelim! add_pass('tailcallelim') end |
#tbaa! ⇒ Object
Returns self.
375 376 377 |
# File 'lib/llvm/transforms/pass_builder.rb', line 375 def tbaa! add_pass('require<tbaa>') end |
#tsan! ⇒ Object
Thread Sanitizer clang.llvm.org/docs/ThreadSanitizer.html
524 525 526 |
# File 'lib/llvm/transforms/pass_builder.rb', line 524 def tsan! add_pass('tsan') end |
#tsan_module! ⇒ Object
Thread Sanitiver - Module clang.llvm.org/docs/ThreadSanitizer.html
531 532 533 |
# File 'lib/llvm/transforms/pass_builder.rb', line 531 def tsan_module! add_pass('tsan-module') end |
#verify! ⇒ Object
Returns self.
238 239 240 |
# File 'lib/llvm/transforms/pass_builder.rb', line 238 def verify! add_pass('verify') end |