287 void LIRGenerator::init() {
288 _bs = Universe::heap()->barrier_set();
289 }
290
291
292 void LIRGenerator::block_do_prolog(BlockBegin* block) {
293 #ifndef PRODUCT
294 if (PrintIRWithLIR) {
295 block->print();
296 }
297 #endif
298
299 // set up the list of LIR instructions
300 assert(block->lir() == NULL, "LIR list already computed for this block");
301 _lir = new LIR_List(compilation(), block);
302 block->set_lir(_lir);
303
304 __ branch_destination(block->label());
305
306 if (LIRTraceExecution &&
307 Compilation::current_compilation()->hir()->start()->block_id() != block->block_id() &&
308 !block->is_set(BlockBegin::exception_entry_flag)) {
309 assert(block->lir()->instructions_list()->length() == 1, "should come right after br_dst");
310 trace_block_entry(block);
311 }
312 }
313
314
315 void LIRGenerator::block_do_epilog(BlockBegin* block) {
316 #ifndef PRODUCT
317 if (PrintIRWithLIR) {
318 tty->cr();
319 }
320 #endif
321
322 // LIR_Opr for unpinned constants shouldn't be referenced by other
323 // blocks so clear them out after processing the block.
324 for (int i = 0; i < _unpinned_constants.length(); i++) {
325 _unpinned_constants.at(i)->clear_operand();
326 }
327 _unpinned_constants.trunc_to(0);
|
287 void LIRGenerator::init() {
288 _bs = Universe::heap()->barrier_set();
289 }
290
291
292 void LIRGenerator::block_do_prolog(BlockBegin* block) {
293 #ifndef PRODUCT
294 if (PrintIRWithLIR) {
295 block->print();
296 }
297 #endif
298
299 // set up the list of LIR instructions
300 assert(block->lir() == NULL, "LIR list already computed for this block");
301 _lir = new LIR_List(compilation(), block);
302 block->set_lir(_lir);
303
304 __ branch_destination(block->label());
305
306 if (LIRTraceExecution &&
307 Compilation::current()->hir()->start()->block_id() != block->block_id() &&
308 !block->is_set(BlockBegin::exception_entry_flag)) {
309 assert(block->lir()->instructions_list()->length() == 1, "should come right after br_dst");
310 trace_block_entry(block);
311 }
312 }
313
314
315 void LIRGenerator::block_do_epilog(BlockBegin* block) {
316 #ifndef PRODUCT
317 if (PrintIRWithLIR) {
318 tty->cr();
319 }
320 #endif
321
322 // LIR_Opr for unpinned constants shouldn't be referenced by other
323 // blocks so clear them out after processing the block.
324 for (int i = 0; i < _unpinned_constants.length(); i++) {
325 _unpinned_constants.at(i)->clear_operand();
326 }
327 _unpinned_constants.trunc_to(0);
|