These are chat archives for dropbox/pyston

6th
Apr 2015
Yury Zhuravlev
@stalkerg
Apr 06 2015 14:18
http://speed.pyston.org/ -- latest commit is Mar 24...
Marius Wachtler
@undingen
Apr 06 2015 18:45
@kmod fixing the patchpoint "ran out of regs" problem for the other register alloc algorithms would be good. I got some improvement by specifying "-join-liveintervals=false" when I tried manual generated IR with patchpoints. But on our pyston generated one it does not help. I think the problem is that it somehow thinks that all the patchpoints args must stay in a register. With the "-join-liveintervals=false" flag enabled I saw that it was putting some args in stack locations when it recognised that it is going to run out of regs. This bug maybe interesting: https://llvm.org/bugs/show_bug.cgi?id=22832 but it is about the greedy regalloc.
Kevin Modzelewski
@kmod
Apr 06 2015 19:14
oh hmm
are we using the register allocator he suggested?
Chris Toshok
@toshok
Apr 06 2015 19:14
looks like django’s ForNode.render method trips up type analysis
src/analysis/type_analysis.cpp:664: virtual ConcreteCompilerType *pyston::PropagatingTypeAnalysis::getTypeAtBlockStart(pyston::InternedString, pyston::CFGBlock *): Assertion `base != NULL' failed: #rtnval 399
Kevin Modzelewski
@kmod
Apr 06 2015 19:15
@stalkerg thanks for the reminder -- I have to run the benchmarks manually so I'll try to do that tonight
Chris Toshok
@toshok
Apr 06 2015 19:19

interesting. looks like it’s due to this form:

    with context.push():
        # some code that defines nodelist
    return mark_safe(''.join(force_text(n) for n in nodelist))

if the code is instead:

    with context.push():
        # some code that defines nodelist
        return mark_safe(''.join(force_text(n) for n in nodelist))

it gets past type_analysis

Marius Wachtler
@undingen
Apr 06 2015 20:58
I think llvm default regalloc from optimized compilation is "greedy". But we are enabling the "basic" one per default so we are following the advice from #22832.