freedreno/ir3: remove a couple redundant is_flow()s
authorRob Clark <robclark@freedesktop.org>
Tue, 3 May 2016 15:47:47 +0000 (11:47 -0400)
committerRob Clark <robclark@freedesktop.org>
Wed, 4 May 2016 15:25:55 +0000 (11:25 -0400)
Now that the opc's encode the instruction category (making them unique)
we no longer need to check the category in addition to the opc.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/ir3/ir3_depth.c
src/gallium/drivers/freedreno/ir3/ir3_legalize.c

index c3f6de965ce0672406a134ca45aaf2cea2ce8fe0..1b8a446ca652411234e68f737bf34ca9c6a37762 100644 (file)
@@ -137,7 +137,7 @@ remove_unused_by_block(struct ir3_block *block)
 {
        list_for_each_entry_safe (struct ir3_instruction, instr, &block->instr_list, node) {
                if (!ir3_instr_check_mark(instr)) {
-                       if (is_flow(instr) && (instr->opc == OPC_END))
+                       if (instr->opc == OPC_END)
                                continue;
                        /* mark it, in case it is input, so we can
                         * remove unused inputs:
index 7a49f4c371cde66727aa87d794bb2e66dbb498f2..6acea011d5ce0bcb80242232e19246dfbb223e21 100644 (file)
@@ -292,7 +292,7 @@ resolve_dest_block(struct ir3_block *block)
                } else if (list_length(&block->instr_list) == 1) {
                        struct ir3_instruction *instr = list_first_entry(
                                        &block->instr_list, struct ir3_instruction, node);
-                       if (is_flow(instr) && (instr->opc == OPC_JUMP))
+                       if (instr->opc == OPC_JUMP)
                                return block->successors[0];
                }
        }