diff mbox

[RFC,25/48] mem2reg: reorg externaly_visible() returns

Message ID 20170823201554.90551-26-luc.vanoostenryck@gmail.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Luc Van Oostenryck Aug. 23, 2017, 8:15 p.m. UTC
---
 mem2reg.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/mem2reg.c b/mem2reg.c
index 6fe864df0..a9bf78ed4 100644
--- a/mem2reg.c
+++ b/mem2reg.c
@@ -247,7 +247,7 @@  static unsigned long externaly_visible(struct symbol *sym, unsigned long mod)
 	struct pseudo_user *pu;
 
 	if (mod)
-		goto external_visibility;
+		return mod;
 
 	FOR_EACH_PTR(pseudo->users, pu) {
 		/* We know that the symbol-pseudo use is the "src" in the instruction */
@@ -261,8 +261,7 @@  static unsigned long externaly_visible(struct symbol *sym, unsigned long mod)
 		case OP_SYMADDR:
 			if (!insn->bb)
 				continue;
-			mod |= MOD_ADDRESSABLE;
-			goto external_visibility;
+			return MOD_ADDRESSABLE;
 		case OP_NOP:
 		case OP_SNOP:
 		case OP_LNOP:
@@ -273,8 +272,7 @@  static unsigned long externaly_visible(struct symbol *sym, unsigned long mod)
 		}
 	} END_FOR_EACH_PTR(pu);
 
-external_visibility:
-	return mod;
+	return 0;
 }
 
 static void promote_symbol(struct entrypoint *ep, struct symbol *sym)