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

[C++ bridge] Switch from using arith ops to cc.cast #1978

Merged
merged 3 commits into from
Jul 20, 2024

Commits on Jul 19, 2024

  1. [C++ bridge] Switch from using arith ops to cc.cast

    The arith dialect provides a big menu of casting/conversion operations
    that we can use but which have their own rules and semantics. For
    example, the generation of a quantum circuit can involve aggressive
    constant propagation. By using an operation in a dialect we control
    (CC), we can implement folding and combing these operations in ways that
    are suitable to our domain and do not rely on decisions in the MLIR code
    that may be too conservative or too aggressive for our needs.
    
    [core] Add constant folding of cc.cast operations.
    
    These constant folding operations will eliminate cc.cast operations when
    they are converting the type of a constant input op.
    
    Update the tests.
    
    Add pattern to eliminate integer casts into an integer comparison.
    
    Add constant folding of complex.create. Apparently MLIR doesn't do this.
    
    Add cast complex to complex and various constant foldings.
    
    Add a new test.
    
    Add codegen expansion pattern.
    schweitzpgi committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    99b9f11 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2024

  1. Configuration menu
    Copy the full SHA
    df0020b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2f38f43 View commit details
    Browse the repository at this point in the history