Class: LLVM::FunctionPassManager
- Inherits:
-
PassManager
- Object
- PassManager
- LLVM::FunctionPassManager
- Defined in:
- lib/llvm/core/pass_manager.rb
Instance Method Summary collapse
-
#initialize(execution_engine, mod) ⇒ FunctionPassManager
constructor
Creates a new pass manager on the given ExecutionEngine and Module.
-
#run(fn) ⇒ true, false
Run the pass queue on the given function.
Methods inherited from PassManager
#<<, #adce!, #constprop!, #dispose, #dse!, #gdce!, #gvn!, #indvars!, #inline!, #instcombine!, #jump_threading!, #licm!, #loop_deletion!, #loop_rotate!, #loop_unroll!, #loop_unswitch!, #mem2reg!, #memcpyopt!, #reassociate!, #reg2mem!, #scalarrepl!, #sccp!, #simplify_libcalls!, #simplifycfg!, #tailcallelim!, #to_ptr
Constructor Details
#initialize(execution_engine, mod) ⇒ FunctionPassManager
Creates a new pass manager on the given ExecutionEngine and Module.
52 53 54 55 56 57 |
# File 'lib/llvm/core/pass_manager.rb', line 52 def initialize(execution_engine, mod) ptr = C.LLVMCreateFunctionPassManagerForModule(mod) C.LLVMAddTargetData( C.LLVMGetExecutionEngineTargetData(execution_engine), ptr) @ptr = ptr end |
Instance Method Details
#run(fn) ⇒ true, false
Run the pass queue on the given function.
62 63 64 |
# File 'lib/llvm/core/pass_manager.rb', line 62 def run(fn) C.LLVMRunFunctionPassManager(self, fn) != 0 end |