- 05 Apr, 2016 11 commits
-
-
Boxiang Sun authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
ie relax an assertion that doesn't quite check enough anyway.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
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.
-
Kevin Modzelewski authored
I copied subtype_traverse and subtype_clear from cpython but didn't update them to support our hcattrs
-
Marius Wachtler authored
-
Marius Wachtler authored
- fix instruction encoding of: add imm, mem - fix Py_REF_DEBUG when increfing multiple times at once - add missing bjit annotations
-
Kevin Modzelewski authored
small refcounting fixing in tuple
-
- 04 Apr, 2016 9 commits
-
-
Kevin Modzelewski authored
I think they were timing out before
-
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.
-
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
-
Boxiang Sun authored
-
Kevin Modzelewski authored
-
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.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
I think this exists on master as well.
-
- 02 Apr, 2016 4 commits
-
-
Marius Wachtler authored
Two minor refcounting fixing in int and long functions.
-
Marius Wachtler authored
this is nice for making the generated LLVM IR and bjit code simpler when debugging code
-
Kevin Modzelewski authored
Name deleting stores a NULL into the vregs array, and then consumes a reference to it. Another solution would be to change the name deleting to not consume the reference, but this commit changes the refcounter to handle null values better.
-
Kevin Modzelewski authored
-
- 01 Apr, 2016 5 commits
-
-
Kevin Modzelewski authored
-
Boxiang Sun authored
-
Boxiang Sun authored
-
Kevin Modzelewski authored
I thought I was getting close so I spent a few days on this. But there's still a lot of work left to be done to get it to be usable.
-
Marius Wachtler authored
-
- 31 Mar, 2016 6 commits
-
-
Marius Wachtler authored
Just pass a increfed None in becasue the LLVM tier will always decref this value
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Marius Wachtler authored
-
Kevin Modzelewski authored
Previously we would check signals first. Which means that we would then call into a signal handler with an active exception, which would later trigger asserts. For CXX functions, the exception automatically wins over the signal checking. CPython also checks signals first. The only tricky thing is that this was happening because the signals stuff was hooked deeper down the stack. So pass down the CAPI-exception data as well.
-
Kevin Modzelewski authored
One of them was an issue of defining a CXX-style accelerator but not a CAPI-style one, so that's now asserted against.
-
- 30 Mar, 2016 5 commits
-
-
Kevin Modzelewski authored
Copy over tp_new_wrapper, which is the main thing that should be doing the check. Our implementation was pretty much the same minus that check. There's also a separate check that isn't completely necessary but seems like a good idea, and we had it on certain codepaths, and whether you hit it depended on whether you were in CAPI mode or not.
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
-
Kevin Modzelewski authored
It will end up spitting out something like: %x = callattrCapi() Py_XDECREF(x) if (!x) throwCapiException() We usually write something more like: %x = callattrCapi() if (!x) throwCapiException() Py_DECREF(x) But with optimizations turned on, llvm will turn them into the same thing.
-