[all-commits] [llvm/llvm-project] 152c98: Simplify getArgAttrDict/getResultAttrDict by remov...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Sat Jun 12 15:56:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 152c9871e6ac7ba2a14dcc64e812b79193421846
      https://github.com/llvm/llvm-project/commit/152c9871e6ac7ba2a14dcc64e812b79193421846
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2021-06-12 (Sat, 12 Jun 2021)

  Changed paths:
    M mlir/lib/IR/FunctionSupport.cpp

  Log Message:
  -----------
  Simplify getArgAttrDict/getResultAttrDict by removing unnecessary checks

There is a slight change in behavior: if the arg dictionnary is empty
then we return this empty dictionnary instead of a null attribute.
This is more consistent with accessing it through:

  ArrayAttr args_attr = func_op.getAllArgAttrs();
  args_attr[num].cast<DictionnaryAttr>() ...

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




More information about the All-commits mailing list