MCPcopy Create free account
hub / github.com/csmith-project/csmith / append_nested_loop

Method append_nested_loop

src/Block.cpp:476–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476Statement*
477Block::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

Callers 1

make_randomMethod · 0.80

Calls 7

get_fact_mgr_for_funcFunction · 0.85
makeup_new_var_factsMethod · 0.80
set_fact_inMethod · 0.80
set_fact_outMethod · 0.80
get_effect_accumMethod · 0.80
clearMethod · 0.45
add_effectMethod · 0.45

Tested by

no test coverage detected