struct bifrost_header header = {
.flow_control =
(next_1 == NULL) ? BIFROST_FLOW_END :
- (clause->back_to_back ? BIFROST_FLOW_NBTB : BIFROST_FLOW_NBTB_UNCONDITIONAL),
+ clause->flow_control,
.terminate_discarded_threads = is_fragment,
.next_clause_prefetch = clause->next_clause_prefetch,
.staging_barrier = clause->staging_barrier,
fprintf(fp, ")");
}
- if (!clause->back_to_back)
- fprintf(fp, " nbb");
+ fprintf(fp, " %s", bi_flow_control_name(clause->flow_control));
if (!clause->next_clause_prefetch)
fprintf(fp, " no_prefetch");
last_id = u->scoreboard_id;
/* Let's be optimistic, we'll fix up later */
- u->back_to_back = true;
+ u->flow_control = BIFROST_FLOW_NBTB;
u->constant_count = 1;
u->constants[0] = ins->constant.u64;
if (!list_is_empty(&bblock->clauses)) {
bi_clause *last_clause = list_last_entry(&bblock->clauses, bi_clause, link);
- last_clause->back_to_back = bi_back_to_back(bblock);
+ if (!bi_back_to_back(bblock))
+ last_clause->flow_control = BIFROST_FLOW_NBTB_UNCONDITIONAL;
}
bblock->scheduled = true;
unsigned scoreboard_id;
uint8_t dependencies;
- /* Back-to-back corresponds directly to the back-to-back bit. Branch
- * conditional corresponds to the branch conditional bit except that in
- * the emitted code it's always set if back-to-bit is, whereas we use
- * the actual value (without back-to-back so to speak) internally */
- bool back_to_back;
+ /* See ISA header for description */
+ enum bifrost_flow flow_control;
/* Can we prefetch the next clause? Usually it makes sense, except for
* clauses ending in unconditional branches */