1. 05 Apr, 2016 5 commits
    • Kevin Modzelewski's avatar
      Use patchpoints to skip decref jit overhead · c83f33a3
      Kevin Modzelewski authored
      Represent decref/xdecref operations as opaque functions calls.
      I think the ideal solution would be to add a custom llvm intrinsic,
      but I spent a small amount of time looking into that and had trouble
      figuring out how to do that.
      
      So instead, just emit them as patchpoints, and then patch them afterwards
      with a fixed code sequence.
      
      This commit only does this for decref/xdecref because:
      - they occur much more frequently
      - they are much more expensive to jit since they involve control flow
      - forcing the op to fit a C-calling-convention isn't that much overhead,
        since the register allocator probably would have done that anyway due
        to the (potential) dealloc call.
      c83f33a3
    • Kevin Modzelewski's avatar
      Involve instance attributes in GC · 31a03a8d
      Kevin Modzelewski authored
      I copied subtype_traverse and subtype_clear from cpython but
      didn't update them to support our hcattrs
      31a03a8d
    • Marius Wachtler's avatar
      bjit: more refcounting fixes · c9cd0170
      Marius Wachtler authored
      c9cd0170
    • Marius Wachtler's avatar
      misc fixes to get the bjit further · 8d7d24ad
      Marius Wachtler authored
      - fix instruction encoding of: add imm, mem
      - fix Py_REF_DEBUG when increfing multiple times at once
      - add missing bjit annotations
      8d7d24ad
    • Kevin Modzelewski's avatar
      Merge pull request #1129 from Daetalus/ref_nexedi_tuple · ede3f121
      Kevin Modzelewski authored
      small refcounting fixing in tuple
      ede3f121
  2. 04 Apr, 2016 9 commits
    • Kevin Modzelewski's avatar
      these tests are passing now · 84bee77c
      Kevin Modzelewski authored
      I think they were timing out before
      84bee77c
    • Kevin Modzelewski's avatar
      Low-tech optimization: add xdecrefAll() function · 19ed7064
      Kevin Modzelewski authored
      For use on the exception path.  Rather than emitting the instructions
      for a bunch of decrefs, instead just emit a single call to xdecrefAll()
      
      Improves performance quite a lot: sre_parse_parse llvm instructions goes
      from 360k to 80k, and it's 60k if I manually disable cxx fixups.
      Overall time [which is entirely compile time] goes from 12.5s to 4.4s,
      though master does it in 1.3s so there's still some work to do.  But
      even if I turn off cxx fixups entirely it still takes 2.9s.
      19ed7064
    • Kevin Modzelewski's avatar
      Generate cxx "fixups" on-demand · 21b20e3b
      Kevin Modzelewski authored
      fixups aka the stubs that decref whatever's needed when an exception is thrown
      
      I looked into this because most (75%?) of the refcounting overhead
      comes from the cxx fixups.  Previously we would always generate them in
      the IRGenerator, regardless of whether they were needed.  Now they are
      generated in the refcounter, which knows whether they are needed or not.
      
      Unfortunately it looks like they are usually needed, so the gains here
      aren't that great (saves about 10% llvm instructions whereas cxx fixups
      in general added about 400% more llvm instructions).
      
      I think this is still a good change because it's also necessary in order to use
      Marius's EH stuff.
      
      I think the cost of the fixups is mostly related to the cost of the decrefs
      that it adds, so even though most of the refcounting overhead seems to be due to
      adding the cxx fixups, reducing general decref overhead might reduce cxx fixup overhead
      21b20e3b
    • Boxiang Sun's avatar
      small refcounting fixing in tuple · b2f3653a
      Boxiang Sun authored
      b2f3653a
    • Kevin Modzelewski's avatar
      Count the number of llvm instructions · 7b95f4d5
      Kevin Modzelewski authored
      7b95f4d5
    • Kevin Modzelewski's avatar
      Format! · fcf746df
      Kevin Modzelewski authored
      Any existing work on top of the unformatted branch might have a hard time
      merging -- it should work ok to do a format on top of your changes and then
      merge with this commit.
      fcf746df
    • Kevin Modzelewski's avatar
      This test is working now · 7e955a99
      Kevin Modzelewski authored
      7e955a99
    • Kevin Modzelewski's avatar
      Fix a few more list refcount issues · 5a03ae22
      Kevin Modzelewski authored
      5a03ae22
    • Kevin Modzelewski's avatar
      Fix a bug in list.__index__ · 8b483912
      Kevin Modzelewski authored
      I think this exists on master as well.
      8b483912
  3. 02 Apr, 2016 4 commits
  4. 01 Apr, 2016 5 commits
  5. 31 Mar, 2016 6 commits
  6. 30 Mar, 2016 9 commits
  7. 29 Mar, 2016 2 commits