Kris Mok wrote:
Could I have a couple of review for this patch, please:
I hit the "assert(has_printable_bci()) failed: _printable_bci should have
set" assertion when I was doing some experiment on C1, and needed to use
-XX:+PrintCanonicalization for verification. It turns out that this flag is
pretty broken, that quite a few places didn't set printable_bci
This patch tries to fix the missing printable_bcis.
The link also includes a simple example before and after applying this
Added set_printable_bci() to Local and Phi's constructor.
A "Local" instruction models an incoming argument, which gets its value
method entry, so I'm setting all Local's printable_bci to -1.
A reasonable printable_bci for a "Phi" instruction is the same as the start
of the basic block to which it belongs. I had to use a weird cast to get
a "invalid use of incomplete type 'struct BlockBegin' error from GCC.
Added a default x->set_printable_bci(bci()) to
There are quite a few place in Canonicalizer that doesn't specify the
printable_bci for the newly created substitution instruction. It's
to just set that to the "current" bci, which is the bci of the instruction
Also adjusted the order of a set_bci() call in Canonicalizer::do_If, so that
the new code above could pick up the modified bci in set_canonical().