X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=execution.cc;h=a98567edb9ba7b723c474405cbb5d3d75433687a;hb=9ecf77b2763e447363738b6453042982f787a184;hp=bfb93278cfa7b2deb8b7e5ad1bed6a38ad76a170;hpb=dad0ccf535e5479ec5663e4665528e901a99843a;p=c11tester.git diff --git a/execution.cc b/execution.cc index bfb93278..a98567ed 100644 --- a/execution.cc +++ b/execution.cc @@ -1774,8 +1774,6 @@ void ModelExecution::collectActions() { CycleNode * prevnode = node->getInEdge(i); ModelAction * prevact = prevnode->getAction(); if (prevact->get_type() != READY_FREE) { - // Save the original action type - prevact->set_original_type(prevact->get_type()); prevact->set_free(); queue->push_back(prevnode); } @@ -1801,8 +1799,6 @@ void ModelExecution::collectActions() { if (act->is_read()) { if (act->get_reads_from()->is_free()) { if (act->is_rmw()) { - // Save the original action type - act->set_original_type(act->get_type()); //Weaken a RMW from a freed store to a write act->set_type(ATOMIC_WRITE); } else { @@ -1811,12 +1807,8 @@ void ModelExecution::collectActions() { fixupLastAct(act); } - // Only delete this action if not being using by ModelHistory. - // Otherwise, the deletion of action is deferred. - if (act->get_func_ref_count() == 0) { - delete act; - continue; - } + delete act; + continue; } } } @@ -1847,18 +1839,14 @@ void ModelExecution::collectActions() { if (act->is_read()) { if (act->get_reads_from()->is_free()) { if (act->is_rmw()) { - // Save the original action type - act->set_original_type(act->get_type()); act->set_type(ATOMIC_WRITE); } else { removeAction(act); if (islastact) { fixupLastAct(act); } - if (act->get_func_ref_count() == 0) { - delete act; - continue; - } + delete act; + continue; } } } else if (act->is_free()) { @@ -1866,10 +1854,8 @@ void ModelExecution::collectActions() { if (islastact) { fixupLastAct(act); } - if (act->get_func_ref_count() == 0) { - delete act; - continue; - } + delete act; + continue; } else if (act->is_write()) { //Do nothing with write that hasn't been marked to be freed } else if (islastact) {