My Patch for Defect 6478991
Christian Wimmer
wimmer at ssw.jku.at
Fri Dec 21 07:48:18 PST 2007
Hi
> Here comes my suggested patch for the defect of NullCheck
> Elimination. Basically
> it sets a flag if a type check operation is iterated. This
> flag prevents the
> optimizations of folding the NullChecks and let the
> elimination of the latter
> NullCheck exception instead of the former.
You patch looks like a quick hack to circumvent this special problem, but
not like a general solution to the problem.
I also think that your approach ist not suitable: why introduce a new flag
when there is already one, namely "last_explicit_null_check". You should
better call the method "clear_last_explicit_null_check" at all places where
it is necessary.
A technical remark is that you should not need to call the method
as_TypeCheck. The visitor design pattern of the null check eliminator
provides a distinct method for each instruction type.
Another important aspect that you should consider when creating a patch is
the impact on the performance: Does your change has a significant impact on
a benchmark?
I am not a Sun employee, so I have no influence if your patch will be
accepted or not. I just don't like bugfixes that introduce new flags because
they often show that the real consequences of the problem were not
understood.
Christian
More information about the hotspot-compiler-dev
mailing list