| 474 | } |
| 475 | |
| 476 | Statement* |
| 477 | Block::append_nested_loop(CGContext& cg_context) |
| 478 | { |
| 479 | FactMgr* fm = get_fact_mgr_for_func(func); |
| 480 | FactVec pre_facts = fm->global_facts; |
| 481 | cg_context.get_effect_stm().clear(); |
| 482 | |
| 483 | Statement* sf = Statement::make_random(cg_context, eFor); |
| 484 | ERROR_GUARD(NULL); |
| 485 | stms.push_back(sf); |
| 486 | fm->makeup_new_var_facts(pre_facts, fm->global_facts); |
| 487 | //assert(sf->visit_facts(fm->global_facts, cg_context)); |
| 488 | |
| 489 | fm->set_fact_in(sf, pre_facts); |
| 490 | fm->set_fact_out(sf, fm->global_facts); |
| 491 | fm->map_accum_effect[sf] = *(cg_context.get_effect_accum()); |
| 492 | fm->map_visited[sf] = true; |
| 493 | //sf->post_creation_analysis(pre_facts, cg_context); |
| 494 | fm->map_accum_effect[this] = *(cg_context.get_effect_accum()); |
| 495 | fm->map_stm_effect[this].add_effect(fm->map_stm_effect[sf]); |
| 496 | return sf; |
| 497 | } |
| 498 | |
| 499 | /* return true is var is local variable of this block or parent block, |
| 500 | * or var is parameter of function |
no test coverage detected