Currently Golem is still extremely flaky, so I have a slightly uneasy
feeling
about enabling this by default. Nevertheless, I think that accounting for
loops
in the representation inference somehow is the way to go. Therefore I
propose
the following: Let's change the default weight to 1, effectively disabling
things, and play around with the weights a bit until we are sure what a good
value is. Then we can replace the command line flag by a constant and
simplify
the code a bit.
Does that sound reasonable?
https://chromiumcodereview.appspot.com/8277031/diff/1/src/hydrogen-instructions.cc
File src/hydrogen-instructions.cc (right):
https://chromiumcodereview.appspot.com/8277031/diff/1/src/hydrogen-instructions.cc#newcode77
src/hydrogen-instructions.cc:77: static const int weights[] = { 1, w,
w*w, w*w*w, w*w*w*w };
On 2012/01/27 22:33:24, fschneider wrote:
I think no need for static here. Actually, I'd also be fine with
hard-coding the
weight to 10 here, so that the compiler can inline the constants. Once
set, we
probably don't need to change it often.
Well, initializing the array every time wouldn't be very cool, either,
so I went for a 'static' (What I really wanted to write is 'iterate (*w)
1' ;-). But you're right, when we figured out a sensible weight, we
should probably change this to a simple switch on
block()->LoopNestingDepth() and use a real constant.
https://chromiumcodereview.appspot.com/8277031/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev