/* next_dependencies are the union of the dependencies of successors'
* dependencies */
- unsigned scoreboard_deps = next_1 ? next_1->dependencies : 0;
- scoreboard_deps |= next_2 ? next_2->dependencies : 0;
+ unsigned dependency_wait = next_1 ? next_1->dependencies : 0;
+ dependency_wait |= next_2 ? next_2->dependencies : 0;
struct bifrost_header header = {
.back_to_back = clause->back_to_back,
.next_clause_prefetch = clause->next_clause_prefetch,
.staging_barrier = clause->staging_barrier,
.staging_register = clause->staging_register,
- .scoreboard_deps = scoreboard_deps,
- .scoreboard_index = clause->scoreboard_id,
+ .dependency_wait = dependency_wait,
+ .dependency_slot = clause->scoreboard_id,
.message_type = clause->message_type,
.next_message_type = next_1 ? next_1->message_type : 0,
.suppress_inf = true,
* that it is safe for the next clause to write them. */
unsigned staging_barrier: 1;
unsigned staging_register : 6;
- unsigned scoreboard_deps: 8;
- unsigned scoreboard_index: 3;
+
+ /* Slots to wait on and slot to be used for message passing
+ * instructions respectively */
+ unsigned dependency_wait : 8;
+ unsigned dependency_slot : 3;
+
enum bifrost_message_type message_type : 5;
enum bifrost_message_type next_message_type : 5;
} __attribute__((packed));
static void dump_header(FILE *fp, struct bifrost_header header, bool verbose)
{
- fprintf(fp, "id(%du) ", header.scoreboard_index);
+ fprintf(fp, "ds(%du) ", header.dependency_slot);
if (header.message_type != 0) {
const char *name = bi_message_type_name(header.message_type);
fprintf(fp, "%s ", name);
}
- if (header.scoreboard_deps != 0) {
- fprintf(fp, "next-wait(");
- bool first = true;
- for (unsigned i = 0; i < 8; i++) {
- if (header.scoreboard_deps & (1 << i)) {
- if (!first) {
- fprintf(fp, ", ");
- }
- fprintf(fp, "%d", i);
- first = false;
- }
- }
- fprintf(fp, ") ");
- }
-
if (header.staging_barrier)
fprintf(fp, "osrb ");
if (header.next_message_type)
fprintf(fp, "next_%s ", bi_message_type_name(header.next_message_type));
+ if (header.dependency_wait != 0) {
+ fprintf(fp, "dwb(");
+ bool first = true;
+ for (unsigned i = 0; i < 8; i++) {
+ if (header.dependency_wait & (1 << i)) {
+ if (!first) {
+ fprintf(fp, ", ");
+ }
+ fprintf(fp, "%d", i);
+ first = false;
+ }
+ }
+ fprintf(fp, ") ");
+ }
fprintf(fp, "\n");
}