.unit = ALU_ENAB_BR_COMPACT,
.prepacked_branch = true,
.compact_branch = true,
- .br_compact = compact
+ .br_compact = compact,
+ .ssa_args = {
+ .dest = -1,
+ .src0 = -1,
+ .src1 = -1,
+ }
};
if (op == midgard_jmp_writeout_op_writeout)
.branch = {
.conditional = conditional,
.invert_conditional = invert
+ },
+ .ssa_args = {
+ .dest = -1,
+ .src0 = -1,
+ .src1 = -1
}
};
/* If there is already a constant here, we can do nothing */
if (alu->has_constants) continue;
- /* It makes no sense to inline constants on a branch */
- if (alu->compact_branch || alu->prepacked_branch) continue;
-
CONDITIONAL_ATTACH(src0);
if (!alu->has_constants) {
/* Pass #1 is analysis, a linear scan to fill out the bitfields */
mir_foreach_instr_global(ctx, ins) {
- if (ins->compact_branch) continue;
-
switch (ins->type) {
case TAG_ALU_4:
mark_node_class(aluw, ins->ssa_args.dest);
/* Insert move after each write */
mir_foreach_instr_global_safe(ctx, pre_use) {
- if (pre_use->compact_branch) continue;
if (pre_use->ssa_args.dest != i)
continue;
unsigned *found_class = calloc(sizeof(unsigned), ctx->temp_count);
mir_foreach_instr_global(ctx, ins) {
- if (ins->compact_branch) continue;
if (ins->ssa_args.dest < 0) continue;
if (ins->ssa_args.dest >= SSA_FIXED_MINIMUM) continue;
* nodes (TODO) */
mir_foreach_instr_global(ctx, ins) {
- if (ins->compact_branch) continue;
-
/* Check if this operation imposes any classes */
if (ins->type == TAG_LOAD_STORE_4) {
/* Check that the semantics of the class are respected */
mir_foreach_instr_global(ctx, ins) {
- if (ins->compact_branch) continue;
-
assert(check_write_class(found_class, ins->type, ins->ssa_args.dest));
assert(check_read_class(found_class, ins->type, ins->ssa_args.src0));
mir_foreach_block(ctx, block) {
mir_foreach_instr_in_block(block, ins) {
- if (ins->compact_branch) continue;
-
if (ins->ssa_args.dest < SSA_FIXED_MINIMUM) {
/* If this destination is not yet live, it is
* now since we just wrote it */
{
mir_foreach_block(ctx, block) {
mir_foreach_instr_in_block(block, ins) {
- if (ins->compact_branch) continue;
install_registers_instr(ctx, g, ins);
}
}
midgard_instruction *ins = bundle->instructions[i];
unsigned dest = ins->ssa_args.dest;
- /* Check to make sure we're legal */
-
- if (ins->compact_branch)
- return false;
-
/* We could be pipelining a register, so we need to make sure that all
* of the components read in this bundle are written in this bundle,
* and that no components are written before this bundle */
ctx->hash_to_temp = _mesa_hash_table_u64_create(NULL);
mir_foreach_instr_global(ctx, ins) {
- if (ins->compact_branch) continue;
-
ins->ssa_args.dest = find_or_allocate_temp(ctx, ins->ssa_args.dest);
ins->ssa_args.src0 = find_or_allocate_temp(ctx, ins->ssa_args.src0);
if (!is_special || is_special_w) {
mir_foreach_instr_global_safe(ctx, ins) {
- if (ins->compact_branch) continue;
if (ins->ssa_args.dest != spill_node) continue;
midgard_instruction st;
unsigned consecutive_index = 0;
mir_foreach_instr_in_block(block, ins) {
- if (ins->compact_branch) continue;
-
/* We can't rewrite the move used to spill in the first place */
if (ins == spill_move) continue;