Class: LLVM::FunctionPassManager

Inherits:
PassManager show all
Defined in:
lib/llvm/core/pass_manager.rb

Instance Method Summary collapse

Methods inherited from PassManager

#<<, #adce!, #always_inline!, #arg_promote!, #basicaa!, #bb_vectorize!, #const_merge!, #constprop!, #cvprop!, #dae!, #dispose, #dse!, #early_cse!, #fun_attrs!, #gdce!, #global_opt!, #gvn!, #indvars!, #inline!, #instcombine!, #internalize!, #ipcp!, #ipsccp!, #jump_threading!, #licm!, #loop_deletion!, #loop_idiom!, #loop_rotate!, #loop_unroll!, #loop_unswitch!, #loop_vectorize!, #lower_expect!, #mem2reg!, #memcpyopt!, #prune_eh!, #reassociate!, #reg2mem!, #scalarrepl!, #scalarrepl_ssa!, #scalarrepl_threshold!, #sccp!, #sdp!, #simplify_libcalls!, #simplifycfg!, #slp_vectorize!, #strip!, #tailcallelim!, #tbaa!, #to_ptr

Constructor Details

#initialize(machine, mod) ⇒ FunctionPassManager

Creates a new function pass manager.


57
58
59
60
61
62
# File 'lib/llvm/core/pass_manager.rb', line 57

def initialize(machine, mod)
  @ptr = C.create_function_pass_manager_for_module(mod)
  C.add_target_data(machine.data_layout, @ptr)

  C.initialize_function_pass_manager(self) != 0
end

Instance Method Details

#run(fn) ⇒ true, false

Run the pass queue on the given function.

Parameters:

Returns:

  • (true, false)

    indicates whether the function was modified.


68
69
70
# File 'lib/llvm/core/pass_manager.rb', line 68

def run(fn)
  C.run_function_pass_manager(self, fn) != 0
end