ruby-llvm 18.2.0 → 19.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e48eb7aeebc6f8fb6de9c900065168d2b2ed555ca4e294bf1a96e47959344069
4
- data.tar.gz: c61c5cbf456724538e18cbc9b70660fba586e9af8cc5811a98e74f589166e808
3
+ metadata.gz: e10c7862bad0824d39c4267e4f57a0938c692797152c367f19e89c45349cfdc1
4
+ data.tar.gz: 9ff941e455b59e7f710213da4b0b0bd0cb074d47ee217b4aa5603f78b267acaa
5
5
  SHA512:
6
- metadata.gz: faac90c796d9eab92633734c0c323a1b959118ae4558c7ac2dbffbe3f019dc64b876de72a678ced189a31b2fa34cd04fe7d3352cb3571638618c181844186f33
7
- data.tar.gz: 7a3549ffad064a6aedfe6a84146ab4be41434d093c5856315d49ca854bd8ba17bd0bd543e9c396b292b399ddcfd230d35cbfbb302c6cdde2642532b923bc7ea9
6
+ metadata.gz: a0cde4581200138358072feb19b55bfac4f53aa59b98c24c49d5a37a90dc973be394982397cc46045c7515403abe4ff3ec7f0115598310dc2c09af4a7b797453
7
+ data.tar.gz: 11972368435dc06407593cbb500208a61a152c7d57a8bd7952023862fa8c78a766cd5bdffd18bf78c711e0afd2cb1ead03ff8a4c9fbd6423bbd229ae2f31baf2
@@ -8,7 +8,7 @@ require File.expand_path('../../lib/llvm/version', File.dirname(__FILE__))
8
8
  include LLVM
9
9
 
10
10
  def check_for(what, variants, env_var)
11
- variants = [ ENV[env_var], *variants ] if ENV.include?(env_var)
11
+ variants = [ENV[env_var], *variants] if ENV.include?(env_var)
12
12
 
13
13
  $stdout.print("checking for #{what}... ")
14
14
  $stdout.flush
@@ -20,16 +20,13 @@ def check_for(what, variants, env_var)
20
20
  end
21
21
  end
22
22
 
23
- if result
24
- result
25
- else
26
- raise "Cannot find #{what}: tried #{variants}"
27
- end
23
+ raise "Cannot find #{what}: tried #{variants}" unless result
24
+ result
28
25
  end
29
26
 
30
27
  def find_llvm_config
