Hello email@example.com (cc: firstname.lastname@example.org),
I'd like you to review this change to
cmd/5g, cmd/6g, cmd/8g: fix out of registers with array indexing.
Compiling expressions like:
make 5g and 6g run out of registers. Such expressions can arise
if a slice is used to represent a permutation and the user wants
to iterate it.
This is due to the usual problem of allocating registers before
going down the expression tree, instead of allocating them in a
The functions cgenr and agenr (that generate a value to a newly
allocated register instead of an existing location), are either
introduced or modified when they already existed to allocate
the new register as late as possible, and sudoaddable is disabled
for OINDEX nodes so that igen/agenr is used instead.
The problem does not appear in 8g because it generates
temporaries for almost every intermediate result, but some
of them could be eliminated once the allocation pattern is saner.
Update issue 4207.
Please review this at http://codereview.appspot.com/6733055/