[all-commits] [llvm/llvm-project] fc5cf5: [mlir] Remove the MutableDictionaryAttr class

River Riddle via All-commits all-commits at lists.llvm.org
Thu Dec 17 17:23:51 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fc5cf50e892b5e2307de924923fe799702b055d2
      https://github.com/llvm/llvm-project/commit/fc5cf50e892b5e2307de924923fe799702b055d2
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M flang/lib/Optimizer/Dialect/FIROps.cpp
    M mlir/docs/OpDefinitions.md
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/include/mlir/IR/BuiltinAttributes.h
    M mlir/include/mlir/IR/BuiltinOps.td
    M mlir/include/mlir/IR/FunctionSupport.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/CAPI/IR/IR.cpp
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/IR/Attributes.cpp
    M mlir/lib/IR/BuiltinAttributes.cpp
    M mlir/lib/IR/BuiltinDialect.cpp
    M mlir/lib/IR/FunctionSupport.cpp
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp
    M mlir/lib/IR/SymbolTable.cpp
    M mlir/lib/Pass/IRPrinting.cpp
    M mlir/lib/Target/SPIRV/Deserialization.cpp
    M mlir/lib/Transforms/SCCP.cpp
    M mlir/lib/Transforms/Utils/DialectConversion.cpp
    M mlir/test/lib/Dialect/Test/TestDialect.cpp
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
    M mlir/tools/mlir-tblgen/OpFormatGen.cpp

  Log Message:
  -----------
  [mlir] Remove the MutableDictionaryAttr class

This class used to serve a few useful purposes:
* Allowed containing a null DictionaryAttr
* Provided some simple mutable API around a DictionaryAttr

The first of which is no longer an issue now that there is much better caching support for attributes in general, and a cache in the context for empty dictionaries. The second results in more trouble than it's worth because it mutates the internal dictionary on every action, leading to a potentially large number of dictionary copies. NamedAttrList is a much better alternative for the second use case, and should be modified as needed to better fit it's usage as a DictionaryAttrBuilder.

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




More information about the All-commits mailing list