leonhd / unladen-swallow

Automatically exported from code.google.com/p/unladen-swallow
Other
1 stars 1 forks source link

Improve our alias analysis for LLVM #126

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
LLVM does a reasonably good job of optimizing our stack manipulation.  In
particular, if we push and pop something without any intervening writes to
other objects, it will skip the read and use the original llvm::Value that
was written.  Unfortunately, right now it doesn't have very good alias
information, so if there are any memory writes between the stack
manipulation, it has to reload the value from the stack.

We should improve the alias analysis so that it knows things like
"PyObject*'s and pointers derived from them do not alias the stack".  This
is actually a lie in the case of PyFrameObjects, so we'd need to qualify
that statement.  We could do something more broad like type-based alias
analysis (TBAA), but that's trickier and harder to get right.

IIRC Jörg had was looking into a patch that to PyAliasAnalysis along these
lines.

Original issue reported on code.google.com by reid.kle...@gmail.com on 26 Jan 2010 at 3:37

GoogleCodeExporter commented 8 years ago
Jörg has started working on this: http://codereview.appspot.com/223055/show

Original comment by collinw on 5 Mar 2010 at 1:28