diff --git a/slothy/core/core.py b/slothy/core/core.py index 08fc378f..59003f69 100644 --- a/slothy/core/core.py +++ b/slothy/core/core.py @@ -1585,9 +1585,14 @@ def _dump_renaming(name,lst,inst): def _extract_kernel_input_output(self): dfg_log = self.logger.getChild("kernel_input_output") + + conf = self.config.copy() + conf.outputs = list(map(lambda o: self._result.output_renamings.get(o, o), + conf.outputs)) + self._result.kernel_input_output = list(\ DFG(self._result.code_raw, dfg_log, - DFGConfig(self.config,inputs_are_outputs=True)).inputs) + DFGConfig(conf,inputs_are_outputs=True)).inputs) def _extract_code(self): diff --git a/slothy/core/heuristics.py b/slothy/core/heuristics.py index b22695f5..63159ceb 100644 --- a/slothy/core/heuristics.py +++ b/slothy/core/heuristics.py @@ -325,6 +325,8 @@ def periodic(body, logger, conf): c.inputs_are_outputs = True result = Heuristics.optimize_binsearch(body,logger.getChild("slothy"),c) + conf.outputs = list(map(lambda o: result.output_renamings.get(o,o), conf.outputs)) + num_exceptional_iterations = result.num_exceptional_iterations kernel = result.code assert SourceLine.is_source(kernel)