Lines Matching refs:ctx
285 entry_blocked(struct copy_entry *entry, struct copy_ctx *ctx)
288 if (ctx->physreg_use_count[entry->dst + i] != 0)
296 split_32bit_copy(struct copy_ctx *ctx, struct copy_entry *entry)
301 struct copy_entry *new_entry = &ctx->entries[ctx->entry_count++];
309 ctx->physreg_dst[entry->dst + 1] = new_entry;
314 struct copy_ctx *ctx)
317 memset(ctx->physreg_dst, 0, sizeof(ctx->physreg_dst));
318 memset(ctx->physreg_use_count, 0, sizeof(ctx->physreg_use_count));
320 for (unsigned i = 0; i < ctx->entry_count; i++) {
321 struct copy_entry *entry = &ctx->entries[i];
324 ctx->physreg_use_count[entry->src.reg + j]++;
327 assert(!ctx->physreg_dst[entry->dst + j]);
328 ctx->physreg_dst[entry->dst + j] = entry;
345 for (unsigned i = 0; i < ctx->entry_count; i++) {
346 struct copy_entry *entry = &ctx->entries[i];
347 if (!entry->done && !entry_blocked(entry, ctx)) {
353 ctx->physreg_use_count[entry->src.reg + j]--;
354 ctx->physreg_dst[entry->dst + j] = NULL;
372 for (unsigned i = 0; i < ctx->entry_count; i++) {
373 struct copy_entry *entry = &ctx->entries[i];
377 if (((ctx->physreg_use_count[entry->dst] == 0 ||
378 ctx->physreg_use_count[entry->dst + 1] == 0)) &&
380 split_32bit_copy(ctx, entry);
422 for (unsigned i = 0; i < ctx->entry_count; i++) {
423 struct copy_entry *entry = &ctx->entries[i];
441 for (unsigned j = 0; j < ctx->entry_count; j++) {
442 struct copy_entry *blocking = &ctx->entries[j];
450 split_32bit_copy(ctx, blocking);
460 for (unsigned j = 0; j < ctx->entry_count; j++) {
461 struct copy_entry *blocking = &ctx->entries[j];
477 struct copy_ctx ctx;
480 ctx.entry_count = 0;
483 ctx.entries[ctx.entry_count++] = entries[i];
485 _handle_copies(v->compiler, instr, &ctx);
491 ctx.entry_count = 0;
494 ctx.entries[ctx.entry_count++] = entries[i];
496 _handle_copies(v->compiler, instr, &ctx);
501 ctx.entry_count = 0;
504 ctx.entries[ctx.entry_count++] = entries[i];
506 _handle_copies(v->compiler, instr, &ctx);
508 ctx.entry_count = 0;
511 ctx.entries[ctx.entry_count++] = entries[i];
513 _handle_copies(v->compiler, instr, &ctx);