forked from M-Labs/artiq
1
0
Fork 0

compiler: add analysis passes from TargetMachine.

This doesn't have any effect right now, but is the right thing to do.
This commit is contained in:
whitequark 2016-04-01 09:34:36 +00:00
parent 10108e6d64
commit d9dd7df3b2
1 changed files with 3 additions and 1 deletions

View File

@ -88,8 +88,10 @@ class Target:
reloc="pic", codemodel="default") reloc="pic", codemodel="default")
def optimize(self, llmodule): def optimize(self, llmodule):
llmachine = self.target_machine()
llpassmgr = llvm.create_module_pass_manager() 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. # Register our alias analysis passes.
llpassmgr.add_basic_alias_analysis_pass() llpassmgr.add_basic_alias_analysis_pass()