Create an invariant loop using the CC dialect.
(self, bodyBuilder, endVal)
| 1419 | (lambda args: orElseBuilder(args[0]))) |
| 1420 | |
| 1421 | def createInvariantForLoop(self, bodyBuilder, endVal): |
| 1422 | """Create an invariant loop using the CC dialect.""" |
| 1423 | |
| 1424 | startVal = self.getConstantInt(0) |
| 1425 | stepVal = self.getConstantInt(1) |
| 1426 | |
| 1427 | loop = self.createMonotonicForLoop(bodyBuilder, |
| 1428 | startVal=startVal, |
| 1429 | stepVal=stepVal, |
| 1430 | endVal=endVal) |
| 1431 | loop.attributes.__setitem__('invariant', UnitAttr.get()) |
| 1432 | |
| 1433 | def __deconstructAssignment(self, target, value, process=None): |
| 1434 | if process is not None: |
no test coverage detected