diff mbox

[RFC,30/48] mem2reg: remove one indent level

Message ID 20170823201554.90551-31-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 | 22 +++++++++-------------
 1 file changed, 9 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/mem2reg.c b/mem2reg.c
index 2a976e826..b7dc3cb4b 100644
--- a/mem2reg.c
+++ b/mem2reg.c
@@ -337,21 +337,17 @@  static void promote_symbol(struct entrypoint *ep, struct symbol *sym)
 	} END_FOR_EACH_PTR_REVERSE(pu);
 
 	/* If we converted all the loads, remove the stores. They are dead */
-	if (all && !mod) {
+	if (all && !mod)
 		return kill_pseudo_stores(pseudo);
-	} else {
-		/*
-		 * If we couldn't take the shortcut, see if we can at least kill some
-		 * of them..
-		 */
-		kill_pseudo_dominated_stores(pseudo, !mod);
-
-		if (!(mod & (MOD_NONLOCAL | MOD_STATIC))) {
-			kill_pseudo_dead_stores(ep, pseudo, !mod);
-		}
-	}
 
-	return;
+	/*
+	 * If we couldn't take the shortcut, see if we can at least kill some
+	 * of them..
+	 */
+	kill_pseudo_dominated_stores(pseudo, !mod);
+
+	if (!(mod & (MOD_NONLOCAL | MOD_STATIC)))
+		kill_pseudo_dead_stores(ep, pseudo, !mod);
 }
 
 void promote_symbols_usage(struct entrypoint *ep)