[PATCH 23/29] sssa: set var's ident

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With this new method it's easier to assign an indent
to each phi-nodes.

THis patch has to simply assign the variable's ident to
the corresponding phi-node's pseudo.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 ssa.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ssa.c b/ssa.c
index d8fa32d93..e50fae0cc 100644
--- a/ssa.c
+++ b/ssa.c
@@ -33,6 +33,7 @@ static pseudo_t add_phi_operand(struct symbol *var, pseudo_t phi)
 		pseudo_t src = phisrc->target;
 		append_instruction(parent, phisrc);
 		use_pseudo(node, src, add_pseudo(&node->phi_list, src));
+		src->ident = var->ident;
 	} END_FOR_EACH_PTR(parent);
 	return phi;
 }
@@ -44,6 +45,7 @@ static pseudo_t load_var_parents(struct basic_block *bb, struct symbol *var)
 	if (!bb->sealed) {	// incomplete CFG
 		val = insert_phi_node(bb, var);
 		val->def->var = var;
+		val->ident = var->ident;
 		goto out;
 	}
 
@@ -56,6 +58,7 @@ static pseudo_t load_var_parents(struct basic_block *bb, struct symbol *var)
 		break;
 	default:
 		val = insert_phi_node(bb, var);
+		val->ident = var->ident;
 		store_var(bb, var, val);
 		val = add_phi_operand(var, val);
 	}
-- 
2.14.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux