From 025bfbe7464411d0f01d1bf2c710f94b2d3cb3d1 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 19 Nov 2015 23:55:52 +0800 Subject: [PATCH] transforms.llvm_ir_generator: accept delay instructions. The delay instruction is just like a branch (discontinuity in instruction flow), but it also carries metadata: how long did the execution of its basic block take. This metadata only matters during inlining and interleaving, so we treat it here as a mere branch. --- artiq/compiler/transforms/llvm_ir_generator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/artiq/compiler/transforms/llvm_ir_generator.py b/artiq/compiler/transforms/llvm_ir_generator.py index 5558265e4..d7f1df13a 100644 --- a/artiq/compiler/transforms/llvm_ir_generator.py +++ b/artiq/compiler/transforms/llvm_ir_generator.py @@ -1068,6 +1068,8 @@ class LLVMIRGenerator: def process_Branch(self, insn): return self.llbuilder.branch(self.map(insn.target())) + process_Delay = process_Branch + def process_BranchIf(self, insn): return self.llbuilder.cbranch(self.map(insn.condition()), self.map(insn.if_true()), self.map(insn.if_false()))