Create a constant integer operation and return its MLIR result Value. Takes as input the concrete integer value. Can specify the integer bit width.
(self, value, width=64)
| 580 | eTy)).result |
| 581 | |
| 582 | def getConstantInt(self, value, width=64): |
| 583 | """Create a constant integer operation and return its MLIR result Value. |
| 584 | |
| 585 | Takes as input the concrete integer value. Can specify the integer bit |
| 586 | width. |
| 587 | """ |
| 588 | ty = self.getIntegerType(width) |
| 589 | return arith.ConstantOp(ty, self.getIntegerAttr(ty, value)).result |
| 590 | |
| 591 | def __arithmetic_to_bool(self, value): |
| 592 | """Converts an integer or floating point value to a bool by comparing it |
no test coverage detected