[all-commits] [llvm/llvm-project] 451305: [MLIR] Harmonize the behavior of the folding API f...
Christian Ulmann via All-commits
all-commits at lists.llvm.org
Mon Apr 22 23:06:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4513050f526be8bc17883685efec91a15ae427f8
https://github.com/llvm/llvm-project/commit/4513050f526be8bc17883685efec91a15ae427f8
Author: Christian Ulmann <christianulmann at gmail.com>
Date: 2024-04-23 (Tue, 23 Apr 2024)
Changed paths:
M mlir/include/mlir/IR/Builders.h
M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
M mlir/lib/IR/Builders.cpp
M mlir/lib/Transforms/Utils/DialectConversion.cpp
M mlir/test/Transforms/test-legalizer.mlir
M mlir/test/lib/Dialect/Test/TestOpDefs.cpp
M mlir/test/lib/Dialect/Test/TestOps.td
M mlir/test/lib/Dialect/Test/TestPatterns.cpp
Log Message:
-----------
[MLIR] Harmonize the behavior of the folding API functions (#88508)
This commit changes `OpBuilder::tryFold` to behave more similarly to
`Operation::fold`. Concretely, this ensures that even an in-place fold
returns `success`.
This is necessary to fix a bug in the dialect conversion that occurred
when an in-place folding made an operation legal. The dialect conversion
infrastructure did not check if the result of an in-place folding
legalized the operation and just went ahead and tried to apply pattern
anyways.
The added test contains a simplified version of a breakage we observed
downstream.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list