ruby-llvm 18.1.8 → 18.2.0
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 +0 -1
- data/lib/llvm/config.rb +6 -5
- data/lib/llvm/core/attribute.rb +0 -4
- data/lib/llvm/core/builder.rb +66 -19
- data/lib/llvm/core/module.rb +1 -2
- data/lib/llvm/core/type.rb +150 -13
- data/lib/llvm/core/value.rb +200 -153
- data/lib/llvm/core.rb +2 -199
- data/lib/llvm/core_ffi.rb +0 -42
- data/lib/llvm/core_ffi_v2.rb +353 -0
- data/lib/llvm/execution_engine.rb +1 -1
- data/lib/llvm/lljit.rb +0 -1
- data/lib/llvm/{transforms/pass_builder.rb → pass_builder.rb} +45 -16
- data/lib/llvm/support.rb +0 -1
- data/lib/llvm/target_ffi.rb +0 -1
- data/lib/llvm/transforms/ipo.rb +0 -1
- data/lib/llvm/transforms/scalar.rb +0 -1
- data/lib/llvm/transforms/utils.rb +0 -1
- data/lib/llvm/version.rb +1 -1
- metadata +18 -3
@@ -161,7 +161,7 @@ module LLVM
|
|
161
161
|
|
162
162
|
# @return self
|
163
163
|
def loop_reroll!
|
164
|
-
|
164
|
+
deprecated('loop-reroll pass was removed in LLVM 19')
|
165
165
|
end
|
166
166
|
|
167
167
|
# @return self
|
@@ -216,10 +216,13 @@ module LLVM
|
|
216
216
|
end
|
217
217
|
|
218
218
|
# @return self
|
219
|
-
def
|
219
|
+
def lower_atomic!
|
220
|
+
# TODO: change in LLVM-19
|
220
221
|
add_pass('loweratomic')
|
221
222
|
end
|
222
223
|
|
224
|
+
alias_method :loweratomic!, :lower_atomic!
|
225
|
+
|
223
226
|
# @return self
|
224
227
|
def partially_inline_libcalls!
|
225
228
|
add_pass('partially-inline-libcalls')
|
@@ -365,7 +368,7 @@ module LLVM
|
|
365
368
|
add_pass('require<basic-aa>')
|
366
369
|
end
|
367
370
|
|
368
|
-
|
371
|
+
alias_method :basicaa!, :basic_aa!
|
369
372
|
|
370
373
|
# @return self
|
371
374
|
def objc_arc_aa!
|
@@ -393,10 +396,13 @@ module LLVM
|
|
393
396
|
end
|
394
397
|
|
395
398
|
# @return self
|
396
|
-
def
|
399
|
+
def lower_switch!
|
400
|
+
# TODO: change in LLVM-19
|
397
401
|
add_pass('lowerswitch')
|
398
402
|
end
|
399
403
|
|
404
|
+
alias_method :lowerswitch!, :lower_switch!
|
405
|
+
|
400
406
|
# Inlines functions marked as "always_inline".
|
401
407
|
# https://llvm.org/doxygen/AlwaysInliner_8h_source.html
|
402
408
|
# https://llvm.org/doxygen/AlwaysInliner_8cpp_source.html
|
@@ -444,7 +450,7 @@ module LLVM
|
|
444
450
|
add_pass('deadargelim')
|
445
451
|
end
|
446
452
|
|
447
|
-
|
453
|
+
alias_method :dae!, :deadargelim!
|
448
454
|
|
449
455
|
# ConstantMerge is designed to build up a map of available constants and eliminate duplicates when it is initialized.
|
450
456
|
# https://llvm.org/doxygen/ConstantMerge_8cpp_source.html
|
@@ -454,7 +460,7 @@ module LLVM
|
|
454
460
|
add_pass('constmerge')
|
455
461
|
end
|
456
462
|
|
457
|
-
|
463
|
+
alias_method :const_merge!, :constmerge!
|
458
464
|
|
459
465
|
# Aggressive Dead Code Elimination
|
460
466
|
# @return self
|
@@ -467,7 +473,7 @@ module LLVM
|
|
467
473
|
add_pass('function-attrs')
|
468
474
|
end
|
469
475
|
|
470
|
-
|
476
|
+
alias_method :fun_attrs!, :function_attrs!
|
471
477
|
|
472
478
|
# @return self
|
473
479
|
def strip!
|
@@ -479,12 +485,29 @@ module LLVM
|
|
479
485
|
add_pass('strip-dead-prototypes')
|
480
486
|
end
|
481
487
|
|
482
|
-
|
488
|
+
alias_method :sdp!, :strip_dead_prototypes!
|
483
489
|
|
484
490
|
# @return self
|
485
|
-
#
|
486
|
-
|
487
|
-
|
491
|
+
# preserve_gv - true / false to support previous option of all_but_main
|
492
|
+
# otherwise preserve_gv is assumed to be an array of global variable names
|
493
|
+
# internalize<preserve-gv=GV>
|
494
|
+
# tests showing usage: https://github.com/llvm/llvm-project/blob/a4b429f9e4175a06cc95f054c5dab3d4bc8fa690/llvm/test/Transforms/Internalize/lists.ll#L17
|
495
|
+
def internalize!(preserve_gv = [])
|
496
|
+
preserved = case preserve_gv
|
497
|
+
when true
|
498
|
+
['main']
|
499
|
+
when false
|
500
|
+
[]
|
501
|
+
else
|
502
|
+
preserve_gv
|
503
|
+
end
|
504
|
+
preserved_string = preserved.map { |gv| "preserve-gv=#{gv}" }.join(';')
|
505
|
+
|
506
|
+
if preserved_string.empty?
|
507
|
+
add_pass('internalize')
|
508
|
+
else
|
509
|
+
add_pass("internalize<#{preserved_string}>")
|
510
|
+
end
|
488
511
|
end
|
489
512
|
|
490
513
|
# This pass implements interprocedural sparse conditional constant propagation and merging.
|
@@ -508,7 +531,7 @@ module LLVM
|
|
508
531
|
add_pass('globaldce')
|
509
532
|
end
|
510
533
|
|
511
|
-
|
534
|
+
alias_method :gdce!, :globaldce!
|
512
535
|
|
513
536
|
# Bit-Tracking Dead Code Elimination pass
|
514
537
|
# @return self
|
@@ -529,7 +552,7 @@ module LLVM
|
|
529
552
|
add_pass('argpromotion')
|
530
553
|
end
|
531
554
|
|
532
|
-
|
555
|
+
alias_method :arg_promote!, :argpromotion!
|
533
556
|
|
534
557
|
# The inliner pass for the new pass manager.
|
535
558
|
# https://llvm.org/doxygen/classllvm_1_1InlinerPass.html
|
@@ -635,16 +658,22 @@ module LLVM
|
|
635
658
|
deprecated('simplify_libcalls! / LLVMAddSimplifyLibCallsPass was removed from LLVM')
|
636
659
|
end
|
637
660
|
|
661
|
+
# https://reviews.llvm.org/D21316
|
638
662
|
def scalarrepl!
|
639
|
-
deprecated('
|
663
|
+
deprecated('scalarrepl was removed from LLVM in 2016 - use sroa')
|
664
|
+
sroa!
|
640
665
|
end
|
641
666
|
|
667
|
+
# https://reviews.llvm.org/D21316
|
642
668
|
def scalarrepl_ssa!
|
643
|
-
deprecated('
|
669
|
+
deprecated('scalarrepl_ssa was removed from LLVM in 2016 - use sroa')
|
670
|
+
sroa!
|
644
671
|
end
|
645
672
|
|
673
|
+
# https://reviews.llvm.org/D21316
|
646
674
|
def scalarrepl_threshold!(_threshold = 0)
|
647
|
-
deprecated('
|
675
|
+
deprecated('scalarrepl_threshold was removed from LLVM in 2016 - use sroa')
|
676
|
+
sroa!
|
648
677
|
end
|
649
678
|
|
650
679
|
def bb_vectorize!
|
data/lib/llvm/support.rb
CHANGED
data/lib/llvm/target_ffi.rb
CHANGED
data/lib/llvm/transforms/ipo.rb
CHANGED
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: 18.
|
4
|
+
version: 18.2.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-
|
12
|
+
date: 2024-09-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -87,6 +87,20 @@ dependencies:
|
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '5.16'
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: minitest-fail-fast
|
92
|
+
requirement: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
type: :development
|
98
|
+
prerelease: false
|
99
|
+
version_requirements: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
90
104
|
- !ruby/object:Gem::Dependency
|
91
105
|
name: minitest-reporters
|
92
106
|
requirement: !ruby/object:Gem::Requirement
|
@@ -202,16 +216,17 @@ files:
|
|
202
216
|
- lib/llvm/core/type.rb
|
203
217
|
- lib/llvm/core/value.rb
|
204
218
|
- lib/llvm/core_ffi.rb
|
219
|
+
- lib/llvm/core_ffi_v2.rb
|
205
220
|
- lib/llvm/execution_engine.rb
|
206
221
|
- lib/llvm/execution_engine_ffi.rb
|
207
222
|
- lib/llvm/linker.rb
|
208
223
|
- lib/llvm/linker_ffi.rb
|
209
224
|
- lib/llvm/lljit.rb
|
225
|
+
- lib/llvm/pass_builder.rb
|
210
226
|
- lib/llvm/support.rb
|
211
227
|
- lib/llvm/target.rb
|
212
228
|
- lib/llvm/target_ffi.rb
|
213
229
|
- lib/llvm/transforms/ipo.rb
|
214
|
-
- lib/llvm/transforms/pass_builder.rb
|
215
230
|
- lib/llvm/transforms/pass_manager_builder.rb
|
216
231
|
- lib/llvm/transforms/scalar.rb
|
217
232
|
- lib/llvm/transforms/utils.rb
|