[mlir] Refactor ModuleState into AsmState and expose it to users.
authorRiver Riddle <riverriddle@google.com>
Tue, 14 Jan 2020 23:23:05 +0000 (15:23 -0800)
committerRiver Riddle <riverriddle@google.com>
Tue, 14 Jan 2020 23:23:31 +0000 (15:23 -0800)
commitfa9dd8336bbd1167926f93fe2018d0c47839d5d6
treef151e58b0e13a0a551105863f832192c0126a1e9
parent23058f9dd4d7e18239fd63b6da52549514b45fda
[mlir] Refactor ModuleState into AsmState and expose it to users.

Summary:
This allows for users to cache printer state, which can be costly to recompute. Each of the IR print methods gain a new overload taking this new state class.

Depends On D72293

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D72294
mlir/include/mlir/IR/AsmState.h [new file with mode: 0644]
mlir/include/mlir/IR/Block.h
mlir/include/mlir/IR/Module.h
mlir/include/mlir/IR/OpDefinition.h
mlir/include/mlir/IR/Operation.h
mlir/include/mlir/IR/Value.h
mlir/lib/IR/AsmPrinter.cpp