Class: LLVM::PassManagerBuilder
- Inherits:
-
Object
- Object
- LLVM::PassManagerBuilder
- Includes:
- PointerIdentity
- Defined in:
- lib/llvm/transforms/builder.rb
Instance Attribute Summary collapse
-
#inliner_threshold ⇒ Object
Returns the value of attribute inliner_threshold.
-
#opt_level ⇒ Object
Returns the value of attribute opt_level.
-
#simplify_lib_calls ⇒ Object
Returns the value of attribute simplify_lib_calls.
-
#size_level ⇒ Object
Returns the value of attribute size_level.
-
#unit_at_a_time ⇒ Object
Returns the value of attribute unit_at_a_time.
-
#unroll_loops ⇒ Object
Returns the value of attribute unroll_loops.
Instance Method Summary collapse
-
#build(pass_manager) ⇒ Object
Populate a pass manager.
-
#build_with_lto(pass_manager, internalize = false, run_inliner = false) ⇒ Object
Populate an LTO pass manager.
- #dispose ⇒ Object
-
#initialize ⇒ PassManagerBuilder
constructor
A new instance of PassManagerBuilder.
Methods included from PointerIdentity
Constructor Details
#initialize ⇒ PassManagerBuilder
Returns a new instance of PassManagerBuilder.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/llvm/transforms/builder.rb', line 18 def initialize @ptr = C.pass_manager_builder_create @size_level = 0 @opt_level = 0 @unit_at_a_time = false @unroll_loops = false @simplify_lib_calls = false @inliner_threshold = 0 end |
Instance Attribute Details
#inliner_threshold ⇒ Object
Returns the value of attribute inliner_threshold.
16 17 18 |
# File 'lib/llvm/transforms/builder.rb', line 16 def inliner_threshold @inliner_threshold end |
#opt_level ⇒ Object
Returns the value of attribute opt_level.
12 13 14 |
# File 'lib/llvm/transforms/builder.rb', line 12 def opt_level @opt_level end |
#simplify_lib_calls ⇒ Object
Returns the value of attribute simplify_lib_calls.
15 16 17 |
# File 'lib/llvm/transforms/builder.rb', line 15 def simplify_lib_calls @simplify_lib_calls end |
#size_level ⇒ Object
Returns the value of attribute size_level.
11 12 13 |
# File 'lib/llvm/transforms/builder.rb', line 11 def size_level @size_level end |
#unit_at_a_time ⇒ Object
Returns the value of attribute unit_at_a_time.
13 14 15 |
# File 'lib/llvm/transforms/builder.rb', line 13 def unit_at_a_time @unit_at_a_time end |
#unroll_loops ⇒ Object
Returns the value of attribute unroll_loops.
14 15 16 |
# File 'lib/llvm/transforms/builder.rb', line 14 def unroll_loops @unroll_loops end |
Instance Method Details
#build(pass_manager) ⇒ Object
Populate a pass manager.
76 77 78 79 80 81 82 83 84 |
# File 'lib/llvm/transforms/builder.rb', line 76 def build(pass_manager) case pass_manager when FunctionPassManager C.pass_manager_builder_populate_function_pass_manager(self, pass_manager) when PassManager C.pass_manager_builder_populate_module_pass_manager(self, pass_manager) end end |
#build_with_lto(pass_manager, internalize = false, run_inliner = false) ⇒ Object
Populate an LTO pass manager.
88 89 90 |
# File 'lib/llvm/transforms/builder.rb', line 88 def build_with_lto(pass_manager, internalize = false, run_inliner = false) raise "build_with_lto is not currently supported" end |
#dispose ⇒ Object
29 30 31 32 33 34 |
# File 'lib/llvm/transforms/builder.rb', line 29 def dispose return if @ptr.nil? C.pass_manager_builder_dispose(@ptr) @ptr = nil end |