diff options
| author | Jacques Pienaar <jpienaar@google.com> | 2019-11-29 10:26:23 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-11-29 10:26:56 -0800 |
| commit | 52a74151787a051d8ecb246080314f64cf2a7b61 (patch) | |
| tree | fc52b8f6c926075d71aa8a571d30d4afe9bc59d2 /mlir/lib | |
| parent | c9721e9a2b36c881cbd2b936e03cb1fbe167c6db (diff) | |
| download | bcm5719-llvm-52a74151787a051d8ecb246080314f64cf2a7b61.tar.gz bcm5719-llvm-52a74151787a051d8ecb246080314f64cf2a7b61.zip | |
Fix redundant convert and use NamedAttributeList as value
* Had leftover call that would result in converting to dictionary attr before
being implicitedly converted back to NamedAttributeList;
* NamedAttributeList is value typed, so don't use const reference;
PiperOrigin-RevId: 283072576
Diffstat (limited to 'mlir/lib')
| -rw-r--r-- | mlir/lib/IR/Operation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp index e5ec43c699b..f0ebd59ab9f 100644 --- a/mlir/lib/IR/Operation.cpp +++ b/mlir/lib/IR/Operation.cpp @@ -125,17 +125,17 @@ Operation *Operation::create(Location location, OperationName name, /// Create a new Operation from operation state. Operation *Operation::create(const OperationState &state) { - return Operation::create( - state.location, state.name, state.types, state.operands, - NamedAttributeList(state.attributes).getDictionary(), state.successors, - state.regions, state.resizableOperandList); + return Operation::create(state.location, state.name, state.types, + state.operands, NamedAttributeList(state.attributes), + state.successors, state.regions, + state.resizableOperandList); } /// Create a new Operation with the specific fields. Operation *Operation::create(Location location, OperationName name, ArrayRef<Type> resultTypes, ArrayRef<Value *> operands, - const NamedAttributeList &attributes, + NamedAttributeList attributes, ArrayRef<Block *> successors, ArrayRef<std::unique_ptr<Region>> regions, bool resizableOperandList) { @@ -153,7 +153,7 @@ Operation *Operation::create(Location location, OperationName name, Operation *Operation::create(Location location, OperationName name, ArrayRef<Type> resultTypes, ArrayRef<Value *> operands, - const NamedAttributeList &attributes, + NamedAttributeList attributes, ArrayRef<Block *> successors, unsigned numRegions, bool resizableOperandList) { unsigned numSuccessors = successors.size(); |

