[mlir] Add initial graphdef->mlir generation

This CL adds:
  * One graphdef extracted from the TF test suite. More will come.
  * Scaffolding for the "graphdef2mlir" tool.
  * Importing of simple graphs. Type inference is not yet working, and attributes do not work either.
  * A fix for CFGFunction::~CFGFunction to not die if the function was destroyed without a terminator (for example if we exit early due to an error).

PiperOrigin-RevId: 206965992
This commit is contained in:
James Molloy 2018-08-01 11:53:50 -07:00 committed by jpienaar
parent 8eaf382734
commit f376d3c6c4
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,8 @@ CFGFunction::~CFGFunction() {
for (auto &bb : *this) {
for (auto &inst : bb)
inst.dropAllReferences();
bb.getTerminator()->dropAllReferences();
if (bb.getTerminator())
bb.getTerminator()->dropAllReferences();
}
}