8204157: Compiler.sunflow hangs after JDK-8192992

Treat non-loop phis as stores

Reviewed-by: thartmann
This commit is contained in:
Nils Eliasson 2018-06-27 18:46:30 +02:00
parent 4029057547
commit 8e9f9e5583

View file

@ -683,8 +683,10 @@ Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
Block* store_block = get_block_for_node(store); Block* store_block = get_block_for_node(store);
assert(store_block != NULL, "unused killing projections skipped above"); assert(store_block != NULL, "unused killing projections skipped above");
if (store->is_Phi()) { if (store->is_Phi() && store->in(0)->is_Loop()) {
if (store->in(0)->is_Loop()) { // Loop-phis need to raise load before input. (Other phis are treated
// as store below.)
//
// 'load' uses memory which is one (or more) of the Phi's inputs. // 'load' uses memory which is one (or more) of the Phi's inputs.
// It must be scheduled not before the Phi, but rather before // It must be scheduled not before the Phi, but rather before
// each of the relevant Phi inputs. // each of the relevant Phi inputs.
@ -728,7 +730,6 @@ Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
"Expect at least one phi input will not be from original memory state"); "Expect at least one phi input will not be from original memory state");
#endif //ASSERT #endif //ASSERT
#endif //TRACK_PHI_INPUTS #endif //TRACK_PHI_INPUTS
}
} else if (store_block != early) { } else if (store_block != early) {
// 'store' is between the current LCA and earliest possible block. // 'store' is between the current LCA and earliest possible block.
// Label its block, and decide later on how to raise the LCA // Label its block, and decide later on how to raise the LCA