Module: Mesa
Branch: master
Commit: d430f443de7dd554c68ba830ce23e56e87e2d9fe
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d430f443de7dd554c68ba830ce23e56e87e2d9fe

Author: Rob Clark <[email protected]>
Date:   Wed Jan  6 13:32:24 2016 -0500

freedreno/ir3: cosmetic de-indent

Collapse two nested if's into one to reduce indent level.

Signed-off-by: Rob Clark <[email protected]>

---

 src/gallium/drivers/freedreno/ir3/ir3_ra.c |   70 ++++++++++++++--------------
 1 file changed, 34 insertions(+), 36 deletions(-)

diff --git a/src/gallium/drivers/freedreno/ir3/ir3_ra.c 
b/src/gallium/drivers/freedreno/ir3/ir3_ra.c
index 74755eb..bbe1cd1 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_ra.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_ra.c
@@ -626,44 +626,42 @@ ra_block_compute_live_ranges(struct ir3_ra_ctx *ctx, 
struct ir3_block *block)
                if (writes_gpr(instr)) {
                        struct ir3_ra_instr_data *id = &ctx->instrd[instr->ip];
 
-                       if (id->defn == instr) {
-                               /* arrays which don't fit in one of the 
pre-defined class
-                                * sizes are pre-colored:
-                                */
-                               if (id->cls >= 0) {
-                                       unsigned name = ra_name(ctx, id->cls, 
id->defn);
-
-                                       ctx->def[name] = id->defn->ip;
-                                       ctx->use[name] = id->defn->ip;
-
-                                       /* since we are in SSA at this point: */
-                                       debug_assert(!BITSET_TEST(bd->use, 
name));
-
-                                       BITSET_SET(bd->def, name);
-
-                                       if (is_half(id->defn)) {
-                                               ra_set_node_class(ctx->g, name,
-                                                               
ctx->set->half_classes[id->cls - class_count]);
-                                       } else {
-                                               ra_set_node_class(ctx->g, name,
-                                                               
ctx->set->classes[id->cls]);
-                                       }
+                       /* arrays which don't fit in one of the pre-defined 
class
+                        * sizes are pre-colored:
+                        */
+                       if ((id->defn == instr) && (id->cls > 0)) {
+                               unsigned name = ra_name(ctx, id->cls, id->defn);
+
+                               ctx->def[name] = id->defn->ip;
+                               ctx->use[name] = id->defn->ip;
+
+                               /* since we are in SSA at this point: */
+                               debug_assert(!BITSET_TEST(bd->use, name));
+
+                               BITSET_SET(bd->def, name);
+
+                               if (is_half(id->defn)) {
+                                       ra_set_node_class(ctx->g, name,
+                                                       
ctx->set->half_classes[id->cls - class_count]);
+                               } else {
+                                       ra_set_node_class(ctx->g, name,
+                                                       
ctx->set->classes[id->cls]);
+                               }
 
-                                       /* extend the live range for phi srcs, 
which may come
-                                        * from the bottom of the loop
-                                        */
-                                       if (id->defn->regs[0]->flags & 
IR3_REG_PHI_SRC) {
-                                               struct ir3_instruction *phi = 
id->defn->regs[0]->instr;
-                                               foreach_ssa_src(src, phi) {
-                                                       /* if src is after phi, 
then we need to extend
-                                                        * the liverange to the 
end of src's block:
-                                                        */
-                                                       if (src->ip > phi->ip) {
-                                                               struct 
ir3_instruction *last =
+                               /* extend the live range for phi srcs, which 
may come
+                                * from the bottom of the loop
+                                */
+                               if (id->defn->regs[0]->flags & IR3_REG_PHI_SRC) 
{
+                                       struct ir3_instruction *phi = 
id->defn->regs[0]->instr;
+                                       foreach_ssa_src(src, phi) {
+                                               /* if src is after phi, then we 
need to extend
+                                                * the liverange to the end of 
src's block:
+                                                */
+                                               if (src->ip > phi->ip) {
+                                                       struct ir3_instruction 
*last =
                                                                        
list_last_entry(&src->block->instr_list,
-                                                                               
struct ir3_instruction, node);
-                                                               ctx->use[name] 
= MAX2(ctx->use[name], last->ip);
-                                                       }
+                                                                               
        struct ir3_instruction, node);
+                                                       ctx->use[name] = 
MAX2(ctx->use[name], last->ip);
                                                }
                                        }
                                }

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to