[all-commits] [llvm/llvm-project] 00b12a: [mlir][llvm] Introduce some constant folding.

Théo Degioanni via All-commits all-commits at lists.llvm.org
Mon Jun 26 04:02:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 00b12a94322dc7779f42d7f863957f8ea4304dad
      https://github.com/llvm/llvm-project/commit/00b12a94322dc7779f42d7f863957f8ea4304dad
  Author: Théo Degioanni <theo.degioanni at nextsilicon.com>
  Date:   2023-06-26 (Mon, 26 Jun 2023)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMDialect.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    A mlir/test/Dialect/LLVMIR/constant-folding.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Dialect/LLVMIR/mem2reg-intrinsics.mlir

  Log Message:
  -----------
  [mlir][llvm] Introduce some constant folding.

This revision introduces some constant folding features to the LLVM
dialect. This specific choice of operations to cover is intended to
allow the elimination of logic generated by mem2reg with memset in the
common case of memsets of constant values.

This also introduces new verifiers for integer extension operations.
This lead to a fix in SPIRV to LLVM conversion, as it would sometimes
generate invalid ZExt and SExt operations.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D153135




More information about the All-commits mailing list