[MLIR] Change FuncOp assembly syntax to print visibility inline instead of in attrib...
authorRahul Joshi <jurahul@google.com>
Mon, 9 Nov 2020 16:23:55 +0000 (08:23 -0800)
committerRahul Joshi <jurahul@google.com>
Mon, 9 Nov 2020 19:08:08 +0000 (11:08 -0800)
commit8b5a3e46326f646c3cca187058c2ef71910daeb0
tree97ccfba25513f8e69d7d9d80672fde8a837601c3
parentd657f7cd30ed391a619e2cd4d4f73281e3ffa499
[MLIR] Change FuncOp assembly syntax to print visibility inline instead of in attrib dict.

- Change syntax for FuncOp to be `func <visibility>? @name` instead of printing the
  visibility in the attribute dictionary.
- Since printFunctionLikeOp() and parseFunctionLikeOp() are also used by other
  operations, make the "inline visibility" an opt-in feature.
- Updated unit test to use and check the new syntax.

Differential Revision: https://reviews.llvm.org/D90859
24 files changed:
mlir/docs/SymbolsAndSymbolTables.md
mlir/include/mlir/IR/FunctionImplementation.h
mlir/include/mlir/IR/OpImplementation.h
mlir/include/mlir/IR/SymbolTable.h
mlir/include/mlir/Transforms/Passes.td
mlir/lib/IR/Function.cpp
mlir/lib/IR/FunctionImplementation.cpp
mlir/lib/IR/SymbolTable.cpp
mlir/lib/Parser/Parser.cpp
mlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir
mlir/test/Examples/Toy/Ch4/codegen.toy
mlir/test/Examples/Toy/Ch4/shape_inference.mlir
mlir/test/Examples/Toy/Ch5/codegen.toy
mlir/test/Examples/Toy/Ch5/shape_inference.mlir
mlir/test/Examples/Toy/Ch6/codegen.toy
mlir/test/Examples/Toy/Ch6/shape_inference.mlir
mlir/test/Examples/Toy/Ch7/codegen.toy
mlir/test/Examples/Toy/Ch7/shape_inference.mlir
mlir/test/Examples/Toy/Ch7/struct-codegen.toy
mlir/test/IR/core-ops.mlir
mlir/test/Transforms/inlining-dce.mlir
mlir/test/Transforms/sccp-callgraph.mlir
mlir/test/Transforms/test-symbol-dce.mlir
mlir/test/mlir-reduce/dce-test.mlir