Reviewers: Kevin Millikin,
Description:
Simple register allocation in the fast code generator for temporaries.
This change introduces a linear scan register allocator for expresssion
temporaries. It also enables arbitrarily-sized expressions with the fast
code generator.
Approach:
The first step is to build an explicit representation of live ranges for
expression temporaries. This pass is implemented as a separate visitor for
now.
Based on this data structure we do a linear pass over all temporaries sorted
by the start of their live ranges and assign registers and locations to
them.
In the same pass we also allocate scratch registers for ast nodes that need
extra registers.
Limitations:
* Only for expressions supported by the fast code generator.
* Only for expression temporaries.
* Hard-coded maximum of 2 scratch registers per ast node.
Changes to the syntax checker:
* Allow binaryop expressions of any size.
* Assignments at the top-level (effect context)
* Other expressions always in a value context.
Please review this at http://codereview.chromium.org/658002
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M src/SConscript
M src/ast.h
M src/data-flow.h
M src/ia32/fast-codegen-ia32.h
M src/ia32/fast-codegen-ia32.cc
A src/ia32/fast-register-allocator-ia32.h
A src/ia32/fast-register-allocator-ia32.cc
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev