qat.backend.passes.legacy.transform module
- class DesugaringPass
Bases:
TransformPass
Transforms syntactic sugars and implicit effects. Not that it applies here, but a classical example of a sugar syntax is the ternary expression
"cond ? val1 : val2"
which is nothing more than an if else in disguise.The goal of this pass is to desugar any syntactic and semantic sugars. One of these sugars is iteration constructs such as
Sweep
andRepeat
.- run(ir, res_mgr, *args, **kwargs)
- Parameters:
ir¶ (
InstructionBuilder
) – The list of instructions stored in anInstructionBuilder
.