[all-commits] [llvm/llvm-project] 987474: [MLIR] Harmonize the behavior of the folding API f...

Christian Ulmann via All-commits all-commits at lists.llvm.org
Mon Apr 22 22:47:28 PDT 2024


  Branch: refs/heads/users/dinistro/fix-dialect-conversion-folding
  Home:   https://github.com/llvm/llvm-project
  Commit: 98747419d51c4f397bbde5146895c2e9f70d93c5
      https://github.com/llvm/llvm-project/commit/98747419d51c4f397bbde5146895c2e9f70d93c5
  Author: Christian Ulmann <christian.ulmann at nextsilicon.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

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.


  Commit: c4e1f796cb032bc209e710b6793495a78c52336a
      https://github.com/llvm/llvm-project/commit/c4e1f796cb032bc209e710b6793495a78c52336a
  Author: Christian Ulmann <christian.ulmann at nextsilicon.com>
  Date:   2024-04-23 (Tue, 23 Apr 2024)

  Changed paths:
    M mlir/include/mlir/IR/Builders.h
    M mlir/lib/IR/Builders.cpp
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  address review comments


Compare: https://github.com/llvm/llvm-project/compare/50edf67c3139...c4e1f796cb03

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