Skip to content

[LLVM UPDATE] Update LLVM related dependencies Q1 2026#2415

Merged
mehrdad2m merged 14 commits into
mainfrom
update-llvm-Q1-2026
Feb 4, 2026
Merged

[LLVM UPDATE] Update LLVM related dependencies Q1 2026#2415
mehrdad2m merged 14 commits into
mainfrom
update-llvm-Q1-2026

Conversation

@mehrdad2m

@mehrdad2m mehrdad2m commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Context:
Updating LLVM related dependencies for Q1 2025. After the update we will point the following versions:

jax=0.7.1 (no change)
stablehlo=v1.13.7 -> llvm=8f264586d7521b0e305ca7bb78825aa3382ffef7 
enzyme=v0.0.238

Description of the Change:

  • Replaced rewriter/builder.create() with Op::create(rewriter/builder, ...) for operations. ([LLVM UPDATE] Refactor MLIR operations to use static creation methods #2416)

  • Updated the "how to write a pass" tutorial to use the updated creation method. ([LLVM UPDATE] Refactor MLIR operations to use static creation methods #2416)

  • Changed integer literals in InsertValueOp::create calls to SmallVector<int64_t> because MLIR introduced DenseI64ArrayAttr overloads, creating ambiguity between ArrayRef<int64_t> and DenseI64ArrayAttr when passing integer literals. ([LLVM UPDATE] Refactor MLIR operations to use static creation methods #2416)

  • Patched mlir/llvm-project/mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp to avoid the crash when importing the generated python files because JAX's LLVM version is older and doesn’t expose __class_getitem__ which causes an error complaining about indexing. see [LLVM UPDATE] Patch MLIR Python generics #2444

  • Remove the xfail for a vmap+grad test that is passing now with the update and move another two xfails inside the tests since they are now segfaulting at runtime. see [LLVM update] Fix CI segfaults in the xfailed grad+vmap tests #2445

  • Changed std::nullopt to {} for ValueRange default arguments because MLIR removed the ArrayRef(std::nullopt_t) constructor, requiring empty initializer lists instead. (6b4f790)

  • Added exactNone argument to Arith_DivSIOp pattern because the operation now requires an explicit fastmath attribute parameter in tablegen. (279cefc)

  • Fixed BufferizableOpInterfaceImpl.cpp: Added explicit cast from TensorType to TensorLikeType and BaseMemRefType to BufferLikeType because MLIR's bufferization framework now uses the TensorLikeType and BufferLikeType interface to support generic tensor/buffer types. (35b5690)

  • Fixed StringSwitch::Cases usage in to use std::initializer_list syntax because LLVM deprecated the old Cases method that took multiple string arguments in favor of a single std::initializer_list parameter. (48f97d8)

  • Fixed inferCanonicalRankReducedResultType call from 5 arguments to 3 arguments (87cf94b)

  • Added StablehloBroadcastLowering to CMakeLists.txt because StableHLO split broadcast lowering functionality into a separate library (fad13a8)

Benefits:

Possible Drawbacks:

Related GitHub Issues:
[sc-107552] [sc-107551]

@mehrdad2m mehrdad2m added do-not-merge wip PRs that are a Work-In-Progress labels Jan 19, 2026
@mehrdad2m mehrdad2m changed the title Update LLVM version Q1 2026 Update LLVM related dependencies Q1 2026 Jan 20, 2026
@mehrdad2m mehrdad2m removed do-not-merge wip PRs that are a Work-In-Progress labels Jan 28, 2026
@mehrdad2m mehrdad2m marked this pull request as ready for review January 28, 2026 23:07
@mehrdad2m mehrdad2m changed the title Update LLVM related dependencies Q1 2026 [LLVM UPDATE] Update LLVM related dependencies Q1 2026 Jan 28, 2026
@mehrdad2m mehrdad2m requested a review from a team January 28, 2026 23:18
@mehrdad2m

Copy link
Copy Markdown
Contributor Author

Note that the CI would not pass until the other dependant PRs targeting this are merged first.

…#2416)

**Context:**
llvm/llvm-project#147168 in LLVM adds concrete
static methods for operation creation that are attached to the operation
instead of the builder.
Recently the old `rewriter.create<Op>()` method is
[deprecated](llvm/llvm-project#164649).

This PR updates operations to utilize static creation methods instead of
the deprecated version.

**Description of the Change:**
- Replaced `rewriter/builder.create<Op>()` with
`Op::create(rewriter/builder, ...)` for operations.
- Updated the "how to write a pass" tutorial to use the updated creation
method.
- Changed integer literals in `InsertValueOp::create` calls to
`SmallVector<int64_t>` because MLIR introduced `DenseI64ArrayAttr`
overloads, creating ambiguity between `ArrayRef<int64_t>` and
`DenseI64ArrayAttr` when passing integer literals.
 
**Benefits:**
Better autocomplete

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-107551]
@mehrdad2m mehrdad2m added the author:build-wheels Run the wheel building workflows on this Pull Request label Feb 3, 2026
@codecov

codecov Bot commented Feb 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.73%. Comparing base (464a777) to head (3193d35).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2415   +/-   ##
=======================================
  Coverage   96.73%   96.73%           
=======================================
  Files         156      156           
  Lines       16921    16921           
  Branches     1643     1643           
=======================================
  Hits        16368    16368           
  Misses        403      403           
  Partials      150      150           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mehrdad2m mehrdad2m removed the author:build-wheels Run the wheel building workflows on this Pull Request label Feb 4, 2026
Comment thread mlir/include/Ion/IR/IonOps.td
Comment thread mlir/lib/PauliFrame/Transforms/CliffordTToPauliFramePatterns.cpp

@paul0403 paul0403 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing 💯

@paul0403

paul0403 commented Feb 4, 2026

Copy link
Copy Markdown
Member

After merging, remember to announce in the slack channel the necessary commands for us to update locally, and clear the old versions from the CI cache 👍

@kipawaa kipawaa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 💯

@mehrdad2m mehrdad2m merged commit c87c0ad into main Feb 4, 2026
42 checks passed
@mehrdad2m mehrdad2m deleted the update-llvm-Q1-2026 branch February 4, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants