visit_parallel_copy_dest(nir_parallel_copy_instr *instr,
nir_foreach_dest_cb cb, void *state)
{
- nir_foreach_parallel_copy_entry(instr, entry) {
+ nir_foreach_parallel_copy_entry(entry, instr) {
if (!cb(&entry->dest, state))
return false;
}
visit_parallel_copy_src(nir_parallel_copy_instr *instr,
nir_foreach_src_cb cb, void *state)
{
- nir_foreach_parallel_copy_entry(instr, entry) {
+ nir_foreach_parallel_copy_entry(entry, instr) {
if (!visit_src(&entry->src, cb, state))
return false;
}
nir_dest dest;
} nir_parallel_copy_entry;
-#define nir_foreach_parallel_copy_entry(pcopy, entry) \
+#define nir_foreach_parallel_copy_entry(entry, pcopy) \
foreach_list_typed(nir_parallel_copy_entry, entry, node, &(pcopy)->entries)
typedef struct {
aggressive_coalesce_parallel_copy(nir_parallel_copy_instr *pcopy,
struct from_ssa_state *state)
{
- nir_foreach_parallel_copy_entry(pcopy, entry) {
+ nir_foreach_parallel_copy_entry(entry, pcopy) {
if (!entry->src.is_ssa)
continue;
struct from_ssa_state *state)
{
unsigned num_copies = 0;
- nir_foreach_parallel_copy_entry(pcopy, entry) {
+ nir_foreach_parallel_copy_entry(entry, pcopy) {
/* Sources may be SSA */
if (!entry->src.is_ssa && entry->src.reg.reg == entry->dest.reg.reg)
continue;
* - Predicessors are recorded from sources and destinations
*/
int num_vals = 0;
- nir_foreach_parallel_copy_entry(pcopy, entry) {
+ nir_foreach_parallel_copy_entry(entry, pcopy) {
/* Sources may be SSA */
if (!entry->src.is_ssa && entry->src.reg.reg == entry->dest.reg.reg)
continue;
print_parallel_copy_instr(nir_parallel_copy_instr *instr, print_state *state)
{
FILE *fp = state->fp;
- nir_foreach_parallel_copy_entry(instr, entry) {
+ nir_foreach_parallel_copy_entry(entry, instr) {
if (&entry->node != exec_list_get_head(&instr->entries))
fprintf(fp, "; ");