ruby-llvm 18.2.0 → 19.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/ruby-llvm-support/Rakefile +18 -17
- data/lib/llvm/analysis.rb +4 -0
- data/lib/llvm/analysis_ffi.rb +1 -8
- data/lib/llvm/config.rb +1 -1
- data/lib/llvm/core/bitcode_ffi.rb +1 -8
- data/lib/llvm/core/module.rb +5 -5
- data/lib/llvm/core/type.rb +25 -8
- data/lib/llvm/core/value.rb +13 -2
- data/lib/llvm/core_ffi.rb +1 -185
- data/lib/llvm/core_ffi_v2.rb +1 -1
- data/lib/llvm/execution_engine_ffi.rb +1 -8
- data/lib/llvm/linker_ffi.rb +1 -8
- data/lib/llvm/lljit.rb +1 -2
- data/lib/llvm/pass_builder.rb +67 -13
- data/lib/llvm/target.rb +1 -2
- data/lib/llvm/target_ffi.rb +11 -37
- data/lib/llvm/version.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df367b2c98f260a385eaadca04206f2a7f71a9354b2e2584be63ac33fd28b122
|
4
|
+
data.tar.gz: 478b9eea54dd4686fba6d6643965be3aa21570906dcf6b95df4b8b6a5101ff0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71f91dd881e22562015aba5cd9d818f949f460f44a7e4d0dd12850d95aefdfd512db2c9fc9131db0515947a0a31e0afe806cc55b8d5bbc185cd16fb3fa282eea
|
7
|
+
data.tar.gz: 21a4ea3e227b4c127ac5212cd705fae433a571be7524fe3c4e14b48c3e0eec1e10c5642c4c47ff773432bceec862cf07199d148e407caa384dfe761dbc380b3d
|
@@ -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 = [
|
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
|
-
|
24
|
-
|
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
|
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
|
49
|
-
system(cxx,
|
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",
|
55
|
+
`#{LLVM_CONFIG} #{options}`.tr("\n", ' ').strip
|
59
56
|
end
|
60
57
|
|
61
|
-
|
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
|
76
|
-
task :
|
75
|
+
desc 'Build the shared library and config module'
|
76
|
+
task default: [SUPPORT_LIB, CONFIG_MOD]
|
77
77
|
|
78
|
-
file SUPPORT_LIB => %w
|
79
|
-
sh "#{CXX} -O3 -shared #{task.prerequisites.join(' ')}
|
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',
|
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?
|
data/lib/llvm/analysis_ffi.rb
CHANGED
@@ -4,14 +4,7 @@ require 'ffi'
|
|
4
4
|
|
5
5
|
module LLVM::C
|
6
6
|
extend FFI::Library
|
7
|
-
ffi_lib ["libLLVM-
|
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
|
#
|
data/lib/llvm/config.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by ruby-llvm. Please do not change this file by hand.
|
2
2
|
module LLVM
|
3
3
|
module CONFIG
|
4
|
-
VERSION = "19.1.
|
4
|
+
VERSION = "19.1.2"
|
5
5
|
COMPONENTS = ["aarch64", "aarch64asmparser", "aarch64codegen", "aarch64desc", "aarch64disassembler", "aarch64info", "aarch64utils", "aggressiveinstcombine", "all", "all-targets", "amdgpu", "amdgpuasmparser", "amdgpucodegen", "amdgpudesc", "amdgpudisassembler", "amdgpuinfo", "amdgputargetmca", "amdgpuutils", "analysis", "arm", "armasmparser", "armcodegen", "armdesc", "armdisassembler", "arminfo", "armutils", "asmparser", "asmprinter", "avr", "avrasmparser", "avrcodegen", "avrdesc", "avrdisassembler", "avrinfo", "binaryformat", "bitreader", "bitstreamreader", "bitwriter", "bpf", "bpfasmparser", "bpfcodegen", "bpfdesc", "bpfdisassembler", "bpfinfo", "cfguard", "codegen", "codegendata", "codegentypes", "core", "coroutines", "coverage", "debuginfobtf", "debuginfocodeview", "debuginfodwarf", "debuginfogsym", "debuginfologicalview", "debuginfomsf", "debuginfopdb", "demangle", "dlltooldriver", "dwarflinker", "dwarflinkerclassic", "dwarflinkerparallel", "dwp", "engine", "executionengine", "extensions", "filecheck", "frontenddriver", "frontendhlsl", "frontendoffloading", "frontendopenacc", "frontendopenmp", "fuzzercli", "fuzzmutate", "globalisel", "hexagon", "hexagonasmparser", "hexagoncodegen", "hexagondesc", "hexagondisassembler", "hexagoninfo", "hipstdpar", "instcombine", "instrumentation", "interfacestub", "interpreter", "ipo", "irprinter", "irreader", "jitlink", "lanai", "lanaiasmparser", "lanaicodegen", "lanaidesc", "lanaidisassembler", "lanaiinfo", "libdriver", "lineeditor", "linker", "loongarch", "loongarchasmparser", "loongarchcodegen", "loongarchdesc", "loongarchdisassembler", "loongarchinfo", "lto", "m68k", "m68kasmparser", "m68kcodegen", "m68kdesc", "m68kdisassembler", "m68kinfo", "mc", "mca", "mcdisassembler", "mcjit", "mcparser", "mips", "mipsasmparser", "mipscodegen", "mipsdesc", "mipsdisassembler", "mipsinfo", "mirparser", "msp430", "msp430asmparser", "msp430codegen", "msp430desc", "msp430disassembler", "msp430info", "native", "nativecodegen", "nvptx", "nvptxcodegen", "nvptxdesc", "nvptxinfo", "objcarcopts", "objcopy", "object", "objectyaml", "option", "orcdebugging", "orcjit", "orcshared", "orctargetprocess", "passes", "perfjitevents", "powerpc", "powerpcasmparser", "powerpccodegen", "powerpcdesc", "powerpcdisassembler", "powerpcinfo", "profiledata", "remarks", "riscv", "riscvasmparser", "riscvcodegen", "riscvdesc", "riscvdisassembler", "riscvinfo", "riscvtargetmca", "runtimedyld", "sandboxir", "scalaropts", "selectiondag", "sparc", "sparcasmparser", "sparccodegen", "sparcdesc", "sparcdisassembler", "sparcinfo", "support", "symbolize", "systemz", "systemzasmparser", "systemzcodegen", "systemzdesc", "systemzdisassembler", "systemzinfo", "tablegen", "target", "targetparser", "textapi", "textapibinaryreader", "transformutils", "ve", "veasmparser", "vecodegen", "vectorize", "vedesc", "vedisassembler", "veinfo", "webassembly", "webassemblyasmparser", "webassemblycodegen", "webassemblydesc", "webassemblydisassembler", "webassemblyinfo", "webassemblyutils", "windowsdriver", "windowsmanifest", "x86", "x86asmparser", "x86codegen", "x86desc", "x86disassembler", "x86info", "x86targetmca", "xcore", "xcorecodegen", "xcoredesc", "xcoredisassembler", "xcoreinfo", "xray", "xtensa", "xtensaasmparser", "xtensacodegen", "xtensadesc", "xtensadisassembler", "xtensainfo"]
|
6
6
|
TARGETS_BUILT = ["AArch64", "AMDGPU", "ARM", "AVR", "BPF", "Hexagon", "Lanai", "LoongArch", "Mips", "MSP430", "NVPTX", "PowerPC", "RISCV", "Sparc", "SystemZ", "VE", "WebAssembly", "X86", "XCore", "M68k", "Xtensa"]
|
7
7
|
HOST_TARGET = "x86_64-pc-linux-gnu"
|
@@ -4,14 +4,7 @@ require 'ffi'
|
|
4
4
|
|
5
5
|
module LLVM::C
|
6
6
|
extend FFI::Library
|
7
|
-
ffi_lib ["libLLVM-
|
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)
|
data/lib/llvm/core/module.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
128
|
+
GlobalVariable.from_ptr(C.get_previous_global(global))
|
129
129
|
end
|
130
130
|
|
131
131
|
# Deletes the GlobalVariable from the collection.
|
data/lib/llvm/core/type.rb
CHANGED
@@ -228,8 +228,8 @@ module LLVM
|
|
228
228
|
C.get_int_type_width(self)
|
229
229
|
end
|
230
230
|
|
231
|
-
def
|
232
|
-
|
231
|
+
private def get_sign_option(options)
|
232
|
+
case options
|
233
233
|
when true, false
|
234
234
|
options
|
235
235
|
when Hash
|
@@ -237,11 +237,16 @@ module LLVM
|
|
237
237
|
else
|
238
238
|
raise ArgumentError
|
239
239
|
end
|
240
|
-
|
240
|
+
end
|
241
|
+
|
242
|
+
def from_i(int, options = {})
|
243
|
+
signed = get_sign_option(options)
|
241
244
|
|
242
|
-
|
243
|
-
|
244
|
-
val.
|
245
|
+
return parse(int.to_s, 0) if width > 64 || int.is_a?(String)
|
246
|
+
|
247
|
+
val = from_ptr(C.const_int(self, int, signed ? 1 : 0))
|
248
|
+
unpoisoned = val.to_i(signed) == int
|
249
|
+
unpoisoned ? val : poison
|
245
250
|
end
|
246
251
|
|
247
252
|
# unused
|
@@ -259,9 +264,21 @@ module LLVM
|
|
259
264
|
ConstantInt.from_ptr(ptr)
|
260
265
|
end
|
261
266
|
|
267
|
+
# parse string using const_int_of_string_and_size
|
268
|
+
# normalize the string to base 10 (used in llvm ir), and handle prefixes like 0x
|
269
|
+
private def const_int_of_string_and_size(str, radix)
|
270
|
+
normalized_string = radix == 10 ? str : str.to_i(radix).to_s
|
271
|
+
val = from_ptr(C.const_int_of_string_and_size(self, normalized_string, normalized_string.size, 10))
|
272
|
+
|
273
|
+
unpoisoned = normalized_string == val.to_s.split.last
|
274
|
+
unpoisoned ? val : poison
|
275
|
+
end
|
276
|
+
|
277
|
+
# parse string using const_int_of_string_and_size
|
278
|
+
# alternative implementation parsing with ruby:
|
279
|
+
# from_i(str.to_i(radix))
|
262
280
|
def parse(str, radix = 10)
|
263
|
-
|
264
|
-
from_i(str.to_i(radix))
|
281
|
+
const_int_of_string_and_size(str, radix)
|
265
282
|
end
|
266
283
|
|
267
284
|
def type
|
data/lib/llvm/core/value.rb
CHANGED
@@ -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.
|
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
|
@@ -627,13 +627,24 @@ module LLVM
|
|
627
627
|
type.from_f(to_i.to_f)
|
628
628
|
end
|
629
629
|
|
630
|
-
def
|
630
|
+
private def to_i_i64(signed)
|
631
631
|
if signed
|
632
632
|
C.const_int_get_sext_value(self)
|
633
633
|
else
|
634
634
|
C.const_int_get_zext_value(self)
|
635
635
|
end
|
636
636
|
end
|
637
|
+
|
638
|
+
# const_int_get_sext_value const_int_get_zext_value only return long long, 64-bits
|
639
|
+
# beyond 64-bits parse the string value into a ruby integer
|
640
|
+
# TODO: overflow behavior is not the same on these arms, signed is ignored above 64-bits
|
641
|
+
def to_i(signed = true)
|
642
|
+
if type.width <= 64
|
643
|
+
to_i_i64(signed)
|
644
|
+
else
|
645
|
+
to_s.split.last.to_i
|
646
|
+
end
|
647
|
+
end
|
637
648
|
end
|
638
649
|
|
639
650
|
# creates LLVM::Int1, LLVM::Int64, etc
|
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-
|
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
|
data/lib/llvm/core_ffi_v2.rb
CHANGED
@@ -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 :
|
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-
|
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
|
#
|
data/lib/llvm/linker_ffi.rb
CHANGED
@@ -4,14 +4,7 @@ require 'ffi'
|
|
4
4
|
|
5
5
|
module LLVM::C
|
6
6
|
extend FFI::Library
|
7
|
-
ffi_lib ["libLLVM-
|
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-
|
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
|
|
data/lib/llvm/pass_builder.rb
CHANGED
@@ -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-
|
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
|
-
|
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
|
-
|
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-
|
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
|
data/lib/llvm/target_ffi.rb
CHANGED
@@ -4,14 +4,7 @@ require 'ffi'
|
|
4
4
|
|
5
5
|
module LLVM::C
|
6
6
|
extend FFI::Library
|
7
|
-
ffi_lib ["libLLVM-
|
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
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:
|
4
|
+
version: 19.1.2
|
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-
|
12
|
+
date: 2024-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|