Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: bbd0ca782702
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a2a00e8b35eb
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Jan 10, 2016

  1. Copy the full SHA
    f92ce29 View commit details
  2. Set LLVM inlining threshold explicitly.

    llvmlite's pass manager builder does not use a default when it
    is not specified explicitly, unlike the C++ one.
    whitequark committed Jan 10, 2016
    Copy the full SHA
    a2a00e8 View commit details
Showing with 6 additions and 2 deletions.
  1. +1 −0 artiq/compiler/targets.py
  2. +5 −2 artiq/compiler/transforms/llvm_ir_generator.py
1 change: 1 addition & 0 deletions artiq/compiler/targets.py
Original file line number Diff line number Diff line change
@@ -97,6 +97,7 @@ def compile(self, module):
llpassmgrbuilder = llvm.create_pass_manager_builder()
llpassmgrbuilder.opt_level = 2 # -O2
llpassmgrbuilder.size_level = 1 # -Os
llpassmgrbuilder.inlining_threshold = 75 # -Os threshold

llpassmgr = llvm.create_module_pass_manager()
llpassmgrbuilder.populate(llpassmgr)
7 changes: 5 additions & 2 deletions artiq/compiler/transforms/llvm_ir_generator.py
Original file line number Diff line number Diff line change
@@ -925,10 +925,13 @@ def process_Closure(self, insn):
return llvalue

def _prepare_closure_call(self, insn):
llclosure = self.map(insn.target_function())
llargs = [self.map(arg) for arg in insn.arguments()]
llclosure = self.map(insn.target_function())
llenv = self.llbuilder.extract_value(llclosure, 0)
llfun = self.llbuilder.extract_value(llclosure, 1)
if insn.static_target_function is None:
llfun = self.llbuilder.extract_value(llclosure, 1)
else:
llfun = self.map(insn.static_target_function)
return llfun, [llenv] + list(llargs)

def _prepare_ffi_call(self, insn):