[RFC PATCH 48/48] mem2reg: don't promote unused or already promoted vars

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

 



---
 mem2reg.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/mem2reg.c b/mem2reg.c
index d31cd4121..490077d67 100644
--- a/mem2reg.c
+++ b/mem2reg.c
@@ -405,6 +405,10 @@ static void promote_symbol(struct entrypoint *ep, struct symbol *sym)
 	if (!pseudo)
 		return;
 
+	/* already converted ? */
+	if (!pseudo->users)
+		return;
+
 	mod = sym->ctype.modifiers;
 
 	/* We don't do coverage analysis of volatiles.. */
-- 
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