[RFC PATCH 38/48] mem2reg: let rewrite_load_instruction() take the symbol as arg

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

 



---
 mem2reg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mem2reg.c b/mem2reg.c
index 0078485da..4ba0f3408 100644
--- a/mem2reg.c
+++ b/mem2reg.c
@@ -12,7 +12,7 @@
  * We should probably sort the phi list just to make it easier to compare
  * later for equality.
  */
-static void rewrite_load_instruction(struct instruction *insn, struct pseudo_list *dominators)
+static void rewrite_load_instruction(struct symbol *sym, struct instruction *insn, struct pseudo_list *dominators)
 {
 	pseudo_t new, phi;
 
@@ -24,7 +24,7 @@ static void rewrite_load_instruction(struct instruction *insn, struct pseudo_lis
 	FOR_EACH_PTR(dominators, phi) {
 		if (new != phi->def->src1)
 			goto complex_phi;
-		new->ident = new->ident ? : phi->ident;
+		new->ident = new->ident ? : sym->ident;
 	} END_FOR_EACH_PTR(phi);
 
 	/*
@@ -190,7 +190,7 @@ found:
 	 * have to turn the load into a phi-node of the
 	 * dominators.
 	 */
-	rewrite_load_instruction(insn, dominators);
+	rewrite_load_instruction(sym, insn, dominators);
 	return 1;
 }
 
-- 
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