31
28
  check_for('llvm-config',
32
- %W(llvm-config-#{LLVM_VERSION} llvm-config),
29
+ %W[llvm-config-#{LLVM_VERSION} llvm-config],
33
30
  'LLVM_CONFIG') do |llvm_config|
34
31
  begin
35
32
  actual_version = `#{llvm_config} --version`.strip
@@ -45,8 +42,8 @@ def find_llvm_config
45
42
  end
46
43
 
47
44
  def find_cxx
48
- check_for('C++ compiler', %W(clang++-#{LLVM_VERSION} clang++ g++), 'CXX') do |cxx|
49
- system(cxx, "--version", out: File::NULL, err: File::NULL)
45
+ check_for('C++ compiler', %W[clang++-#{LLVM_VERSION} clang++ g++], 'CXX') do |cxx|
46
+ system(cxx, '--version', out: File::NULL, err: File::NULL)
50
47
  $?.success?
51
48
  end
52
49
  end
@@ -55,10 +52,13 @@ LLVM_CONFIG = find_llvm_config
55
52
  CXX = find_cxx
56
53
 
57
54
  def invoke_llvm_config(options)
58
- `#{LLVM_CONFIG} #{options}`.tr("\n", " ").strip
55
+ `#{LLVM_CONFIG} #{options}`.tr("\n", ' ').strip
59
56
  end
60
57
 
61
- def llvm_lib_name
58
+ # llvm_lib_name
59
+ # Are there any builds where invoke_llvm_config('--libs') will not be sufficient and manual search would still be
60
+ # needed?
61
+ private def _llvm_lib_name
62
62
  lib_dir = invoke_llvm_config('--libdir').strip
63
63
  lib_name = 'LLVM'
64
64
  versioned_lib_name = "#{lib_name}-#{LLVM_VERSION}"
@@ -72,12 +72,12 @@ CONFIG_MOD = File.expand_path('../../lib/llvm/config.rb', File.dirname(__FILE__
72
72
 
73
73
  CLEAN.include(SUPPORT_LIB, CONFIG_MOD)
74
74
 
75
- desc "Build the shared library and config module"
76
- task :default => [SUPPORT_LIB, CONFIG_MOD]
75
+ desc 'Build the shared library and config module'
76
+ task default: [SUPPORT_LIB, CONFIG_MOD]
77
77
 
78
- file SUPPORT_LIB => %w(support.cpp) do |task|
79
- sh "#{CXX} -O3 -shared #{task.prerequisites.join(' ')} -l#{llvm_lib_name} " \
80
- "#{invoke_llvm_config('--cxxflags --ldflags')} -fPIC -o #{SUPPORT_LIB}"
78
+ file SUPPORT_LIB => %w[support.cpp] do |task|
79
+ sh "#{CXX} -O3 -shared #{task.prerequisites.join(' ')} " \
80
+ "#{invoke_llvm_config('--libs --cxxflags --ldflags')} -fPIC -o #{SUPPORT_LIB}"
81
81
  end
82
82
 
83
83
  LLVM_CONFIG_OPTS = [
@@ -88,7 +88,8 @@ LLVM_CONFIG_OPTS = [
88
88
  ['BUILD_MODE', :string, '--build-mode'],
89
89
  ['CFLAGS', :string, '--cflags'],
90
90
  ['CXXFLAGS', :string, '--cxxflags'],
91
- ['LDFLAGS', :string, '--ldflags'],
91
+ ['LDFLAGS', :string, '--ldflags'],
92
+ ['LIBS', :string, '--libs'],
92
93
  ].freeze
93
94
 
94
95
  file CONFIG_MOD do
data/lib/llvm/analysis.rb CHANGED
@@ -17,7 +17,9 @@ module LLVM
17
17
  # Verify that a module is valid, and abort the process if not.
18
18
  # @return [nil]
19
19
  def verify!
20
+ # :nocov:
20
21
  do_verification(:abort_process)
22
+ # :nocov:
21
23
  end
22
24
 
23
25
  def valid?
@@ -43,7 +45,9 @@ module LLVM
43
45
  # Verify that a function is valid, and abort the process if not.
44
46
  # @return [true, false]
45
47
  def verify!
48
+ # :nocov:
46
49
  do_verification(:abort_process)
50
+ # :nocov:
47
51
  end
48
52
 
49
53
  def valid?
@@ -4,14 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
8
-
9
- def self.attach_function(name, *_)
10
- begin; super; rescue FFI::NotFoundError => e
11
- (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
12
- end
13
- end
14
-
7
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
15
8
  # @defgroup LLVMCAnalysis Analysis
16
9
  # @ingroup LLVMC
17
10
  #
@@ -4,14 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
8
-
9
- def self.attach_function(name, *_)
10
- begin; super; rescue FFI::NotFoundError => e
11
- (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
12
- end
13
- end
14
-
7
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
15
8
  # (Not documented)
16
9
  #
17
10
  # @method parse_bitcode(mem_buf, out_module, out_message)
@@ -105,27 +105,27 @@ module LLVM
105
105
 
106
106
  # Returns the GlobalVariable with the given name (symbol or string).
107
107
  def named(name)
108
- GlobalValue.from_ptr(C.get_named_global(@module, name.to_s))
108
+ GlobalVariable.from_ptr(C.get_named_global(@module, name.to_s))
109
109
  end
110
110
 
111
111
  # Returns the first GlobalVariable in the collection.
112
112
  def first
113
- GlobalValue.from_ptr(C.get_first_global(@module))
113
+ GlobalVariable.from_ptr(C.get_first_global(@module))
114
114
  end
115
115
 
116
116
  # Returns the last GlobalVariable in the collection.
117
117
  def last
118
- GlobalValue.from_ptr(C.get_last_global(@module))
118
+ GlobalVariable.from_ptr(C.get_last_global(@module))
119
119
  end
120
120
 
121
121
  # Returns the next GlobalVariable in the collection after global.
122
122
  def next(global)
123
- GlobalValue.from_ptr(C.get_next_global(global))
123
+ GlobalVariable.from_ptr(C.get_next_global(global))
124
124
  end
125
125
 
126
126
  # Returns the previous GlobalVariable in the collection before global.
127
127
  def previous(global)
128
- GlobalValue.from_ptr(C.get_previous_global(global))
128
+ GlobalVariable.from_ptr(C.get_previous_global(global))
129
129
  end
130
130
 
131
131
  # Deletes the GlobalVariable from the collection.
@@ -368,7 +368,7 @@ module LLVM
368
368
  end
369
369
 
370
370
  def self.string_in_context(context, str, null_terminate = true)
371
- from_ptr(C.const_string_in_context(context, str, str.length, null_terminate ? 0 : 1))
371
+ from_ptr(C.const_string_in_context2(context, str, str.length, null_terminate ? 0 : 1))
372
372
  end
373
373
 
374
374
  # ConstantArray.const(type, 3) {|i| ... } or
data/lib/llvm/core_ffi.rb CHANGED
@@ -4,13 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
8
-
9
- def self.attach_function(name, *_)
10
- begin; super; rescue FFI::NotFoundError => e
11
- (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
12
- end
13
- end
7
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
14
8
 
15
9
  # (Not documented)
16
10
  #
@@ -743,57 +737,6 @@ module LLVM::C
743
737
  :sequentially_consistent, 7
744
738
  ]
745
739
 
746
- # (Not documented)
747
- #
748
- # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:atomic_rmw_bin_op).</em>
749
- #
750
- # === Options:
751
- # :xchg ::
752
- #
753
- # :add ::
754
- # < Set the new value and return the one old
755
- # :sub ::
756
- # < Add a value and return the old one
757
- # :and_ ::
758
- # < Subtract a value and return the old one
759
- # :nand ::
760
- # < And a value and return the old one
761
- # :or_ ::
762
- # < Not-And a value and return the old one
763
- # :xor ::
764
- # < OR a value and return the old one
765
- # :max ::
766
- # < Xor a value and return the old one
767
- # :min ::
768
- # < Sets the value if it's greater than the
769
- # original using a signed comparison and return
770
- # the old one
771
- # :u_max ::
772
- # < Sets the value if it's Smaller than the
773
- # original using a signed comparison and return
774
- # the old one
775
- # :u_min ::
776
- # < Sets the value if it's greater than the
777
- # original using an unsigned comparison and return
778
- # the old one
779
- #
780
- # @method _enum_atomic_rmw_bin_op_
781
- # @return [Symbol]
782
- # @scope class
783
- enum :atomic_rmw_bin_op, [
784
- :xchg, 0,
785
- :add, 1,
786
- :sub, 2,
787
- :and_, 3,
788
- :nand, 4,
789
- :or_, 5,
790
- :xor, 6,
791
- :max, 7,
792
- :min, 8,
793
- :u_max, 9,
794
- :u_min, 10
795
- ]
796
-
797
740
  # (Not documented)
798
741
  #
799
742
  # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:diagnostic_severity).</em>
@@ -820,12 +763,6 @@ module LLVM::C
820
763
 
821
764
  # @}
822
765
  #
823
- # @method initialize_core(r)
824
- # @param [FFI::Pointer(PassRegistryRef)] r
825
- # @return [nil]
826
- # @scope class
827
- attach_function :initialize_core, :LLVMInitializeCore, [:pointer], :void
828
-
829
766
  # Deallocate and destroy all ManagedStatic variables.
830
767
  # @see llvm::llvm_shutdown
831
768
  # @see ManagedStatic
@@ -2744,19 +2681,6 @@ module LLVM::C
2744
2681
  # @scope class
2745
2682
  attach_function :const_real_get_double, :LLVMConstRealGetDouble, [:pointer, :pointer], :double
2746
2683
 
2747
- # Create a ConstantDataSequential and initialize it with a string.
2748
- #
2749
- # @see llvm::ConstantDataArray::getString()
2750
- #
2751
- # @method const_string_in_context(c, str, length, dont_null_terminate)
2752
- # @param [FFI::Pointer(ContextRef)] c
2753
- # @param [String] str
2754
- # @param [Integer] length
2755
- # @param [Integer] dont_null_terminate
2756
- # @return [FFI::Pointer(ValueRef)]
2757
- # @scope class
2758
- attach_function :const_string_in_context, :LLVMConstStringInContext, [:pointer, :string, :uint, :int], :pointer
2759
-
2760
2684
  # Create a ConstantDataSequential with string content in the global context.
2761
2685
  #
2762
2686
  # This is the same as LLVMConstStringInContext except it operates on the
@@ -2922,14 +2846,6 @@ module LLVM::C
2922
2846
  # @scope class
2923
2847
  attach_function :const_nuw_neg, :LLVMConstNUWNeg, [:pointer], :pointer
2924
2848
 
2925
- # (Not documented)
2926
- #
2927
- # @method const_f_neg(constant_val)
2928
- # @param [FFI::Pointer(ValueRef)] constant_val
2929
- # @return [FFI::Pointer(ValueRef)]
2930
- # @scope class
2931
- attach_function :const_f_neg, :LLVMConstFNeg, [:pointer], :pointer
2932
-
2933
2849
  # (Not documented)
2934
2850
  #
2935
2851
  # @method const_not(constant_val)
@@ -3028,55 +2944,6 @@ module LLVM::C
3028
2944
  # @scope class
3029
2945
  attach_function :const_xor, :LLVMConstXor, [:pointer, :pointer], :pointer
3030
2946
 
3031
- # (Not documented)
3032
- #
3033
- # @method const_i_cmp(predicate, lhs_constant, rhs_constant)
3034
- # @param [Symbol from _enum_int_predicate_] predicate
3035
- # @param [FFI::Pointer(ValueRef)] lhs_constant
3036
- # @param [FFI::Pointer(ValueRef)] rhs_constant
3037
- # @return [FFI::Pointer(ValueRef)]
3038
- # @scope class
3039
- attach_function :const_i_cmp, :LLVMConstICmp, [:int_predicate, :pointer, :pointer], :pointer
3040
-
3041
- # (Not documented)
3042
- #
3043
- # @method const_f_cmp(predicate, lhs_constant, rhs_constant)
3044
- # @param [Symbol from _enum_real_predicate_] predicate
3045
- # @param [FFI::Pointer(ValueRef)] lhs_constant
3046
- # @param [FFI::Pointer(ValueRef)] rhs_constant
3047
- # @return [FFI::Pointer(ValueRef)]
3048
- # @scope class
3049
- attach_function :const_f_cmp, :LLVMConstFCmp, [:real_predicate, :pointer, :pointer], :pointer
3050
-
3051
- # (Not documented)
3052
- #
3053
- # @method const_shl(lhs_constant, rhs_constant)
3054
- # @param [FFI::Pointer(ValueRef)] lhs_constant
3055
- # @param [FFI::Pointer(ValueRef)] rhs_constant
3056
- # @return [FFI::Pointer(ValueRef)]
3057
- # @scope class
3058
- attach_function :const_shl, :LLVMConstShl, [:pointer, :pointer], :pointer
3059
-
3060
- # (Not documented)
3061
- #
3062
- # @method const_gep(constant_val, constant_indices, num_indices)
3063
- # @param [FFI::Pointer(ValueRef)] constant_val
3064
- # @param [FFI::Pointer(*ValueRef)] constant_indices
3065
- # @param [Integer] num_indices
3066
- # @return [FFI::Pointer(ValueRef)]
3067
- # @scope class
3068
- attach_function :const_gep, :LLVMConstGEP, [:pointer, :pointer, :uint], :pointer
3069
-
3070
- # (Not documented)
3071
- #
3072
- # @method const_in_bounds_gep(constant_val, constant_indices, num_indices)
3073
- # @param [FFI::Pointer(ValueRef)] constant_val
3074
- # @param [FFI::Pointer(*ValueRef)] constant_indices
3075
- # @param [Integer] num_indices
3076
- # @return [FFI::Pointer(ValueRef)]
3077
- # @scope class
3078
- attach_function :const_in_bounds_gep, :LLVMConstInBoundsGEP, [:pointer, :pointer, :uint], :pointer
3079
-
3080
2947
  # (Not documented)
3081
2948
  #
3082
2949
  # @method const_trunc(constant_val, to_type)
@@ -3140,16 +3007,6 @@ module LLVM::C
3140
3007
  # @scope class
3141
3008
  attach_function :const_pointer_cast, :LLVMConstPointerCast, [:pointer, :pointer], :pointer
3142
3009
 
3143
- # (Not documented)
3144
- #
3145
- # @method const_select(constant_condition, constant_if_true, constant_if_false)
3146
- # @param [FFI::Pointer(ValueRef)] constant_condition
3147
- # @param [FFI::Pointer(ValueRef)] constant_if_true
3148
- # @param [FFI::Pointer(ValueRef)] constant_if_false
3149
- # @return [FFI::Pointer(ValueRef)]
3150
- # @scope class
3151
- attach_function :const_select, :LLVMConstSelect, [:pointer, :pointer, :pointer], :pointer
3152
-
3153
3010
  # (Not documented)
3154
3011
  #
3155
3012
  # @method const_extract_element(vector_constant, index_constant)
@@ -3486,15 +3343,6 @@ module LLVM::C
3486
3343
  #
3487
3344
  # @{
3488
3345
  #
3489
- # @method add_alias(m, ty, aliasee, name)
3490
- # @param [FFI::Pointer(ModuleRef)] m
3491
- # @param [FFI::Pointer(TypeRef)] ty
3492
- # @param [FFI::Pointer(ValueRef)] aliasee
3493
- # @param [String] name
3494
- # @return [FFI::Pointer(ValueRef)]
3495
- # @scope class
3496
- attach_function :add_alias, :LLVMAddAlias, [:pointer, :pointer, :pointer, :string], :pointer
3497
-
3498
3346
  # Remove a function from its containing module and deletes it.
3499
3347
  #
3500
3348
  # @see llvm::Function::eraseFromParent()
@@ -5396,17 +5244,6 @@ module LLVM::C
5396
5244
  # @scope class
5397
5245
  attach_function :build_is_not_null, :LLVMBuildIsNotNull, [:pointer, :pointer, :string], :pointer
5398
5246
 
5399
- # (Not documented)
5400
- #
5401
- # @method build_ptr_diff(builder_ref, lhs, rhs, name)
5402
- # @param [FFI::Pointer(BuilderRef)] builder_ref
5403
- # @param [FFI::Pointer(ValueRef)] lhs
5404
- # @param [FFI::Pointer(ValueRef)] rhs
5405
- # @param [String] name
5406
- # @return [FFI::Pointer(ValueRef)]
5407
- # @scope class
5408
- attach_function :build_ptr_diff, :LLVMBuildPtrDiff, [:pointer, :pointer, :pointer, :string], :pointer
5409
-
5410
5247
  # (Not documented)
5411
5248
  #
5412
5249
  # @method build_fence(b, ordering, single_thread, name)
@@ -5418,19 +5255,6 @@ module LLVM::C
5418
5255
  # @scope class
5419
5256
  attach_function :build_fence, :LLVMBuildFence, [:pointer, :atomic_ordering, :int, :string], :pointer
5420
5257
 
5421
- # (Not documented)
5422
- #
5423
- # @method build_atomic_rmw(b, op, ptr, val, ordering, single_thread)
5424
- # @param [FFI::Pointer(BuilderRef)] b
5425
- # @param [Symbol from _enum_atomic_rmw_bin_op_] op
5426
- # @param [FFI::Pointer(ValueRef)] ptr
5427
- # @param [FFI::Pointer(ValueRef)] val
5428
- # @param [Symbol from _enum_atomic_ordering_] ordering
5429
- # @param [Integer] single_thread
5430
- # @return [FFI::Pointer(ValueRef)]
5431
- # @scope class
5432
- attach_function :build_atomic_rmw, :LLVMBuildAtomicRMW, [:pointer, :atomic_rmw_bin_op, :pointer, :pointer, :atomic_ordering, :int], :pointer
5433
-
5434
5258
  # Changes the type of M so it can be passed to FunctionPassManagers and the
5435
5259
  # JIT. They take ModuleProviders for historical reasons.
5436
5260
  #
@@ -5514,14 +5338,6 @@ module LLVM::C
5514
5338
  # @scope class
5515
5339
  attach_function :dispose_memory_buffer, :LLVMDisposeMemoryBuffer, [:pointer], :void
5516
5340
 
5517
- # Return the global pass registry, for use with initialization functions.
5518
- # @see llvm::PassRegistry::getPassRegistry
5519
- #
5520
- # @method get_global_pass_registry()
5521
- # @return [FFI::Pointer(PassRegistryRef)]
5522
- # @scope class
5523
- attach_function :get_global_pass_registry, :LLVMGetGlobalPassRegistry, [], :pointer
5524
-
5525
5341
  # Constructs a new whole-module pass pipeline. This type of pipeline is
5526
5342
  # suitable for link-time optimization and whole-module transformations.
5527
5343
  # @see llvm::PassManager::PassManager
@@ -284,7 +284,7 @@ module LLVM
284
284
  # @param [Integer] dont_null_terminate
285
285
  # @return [FFI::Pointer(ValueRef)]
286
286
  # @scope class
287
- attach_function :const_string_in_context, :LLVMConstStringInContext, [:pointer, :string, :size_t, :int], :pointer
287
+ attach_function :const_string_in_context2, :LLVMConstStringInContext2, [:pointer, :string, :size_t, :int], :pointer
288
288
 
289
289
  # Determine whether the specified constant instance is constant.
290
290
  #
@@ -4,14 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
8
-
9
- def self.attach_function(name, *_)
10
- begin; super; rescue FFI::NotFoundError => e
11
- (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
12
- end
13
- end
14
-
7
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
15
8
  # @defgroup LLVMCExecutionEngine Execution Engine
16
9
  # @ingroup LLVMC
17
10
  #
@@ -4,14 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
8
-
9
- def self.attach_function(name, *_)
10
- begin; super; rescue FFI::NotFoundError => e
11
- (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
12
- end
13
- end
14
-
7
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
15
8
  # This enum is provided for backwards-compatibility only. It has no effect.
16
9
  #
17
10
  # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:linker_mode).</em>
data/lib/llvm/lljit.rb CHANGED
@@ -46,8 +46,7 @@ module LLVM
46
46
  module C
47
47
  extend FFI::Library
48
48
  ffi_lib_flags(:lazy, :global)
49
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
50
-
49
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
51
50
  attach_function :create_lljit_builder, :LLVMOrcCreateLLJITBuilder, [], :pointer
52
51
  attach_function :dispose_lljit_builder, :LLVMOrcDisposeLLJITBuilder, [:pointer], :void
53
52
 
@@ -3,20 +3,19 @@
3
3
  module LLVM
4
4
  class PassBuilder # rubocop:disable Metrics/ClassLength
5
5
  extend FFI::Library
6
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
7
-
6
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
8
7
  attr_reader :passes
9
8
  attr_accessor :inliner_threshold, :merge_functions
10
9
 
11
10
  # rubocop:disable Layout/LineLength
12
11
  OPT_PASSES = {
13
12
  # :nocov:
14
- '0' => 'always-inline,coro-cond(coro-early,cgscc(coro-split),coro-cleanup,globaldce),function(annotation-remarks),verify',
15
- '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=1;no-use-loop-info;no-verify-fixpoint>,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>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,memcpyopt,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O1>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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',
16
- '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=1;no-use-loop-info;no-verify-fixpoint>,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>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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,constraint-elimination,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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',
17
- '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=1;no-use-loop-info;no-verify-fixpoint>,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>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,argpromotion,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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,constraint-elimination,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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',
18
- '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=1;no-use-loop-info;no-verify-fixpoint>,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>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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,constraint-elimination,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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',
19
- '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=1;no-use-loop-info;no-verify-fixpoint>,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>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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,constraint-elimination,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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',
13
+ '0' => 'function(ee-instrument<>),always-inline,coro-cond(coro-early,cgscc(coro-split),coro-cleanup,globaldce),function(annotation-remarks),verify',
14
+ '1' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,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;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,loop-deletion,loop-unroll-full),sroa<modify-cfg>,memcpyopt,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O1>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
15
+ '2' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,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;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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;no-speculate-unpredictables>,reassociate,constraint-elimination,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
16
+ '3' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,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;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>,callsite-splitting),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,argpromotion,openmp-opt-cgscc,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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;no-speculate-unpredictables>,reassociate,constraint-elimination,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O3>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
17
+ 's' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,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;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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;no-speculate-unpredictables>,reassociate,constraint-elimination,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,slp-vectorizer,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
18
+ 'z' => 'annotation2metadata,forceattrs,inferattrs,coro-early,function<eager-inv>(ee-instrument<>,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;no-speculate-unpredictables>,sroa<modify-cfg>,early-cse<>),openmp-opt,ipsccp,called-value-propagation,globalopt,function<eager-inv>(mem2reg,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>),always-inline,require<globals-aa>,function(invalidate<aa>),require<profile-summary>,cgscc(devirt<4>(inline,function-attrs<skip-non-recursive-function-attrs>,function<eager-inv;no-rerun>(sroa<modify-cfg>,early-cse<memssa>,speculative-execution<only-if-divergent-target>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,aggressive-instcombine,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;no-speculate-unpredictables>,reassociate,constraint-elimination,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop(loop-idiom,indvars,simple-loop-unswitch<no-nontrivial;trivial>,loop-deletion,loop-unroll-full),sroa<modify-cfg>,vector-combine,mldst-motion<no-split-footer-bb>,gvn<>,sccp,bdce,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>),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;>,infer-alignment,loop-load-elim,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;no-speculate-unpredictables>,vector-combine,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,loop-unroll<O2>,transform-warning,sroa<preserve-cfg>,infer-alignment,instcombine<max-iterations=1;no-use-loop-info;no-verify-fixpoint>,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;speculate-unpredictables>),globaldce,constmerge,cg-profile,rel-lookup-table-converter,function(annotation-remarks),verify',
20
19
  # :nocov:
21
20
  }.freeze
22
21
  # rubocop:enable Layout/LineLength
@@ -217,10 +216,8 @@ module LLVM
217
216
 
218
217
  # @return self
219
218
  def lower_atomic!
220
- # TODO: change in LLVM-19
221
- add_pass('loweratomic')
219
+ add_pass('lower-atomic')
222
220
  end
223
-
224
221
  alias_method :loweratomic!, :lower_atomic!
225
222
 
226
223
  # @return self
@@ -397,8 +394,7 @@ module LLVM
397
394
 
398
395
  # @return self
399
396
  def lower_switch!
400
- # TODO: change in LLVM-19
401
- add_pass('lowerswitch')
397
+ add_pass('lower-switch')
402
398
  end
403
399
 
404
400
  alias_method :lowerswitch!, :lower_switch!
@@ -685,6 +681,64 @@ module LLVM
685
681
  warn('constprop! / LLVMAddConstantPropagationPass was removed from LLVM')
686
682
  end
687
683
 
684
+ def expand_variadics!
685
+ add_pass('expand-variadics')
686
+ end
687
+
688
+ def pgo_force_function_attrs!
689
+ add_pass('pgo-force-function-attrs')
690
+ end
691
+
692
+ def nsan!
693
+ add_pass('nsan')
694
+ end
695
+
696
+ def pre_isel_intrinsic_lowering!
697
+ add_pass('pre-isel-intrinsic-lowering')
698
+ end
699
+
700
+ def atomic_expand!
701
+ add_pass('atomic-expand')
702
+ end
703
+
704
+ def jump_table_to_switch!
705
+ add_pass('jump-table-to-switch')
706
+ end
707
+
708
+ def lower_allow_check!
709
+ add_pass('lower-allow-check')
710
+ end
711
+
712
+ def lower_invoke!
713
+ add_pass('lower-invoke')
714
+ end
715
+
716
+ alias_method :lowerinvoke!, :lower_invoke!
717
+
718
+ def lower_guard_intrinsic!
719
+ add_pass('lower-guard-intrinsic')
720
+ end
721
+
722
+ def lower_widenable_condition!
723
+ add_pass('lower-widenable-condition')
724
+ end
725
+
726
+ def transform_warning!
727
+ add_pass('transform-warning')
728
+ end
729
+
730
+ def trigger_crash_function!
731
+ add_pass('trigger-crash-function')
732
+ end
733
+
734
+ def trigger_verifier_error!
735
+ add_pass('trigger-verifier-error')
736
+ end
737
+
738
+ def loop_idiom_vectorize!
739
+ add_pass('loop-idiom-vectorize')
740
+ end
741
+
688
742
  private
689
743
 
690
744
  attr_writer :passes
data/lib/llvm/target.rb CHANGED
@@ -25,8 +25,7 @@ module LLVM
25
25
 
26
26
  module TargetModule
27
27
  extend FFI::Library
28
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
29
-
28
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
30
29
  def self.safe_attach_function(*args)
31
30
  attach_function(*args)
32
31
  rescue FFI::NotFoundError => e
@@ -4,14 +4,7 @@ require 'ffi'
4
4
 
5
5
  module LLVM::C
6
6
  extend FFI::Library
7
- ffi_lib ["libLLVM-18.so.1", "libLLVM.so.18", "LLVM-18"]
8
-
9
- def self.attach_function(name, *_)
10
- begin; super; rescue FFI::NotFoundError => e
11
- (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
12
- end
13
- end
14
-
7
+ ffi_lib ["LLVM-19", "libLLVM-19.so.1", "libLLVM.so.19", "libLLVM.so.19.1"]
15
8
  # (Not documented)
16
9
  #
17
10
  # <em>This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:byte_ordering).</em>
@@ -45,70 +38,70 @@ module LLVM::C
45
38
  # @method initialize_all_target_infos()
46
39
  # @return [nil]
47
40
  # @scope class
48
- attach_function :initialize_all_target_infos, :LLVMInitializeAllTargetInfos, [], :void
41
+ # attach_function :initialize_all_target_infos, :LLVMInitializeAllTargetInfos, [], :void
49
42
 
50
43
  # (Not documented)
51
44
  #
52
45
  # @method initialize_all_targets()
53
46
  # @return [nil]
54
47
  # @scope class
55
- attach_function :initialize_all_targets, :LLVMInitializeAllTargets, [], :void
48
+ # attach_function :initialize_all_targets, :LLVMInitializeAllTargets, [], :void
56
49
 
57
50
  # (Not documented)
58
51
  #
59
52
  # @method initialize_all_target_m_cs()
60
53
  # @return [nil]
61
54
  # @scope class
62
- attach_function :initialize_all_target_m_cs, :LLVMInitializeAllTargetMCs, [], :void
55
+ # attach_function :initialize_all_target_m_cs, :LLVMInitializeAllTargetMCs, [], :void
63
56
 
64
57
  # (Not documented)
65
58
  #
66
59
  # @method initialize_all_asm_printers()
67
60
  # @return [nil]
68
61
  # @scope class
69
- attach_function :initialize_all_asm_printers, :LLVMInitializeAllAsmPrinters, [], :void
62
+ # attach_function :initialize_all_asm_printers, :LLVMInitializeAllAsmPrinters, [], :void
70
63
 
71
64
  # (Not documented)
72
65
  #
73
66
  # @method initialize_all_asm_parsers()
74
67
  # @return [nil]
75
68
  # @scope class
76
- attach_function :initialize_all_asm_parsers, :LLVMInitializeAllAsmParsers, [], :void
69
+ # attach_function :initialize_all_asm_parsers, :LLVMInitializeAllAsmParsers, [], :void
77
70
 
78
71
  # (Not documented)
79
72
  #
80
73
  # @method initialize_all_disassemblers()
81
74
  # @return [nil]
82
75
  # @scope class
83
- attach_function :initialize_all_disassemblers, :LLVMInitializeAllDisassemblers, [], :void
76
+ # attach_function :initialize_all_disassemblers, :LLVMInitializeAllDisassemblers, [], :void
84
77
 
85
78
  # (Not documented)
86
79
  #
87
80
  # @method initialize_native_target()
88
81
  # @return [Integer]
89
82
  # @scope class
90
- attach_function :initialize_native_target, :LLVMInitializeNativeTarget, [], :int
83
+ # attach_function :initialize_native_target, :LLVMInitializeNativeTarget, [], :int
91
84
 
92
85
  # (Not documented)
93
86
  #
94
87
  # @method initialize_native_asm_parser()
95
88
  # @return [Integer]
96
89
  # @scope class
97
- attach_function :initialize_native_asm_parser, :LLVMInitializeNativeAsmParser, [], :int
90
+ # attach_function :initialize_native_asm_parser, :LLVMInitializeNativeAsmParser, [], :int
98
91
 
99
92
  # (Not documented)
100
93
  #
101
94
  # @method initialize_native_asm_printer()
102
95
  # @return [Integer]
103
96
  # @scope class
104
- attach_function :initialize_native_asm_printer, :LLVMInitializeNativeAsmPrinter, [], :int
97
+ # attach_function :initialize_native_asm_printer, :LLVMInitializeNativeAsmPrinter, [], :int
105
98
 
106
99
  # (Not documented)
107
100
  #
108
101
  # @method initialize_native_disassembler()
109
102
  # @return [Integer]
110
103
  # @scope class
111
- attach_function :initialize_native_disassembler, :LLVMInitializeNativeDisassembler, [], :int
104
+ # attach_function :initialize_native_disassembler, :LLVMInitializeNativeDisassembler, [], :int
112
105
 
113
106
  # (Not documented)
114
107
  #
@@ -309,26 +302,7 @@ module LLVM::C
309
302
  layout :dummy, :char
310
303
  end
311
304
 
312
- # (Not documented)
313
- module TargetWrappers
314
- # @return [Integer]
315
- def has_jit()
316
- LLVM::C.target_has_jit(self)
317
- end
318
-
319
- # @return [Integer]
320
- def has_target_machine()
321
- LLVM::C.target_has_target_machine(self)
322
- end
323
-
324
- # @return [Integer]
325
- def has_asm_backend()
326
- LLVM::C.target_has_asm_backend(self)
327
- end
328
- end
329
-
330
305
  class Target < FFI::Struct
331
- include TargetWrappers
332
306
  layout :dummy, :char
333
307
  end
334
308
 
data/lib/llvm/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LLVM
4
- LLVM_VERSION = "18"
5
- LLVM_REQUIRED_VERSION = "18.1.8"
6
- RUBY_LLVM_VERSION = "18.2.0"
4
+ LLVM_VERSION = "19"
5
+ LLVM_REQUIRED_VERSION = "19.1.0"
6
+ RUBY_LLVM_VERSION = "19.1.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-llvm
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.2.0
4
+ version: 19.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Johnson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-09-16 00:00:00.000000000 Z
12
+ date: 2024-09-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi