Closed chhzh123 closed 2 years ago
To capture the high-level information, we can do the following steps:
hcl.logical_and
op that can take in variadic arguments, each of which is a condition expression.LogicalAndOp
.hcl.all
op to hcl_mlir.LogicalAndOp
.build_ir.py/make_if
we allow the input of expression to be an LogicalAndOp
, and take each of its arguments to individually traverse the expression tree and construct the affine expressions.In this way, hcl.logical_and
is actually not built as an IR node, but is directly lowered when building the MLIR code.
We need to support the following imperative program with multiple conditions in a if statement, which is also useful to support general
SelectOp
.