Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mlir][Interfaces] Clean up DestinationStyleOpInterface #67015

Merged

Commits on Sep 21, 2023

  1. [mlir][Interfaces] Clean up DestinationStyleOpInterface

    * "init" operands are specified with `MutableOperandRange` (which gives access to the underlying `OpOperand *`). No more magic numbers.
    * Remove most interface methods and make them helper functions. Only `getInitsMutable` should be implemented.
    * Provide separate helper functions for accessing mutable/immutable operands (`OpOperand`/`Value`, in line with llvm#66515): `getInitsMutable` and `getInits` (same naming convention as auto-generated op accessors). `getInputOperands` was not renamed because this function cannot return a `MutableOperandRange` (because the operands are not necessarily consecutive). `OpOperandVector` is no longer needed.
    * The new `getDpsInits`/`getDpsInitsMutable` is more efficient than the old `getDpsInitOperands` because no `SmallVector` is created. The new functions return a range of operands.
    * Fix a bug in `getDpsInputOperands`: out-of-bounds operands were potentially returned.
    
    BEGIN_PUBLIC
    No public commit message needed for presubmit.
    END_PUBLIC
    matthias-springer committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    89f47c7 View commit details
    Browse the repository at this point in the history