rev 52693 : 8214352: C1: Unnecessary "compilation bailout: block join failed" with JVMTI Summary: Invalidate Phi functions for conflicting types and avoid bailout. Reviewed-by:
282 #define for_each_state_value(v_state, v_value, v_code) \
283 { \
284 int cur_index; \
285 ValueStack* cur_state = v_state; \
286 Value v_value; \
287 for_each_state(cur_state) { \
288 { \
289 for_each_local_value(cur_state, cur_index, v_value) { \
290 v_code; \
291 } \
292 } \
293 { \
294 for_each_stack_value(cur_state, cur_index, v_value) { \
295 v_code; \
296 } \
297 } \
298 } \
299 }
300
301
302 // Macro definition for simple iteration of all phif functions of a block, i.e all
303 // phi functions of the ValueStack where the block matches.
304 // Use the following code pattern to iterate all phi functions of a block:
305 //
306 // BlockBegin* block = ... // block that is iterated
307 // for_each_phi_function(block, phi,
308 // do something with the phi function phi (note that this is a macro parameter)
309 // );
310
311 #define for_each_phi_fun(v_block, v_phi, v_code) \
312 { \
313 int cur_index; \
314 ValueStack* cur_state = v_block->state(); \
315 Value value; \
316 { \
317 for_each_stack_value(cur_state, cur_index, value) { \
318 Phi* v_phi = value->as_Phi(); \
319 if (v_phi != NULL && v_phi->block() == v_block) { \
320 v_code; \
321 } \
322 } \
|
282 #define for_each_state_value(v_state, v_value, v_code) \
283 { \
284 int cur_index; \
285 ValueStack* cur_state = v_state; \
286 Value v_value; \
287 for_each_state(cur_state) { \
288 { \
289 for_each_local_value(cur_state, cur_index, v_value) { \
290 v_code; \
291 } \
292 } \
293 { \
294 for_each_stack_value(cur_state, cur_index, v_value) { \
295 v_code; \
296 } \
297 } \
298 } \
299 }
300
301
302 // Macro definition for simple iteration of all phi functions of a block, i.e all
303 // phi functions of the ValueStack where the block matches.
304 // Use the following code pattern to iterate all phi functions of a block:
305 //
306 // BlockBegin* block = ... // block that is iterated
307 // for_each_phi_function(block, phi,
308 // do something with the phi function phi (note that this is a macro parameter)
309 // );
310
311 #define for_each_phi_fun(v_block, v_phi, v_code) \
312 { \
313 int cur_index; \
314 ValueStack* cur_state = v_block->state(); \
315 Value value; \
316 { \
317 for_each_stack_value(cur_state, cur_index, value) { \
318 Phi* v_phi = value->as_Phi(); \
319 if (v_phi != NULL && v_phi->block() == v_block) { \
320 v_code; \
321 } \
322 } \
|