1. 02 Feb, 2015 5 commits
    • Kevin Modzelewski's avatar
      Remove function versions that fail their speculations · b4094e4e
      Kevin Modzelewski authored
      The goal is to not continually call functions that deopt every time,
      since the deopt is expensive.
      
      Right now the threshold is simple: if a function deopts 4 (configurable)
      times, then mark that function version as invalid and force a recompilation
      on the next call.
      b4094e4e
    • Kevin Modzelewski's avatar
      Basic (new) deopt support · 25ac9de4
      Kevin Modzelewski authored
      Old deopt worked by compiling two copies of every BB, one with
      speculations and one without, and stitching the two together.
      This has a number of issues:
      - doubles the amount of code LLVM has to jit
      - can't ever get back on the optimized path
      - doesn't support 'deopt if branch taken'
      - horrifically complex
      - doesn't support deopt from within try blocks
      
      We actually ran into that last issue (see test from previous commit).  So
      rather than wade in and try to fix old-deopt, just start switching to new-deopt.
      
      (new) deopt works by using the frame introspection features, gathering up all
      the locals, and passing them to the interpreter.
      25ac9de4
    • Kevin Modzelewski's avatar
      Add failing codegen test (reduced from subprocess.py) · 6dad4d22
      Kevin Modzelewski authored
      We currently can't deopt from inside an exception block.
      6dad4d22
    • Kevin Modzelewski's avatar
      Filter out undefined variables from locals() · 2c814183
      Kevin Modzelewski authored
      You can imagine what happens if the variable is undefined and we
      try to return it.
      2c814183
    • Kevin Modzelewski's avatar
      Merge pull request #269 from undingen/enumerate_typecall · e8746068
      Kevin Modzelewski authored
      Mark enumerate_cls as safe for type call rewriting
      e8746068
  2. 29 Jan, 2015 11 commits
  3. 28 Jan, 2015 14 commits
  4. 27 Jan, 2015 7 commits
  5. 26 Jan, 2015 1 commit
    • Marius Wachtler's avatar
      Add a simple cache for runtime ICs · bc373da9
      Marius Wachtler authored
      spectral_norm.py runtime improves by about 5%:
      rewriter_attempts: 135109 --> 55133
      rewriter_commits: 80138 --> 162
      runtime_ics_num: 40003 --> 15
      slowpath_binop: 82702 --> 2726
      bc373da9
  6. 25 Jan, 2015 1 commit
  7. 24 Jan, 2015 1 commit
    • Kevin Modzelewski's avatar
      Implement Python's name mangling · 636aca17
      Kevin Modzelewski authored
      ie names that begin with two underscores but don't end in two underscores have
      the classname added to them.
      
      Do this early on in the pipeline so that all the analyses operate post-mangling.
      
      The implementation is kind of hacky and I couldn't think of a good way to make it
      super systematic; there may be more cases I missed.
      636aca17