Class: LLVM::FunctionPassManager

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

Instance Method Summary collapse

Methods inherited from PassManager

#<<, #adce!, #add_discriminators!, #alignment_from_assumptions!, #always_inline!, #arg_promote!, #basicaa!, #bb_vectorize!, #bdce!, #called_value_propagation!, #const_merge!, #constprop!, #cvprop!, #dae!, #dce!, #dispose, #dse!, #early_cse!, #early_cse_memssa!, #fun_attrs!, #gdce!, #global_opt!, #gvn!, #indvars!, #inline!, #instcombine!, #instsimplify!, #internalize!, #ipcp!, #ipsccp!, #jump_threading!, #licm!, #loop_deletion!, #loop_idiom!, #loop_reroll!, #loop_rotate!, #loop_unroll!, #loop_unroll_and_jam!, #loop_unswitch!, #loop_vectorize!, #lower_constant_intrinsics!, #lower_expect!, #loweratomic!, #lowerswitch!, #mem2reg!, #memcpyopt!, #mergefunc!, #mergereturn!, #mldst_motion!, #newgvn!, #partially_inline_libcalls!, #prune_eh!, #reassociate!, #reg2mem!, #scalarizer!, #scalarrepl!, #scalarrepl_ssa!, #scalarrepl_threshold!, #sccp!, #scoped_noalias_aa!, #sdp!, #simplify_libcalls!, #simplifycfg!, #slp_vectorize!, #strip!, #tailcallelim!, #tbaa!, #to_ptr, #verify!

Constructor Details

#initialize(machine, mod) ⇒ FunctionPassManager

Creates a new function pass manager.



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

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.



76
77
78
# File 'lib/llvm/core/pass_manager.rb', line 76

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