RFR(S): 8174164: SafePointNode::_replaced_nodes breaks with irreducible loops
vladimir.kozlov at oracle.com
Wed Feb 15 20:15:10 UTC 2017
On 2/15/17 1:40 AM, Roland Westrelin wrote:
>> Wow, so much changes.
> Doesn't that make my initial change (the one that only takes newer nodes
> into consideration) look more reasonable?
Yes, I starting think to take my complains off and go with you original fix. Based on these latest changes it does not look worse (code generation wise).
>> Can you add _irreducible_loop field to CallGenerator instead of passing as argument?
> The _irreducible_loop field only needs to be InlineCallGenerator so that
> does seem better. Unfortunately, LibraryIntrinsic objects are cached so
> there's no way to initialize _irreducible_loop for them (and there's a
> use of replaced nodes for the array copy intrinsic).
> Alternatively, we could use a coarser grain switch: make
> Compile::_parsed_irreducible_loop product and use it to decide whether
> to apply replaced nodes or not.
This still leave my original concern that we may miss replacement optimization. I thought that we do immediate replacement without recording replacement nodes at all when we have irreducible loops.
If we can't do that then lets go with you simple original fix.
And thank you for explaining this problem in details to me.
More information about the hotspot-compiler-dev