[all-commits] [llvm/llvm-project] 7d273f: [mlir] Populate default attributes on op creation

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Mon Aug 22 16:50:05 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d273fde110d7735512c3b71a83eb88e89d189cc
      https://github.com/llvm/llvm-project/commit/7d273fde110d7735512c3b71a83eb88e89d189cc
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2022-08-22 (Mon, 22 Aug 2022)

  Changed paths:
    M flang/test/Fir/convert-to-llvm.fir
    M flang/test/Fir/external-mangling.fir
    M flang/test/Fir/global-initialization.fir
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
    M mlir/lib/IR/Operation.cpp
    M mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
    M mlir/test/Conversion/SPIRVToLLVM/lower-host-to-llvm-calls.mlir
    M mlir/test/Conversion/SPIRVToLLVM/memory-ops-to-llvm.mlir
    M mlir/test/Conversion/SPIRVToLLVM/misc-ops-to-llvm.mlir
    M mlir/test/Dialect/GPU/outlining.mlir
    M mlir/test/Dialect/LLVMIR/global.mlir
    M mlir/test/Dialect/Linalg/vectorize-convolution.mlir
    M mlir/test/Target/LLVMIR/Import/basic.ll
    M mlir/test/Target/LLVMIR/Import/zeroinitializer.ll
    M mlir/test/mlir-linalg-ods-gen/test-linalg-ods-yaml-gen.yaml
    M mlir/test/mlir-tblgen/op-attribute.td
    M mlir/test/mlir-tblgen/op-python-bindings.td
    M mlir/tools/mlir-linalg-ods-gen/mlir-linalg-ods-yaml-gen.cpp
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
    M mlir/unittests/IR/OperationSupportTest.cpp

  Log Message:
  -----------
  [mlir] Populate default attributes on op creation

Default attributes were only handled by ODS accessors generated with the
intention that these behave as if set attributes. This addresses the
long standing TODO to address this inconsistency. Moving the
initialization to construction vs every access. Removing need for
duplicated default attribute population in python bindings.

Switch some of the OpenMP ones to optional attribute with default as the
currently set default values are not legal. May need to dig more there.

Switched LinAlg generated ones to optional attribute with default as its
quite widely used and unclear where it falls on two different
interpretations.

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




More information about the All-commits mailing list