[all-commits] [llvm/llvm-project] 52b8fe: [mlir] Fix attaching side effects on `FlatSymbolRe...

zero9178 via All-commits all-commits at lists.llvm.org
Thu Jan 13 10:57:18 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 52b8fe9b6e014184986a6d1b69ded60926d94c23
      https://github.com/llvm/llvm-project/commit/52b8fe9b6e014184986a6d1b69ded60926d94c23
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2022-01-13 (Thu, 13 Jan 2022)

  Changed paths:
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/mlir-tblgen/op-side-effects.td
    M mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

  Log Message:
  -----------
  [mlir] Fix attaching side effects on `FlatSymbolRefAttr`

The names of the generated attribute getters for ops changed some time ago. The method created from the attribute name returns the return type and an additional method of the same name with Attr as suffix is generated which returns the actual attribute as its storage type.

The code generating effects however was using the methods without the Attr suffix, which is a problem in the case of FlatSymbolRefAttr as it has a return type of llvm::StringRef. This would lead to compilation errors as the constructor of SideEffects::EffectInstance expects a SymbolRefAttr in this case.

This patch simply fixes the generated effects code to use the Attr suffixed getter to get the actual storage type of the attribute.

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




More information about the All-commits mailing list