[all-commits] [llvm/llvm-project] d1fcc3: [MLIR] Harmonize the behavior of the folding API f...
Christian Ulmann via All-commits
all-commits at lists.llvm.org
Fri Apr 12 06:08:55 PDT 2024
Branch: refs/heads/users/dinistro/fix-dialect-conversion-folding
Home: https://github.com/llvm/llvm-project
Commit: d1fcc3236bfd63dd48b1f807257acf61e44194a0
https://github.com/llvm/llvm-project/commit/d1fcc3236bfd63dd48b1f807257acf61e44194a0
Author: Christian Ulmann <christian.ulmann at nextsilicon.com>
Date: 2024-04-12 (Fri, 12 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/TestDialect.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
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.
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