@@ -81,14 +81,6 @@ void local_state::change_state(enum __cilkrts_worker_state s) {
8181 state = s;
8282}
8383
84- // JFC: The following comment refers to Cilk-M, not OpenCilk.
85- // need to be careful when calling this function --- we check whether a
86- // frame is set stolen (i.e., has a full frame associated with it), but note
87- // that the setting of this can be delayed. A thief can steal a spawned
88- // frame, but it cannot fully promote it until it remaps its TLMM stack,
89- // because the flag field is stored in the frame on the TLMM stack. That
90- // means, a frame can be stolen, in the process of being promoted, and
91- // mean while, the stolen flag is not set until finish_promote.
9284static bool Closure_at_top_of_stack (__cilkrts_worker *const w,
9385 __cilkrts_stack_frame *const frame) {
9486 __cilkrts_stack_frame **head = w->head .load (std::memory_order_relaxed);
@@ -436,17 +428,6 @@ static Closure *Closure_return(__cilkrts_worker *const w, worker_id self,
436428 l->provably_good_steal = true ; // Use the existing SP in the frame
437429
438430 return child;
439-
440- // // merge reducers
441- // if (lht) {
442- // active_ht = merge_two_hts(lht, active_ht);
443- // }
444- // if (rht) {
445- // active_ht = merge_two_hts(active_ht, rht);
446- // }
447-
448- // parent->lock(self);
449- // child->lock(self);
450431 }
451432
452433 // Cilk_exception_handler ended up pushing a stack frame onto child, to do
@@ -613,25 +594,6 @@ void __cilkrts_do_reductions(__cilkrts_stack_frame *sf) {
613594 }
614595
615596 w->hyper_table = ht;
616-
617- // hyper_table *ht = Cilk_merge_hts(w);
618- // while (ht != NULL) {
619- // // The worker might have changed if the reduce operations executed
620- // // parallel code. Reload the worker pointer.
621- // w = get_worker_from_stack(sf);
622-
623- // if (w->hyper_table == NULL) {
624- // // The last call to Cilk_merge_hts did not create any new reducer
625- // // views. Set w's hyper table to be the result and return.
626- // w->hyper_table = ht;
627- // break;
628- // }
629-
630- // // The last call to Cilk_merge_hts created more reducer views. Reduce
631- // // those new views on the right of the returned hyper table.
632- // w->l->lht = ht;
633- // ht = Cilk_merge_hts(w);
634- // }
635597}
636598
637599static void Cilk_do_reductions_for_return (__cilkrts_worker *w,
@@ -1836,29 +1798,7 @@ void *scheduler_thread_proc(void *arg) {
18361798}
18371799
18381800Closure::Closure (__cilkrts_stack_frame *frame)
1839- : frame(frame),
1840- fiber(nullptr ),
1841- fiber_child(nullptr ),
1842- ext_fiber(nullptr ),
1843- ext_fiber_child(nullptr ),
1844- owner_ready_deque(NO_WORKER),
1845- status(CLOSURE_PRE_INVALID),
1846- has_cilk_callee(false ),
1847- exception_pending(false ),
1848- join_counter(0 ),
1849- orig_rsp(nullptr ),
1850- callee(nullptr ),
1851- call_parent(nullptr ),
1852- spawn_parent(nullptr ),
1853- left_sib(nullptr ),
1854- right_sib(nullptr ),
1855- right_most_child(nullptr ),
1856- next_ready(nullptr ),
1857- prev_ready(nullptr ),
1858- right_ht(nullptr ),
1859- child_ht(nullptr ),
1860- user_ht(nullptr ),
1861- mutex_owner(NO_WORKER)
1801+ : frame(frame)
18621802{
18631803}
18641804
0 commit comments