PiperOrigin-RevId: 308634676
Change-Id: I66fc963cc58d4f0a2c4291a0cfed6a605b8fe928
This commit is contained in:
A. Unique TensorFlower 2020-04-27 09:23:11 -07:00 committed by TensorFlower Gardener
parent 4b5639542c
commit ccc72bfe6e
3 changed files with 3 additions and 4 deletions

View File

@ -2089,8 +2089,7 @@ struct WhileResultOperandsMatchAndImplicitCapture
Operation *op = while_op.getOperation();
Operation *new_op = rewriter.insert(
Operation::create(op->getLoc(), op->getName(), types, new_operands,
op->getAttrs(), {}, /*numRegions=*/2,
/*resizableOperandList=*/true));
op->getAttrs(), {}, /*numRegions=*/2));
for (int i = 0; i < 2; ++i) new_op->getRegion(i).takeBody(op->getRegion(i));
int new_index = 0;

View File

@ -228,8 +228,7 @@ void WhileOutlinePass::OutlineWhile(WhileOp while_op) {
Operation* new_op = OpBuilder(op).insert(Operation::create(
op->getLoc(), op->getName(), new_types, operands, op->getAttrs(),
/*successors=*/{}, /*numRegions=*/2,
/*resizableOperandList=*/true));
/*successors=*/{}, /*numRegions=*/2));
for (int i = 0; i < 2; ++i) new_op->getRegion(i).takeBody(op->getRegion(i));
op->replaceAllUsesWith(new_op->getResults().take_front(op->getNumResults()));
op->erase();

View File

@ -654,6 +654,7 @@ cc_library(
deps = [
":CallOpInterfaces",
":CommonFolders",
":Dialect",
":IR",
":InferTypeOpInterface",
":ShapeOpsIncGen",