if (d->ReadPairCB)
d->ReadPairCB(d->ReaderData, inst, arg, src);
- if (d->ReaderData->Abort)
+ if (d->ReaderData->ExitOnAbort && d->ReaderData->Abort)
return;
add_reader_pair(&d->C->Pool, d->ReaderData, inst, shared_mask, arg, src);
if (d->ReadNormalCB)
d->ReadNormalCB(d->ReaderData, inst, src);
- if (d->ReaderData->Abort)
+ if (d->ReaderData->ExitOnAbort && d->ReaderData->Abort)
return;
add_reader_normal(&d->C->Pool, d->ReaderData, inst, shared_mask, src);
}
rc_for_all_writes_mask(tmp, get_readers_write_callback, d);
- if (d->ReaderData->Abort)
+ if (d->ReaderData->ExitOnAbort && d->ReaderData->Abort)
return;
if (branch_depth == 0 && !d->AliveWriteMask)
unsigned int ReadersReserved;
struct rc_reader * Readers;
+ /* If this flag is enabled, rc_get_readers will exit as soon possbile
+ * after the Abort flag is set.*/
+ unsigned int ExitOnAbort;
void * CbData;
};
return;
/* Get a list of all the readers of this MOV instruction. */
+ reader_data.ExitOnAbort = 1;
rc_get_readers(c, inst_mov, &reader_data,
copy_propagate_scan_read, NULL,
is_src_clobbered_scan_write);
rc_presubtract_op cb_op = presub_opcode;
reader_data.CbData = &cb_op;
+ reader_data.ExitOnAbort = 1;
rc_get_readers(c, inst_add, &reader_data, presub_scan_read, NULL,
is_src_clobbered_scan_write);
instruction_ready(&s, s.Current);
/* Get global readers for possible RGB->Alpha conversion. */
+ s.Current->GlobalReaders.ExitOnAbort = 1;
rc_get_readers(s.C, inst, &s.Current->GlobalReaders,
is_rgb_to_alpha_possible_normal,
is_rgb_to_alpha_possible, NULL);
if (inst->U.I.DstReg.File != RC_FILE_TEMPORARY)
continue;
+ reader_data.ExitOnAbort = 1;
rc_get_readers(c, inst, &reader_data, NULL, NULL, NULL);
if (reader_data.Abort || reader_data.ReaderCount == 0)