[mlir] Add a new BranchOpInterface to allow for opaquely interfacing with...
[mlir] Add a new BranchOpInterface to allow for opaquely interfacing with branching terminator operations. This interface contains the necessary components to provide the same builtin behavior that terminators have. This will be used in future revisions to remove many of the hardcoded constraints placed on successors and successor operands. The interface initially contains three methods: ```c++ // Return a set of values corresponding to the operands for successor 'index', or None if the operands do not correspond to materialized values. Optional<OperandRange> getSuccessorOperands(unsigned index); // Return true if this terminator can have it's successor operands erased. bool canEraseSuccessorOperand(); // Erase the operand of a successor. This is only valid to call if 'canEraseSuccessorOperand' returns true. void eraseSuccessorOperand(unsigned succIdx, unsigned opIdx); ``` Differential Revision: https://reviews.llvm.org/D75314
Loading
Please register or sign in to comment