[mlir][Index] Add pretty result names for ConstantOp and BoolConstantOp
authorRiver Riddle <riddleriver@gmail.com>
Fri, 2 Dec 2022 08:22:10 +0000 (00:22 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Fri, 2 Dec 2022 09:34:29 +0000 (01:34 -0800)
commitac9f88e8622629c43c8f0538d03ae93cd25b3f34
treecf8fbbf1e34fb6e6aa2e49487611be865fad0da6
parent7b5928e4a70e37e466bba617bbc20cf9d8ce4da0
[mlir][Index] Add pretty result names for ConstantOp and BoolConstantOp

ConstantOp uses `%idx<value>` and BoolConstantOp uses true/false, which
is similar to the printing for arith::ConstantOp.

Differential Revision: https://reviews.llvm.org/D139175
mlir/include/mlir/Dialect/Index/IR/IndexOps.h
mlir/include/mlir/Dialect/Index/IR/IndexOps.td
mlir/lib/Dialect/Index/IR/IndexOps.cpp
mlir/test/Dialect/Index/index-ops.mlir