[mlir] Allow SymbolTable to update existing symbols
authorTres Popp <tpopp@google.com>
Tue, 15 Dec 2020 23:13:05 +0000 (00:13 +0100)
committerTres Popp <tpopp@google.com>
Tue, 15 Dec 2020 23:44:40 +0000 (00:44 +0100)
commitf43e67cc6c6f6e0da925039b28b54e44fc751267
treed8f3bac81ec2e7bc6b39b6dc3b995c493e45b34f
parentcf638d793c489632bbcf0ee0fbf9d0f8c76e1f48
[mlir] Allow SymbolTable to update existing symbols

Previous behavior would fail if inserting an operation that already
existed. Now SymbolTable::insert can also be used as a way to make a
symbol's name unique even after insertion.

Further TODOs have been left over naming and consistent behavior
considerations.

Differential Revision: https://reviews.llvm.org/D93349
mlir/include/mlir/IR/SymbolTable.h
mlir/lib/IR/SymbolTable.cpp