From c89c27e389a28fd05e7e0b42655e28d8e4ac934a Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 1 Apr 2016 09:34:36 +0000 Subject: [PATCH] compiler: add analysis passes from TargetMachine. This doesn't have any effect right now, but is the right thing to do. --- artiq/compiler/targets.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/targets.py b/artiq/compiler/targets.py index a319979c4..c06d195a2 100644 --- a/artiq/compiler/targets.py +++ b/artiq/compiler/targets.py @@ -88,8 +88,10 @@ class Target: reloc="pic", codemodel="default") def optimize(self, llmodule): + llmachine = self.target_machine() llpassmgr = llvm.create_module_pass_manager() - self.target_machine().target_data.add_pass(llpassmgr) + llmachine.target_data.add_pass(llpassmgr) + llmachine.add_analysis_passes(llpassmgr) # Register our alias analysis passes. llpassmgr.add_basic_alias_analysis_pass()