Skip to content

Commit

Permalink
Merge pull request #240 from ruby-llvm/partial-inliner-pass
Browse files Browse the repository at this point in the history
Add partial_inliner! pass
  • Loading branch information
thoughtafter committed Apr 15, 2024
2 parents 389d3cb + 636df8d commit 91ba457
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [Unreleased]
### Added
- partial_inliner! pass

## [18.1.3] - 2024-04-06
### Changed
- Deprecate unwind instruction
- Attribute to_s and inspect call LLVM Attribute::getAsString() for a better and more consistent string
Expand Down
11 changes: 11 additions & 0 deletions lib/llvm/transforms/pass_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,17 @@ def always_inline!
add_pass('always-inline')
end

# This pass performs partial inlining, typically by inlining an if statement
# that surrounds the body of the function.
# https://llvm.org/doxygen/PartialInlining_8h_source.html
# https://llvm.org/doxygen/PartialInlining_8cpp_source.html
# https://llvm.org/doxygen/PartialInlining_8h.html
# https://llvm.org/doxygen/PartialInlining_8cpp.html
# @return self
def partial_inliner!
add_pass('partial-inliner')
end

# This pass looks for equivalent functions that are mergable and folds them.
# https://llvm.org/docs/MergeFunctions.html
# https://llvm.org/doxygen/MergeFunctions_8cpp_source.html
Expand Down

0 comments on commit 91ba457

Please sign in to comment.