linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 6/9] dump-ir: saner use of fdump_linearize
Date: Wed,  8 Nov 2017 11:27:59 +0100	[thread overview]
Message-ID: <20171108102802.43987-7-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20171108102802.43987-1-luc.vanoostenryck@gmail.com>

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 linearize.c      | 5 +----
 test-linearize.c | 2 ++
 test-unssa.c     | 2 ++
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/linearize.c b/linearize.c
index 65a4baf96..4970771bc 100644
--- a/linearize.c
+++ b/linearize.c
@@ -2220,11 +2220,8 @@ static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_t
 		add_one_insn(ep, insn);
 	}
 
-	if (fdump_linearize) {
-		if (fdump_linearize == 2)
-			return ep;
+	if (fdump_linearize)
 		show_entry(ep);
-	}
 
 	/*
 	 * Do trivial flow simplification - branches to
diff --git a/test-linearize.c b/test-linearize.c
index fe0673bef..284526781 100644
--- a/test-linearize.c
+++ b/test-linearize.c
@@ -47,6 +47,8 @@ static void clean_up_symbols(struct symbol_list *list)
 
 		expand_symbol(sym);
 		ep = linearize_symbol(sym);
+		if (fdump_linearize == 2)
+			continue;
 		if (ep)
 			show_entry(ep);
 	} END_FOR_EACH_PTR(sym);
diff --git a/test-unssa.c b/test-unssa.c
index 240d99601..ec5c93015 100644
--- a/test-unssa.c
+++ b/test-unssa.c
@@ -62,6 +62,8 @@ static int compile(struct symbol_list *list)
 		struct entrypoint *ep;
 		expand_symbol(sym);
 		ep = linearize_symbol(sym);
+		if (fdump_linearize == 2)
+			continue;
 		if (ep)
 			output_fn(ep);
 		else
-- 
2.14.0


  parent reply	other threads:[~2017-11-08 10:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08 10:27 [PATCH 0/9] dump IR Luc Van Oostenryck
2017-11-08 10:27 ` [PATCH 1/9] dump-ir: add defines for the compilation passes Luc Van Oostenryck
2017-11-08 10:27 ` [PATCH 2/9] dump-ir: allow to specify the passes to execute via cli's options Luc Van Oostenryck
2017-11-08 10:27 ` [PATCH 3/9] dump-ir: activate/deactive pass 'mem2reg' Luc Van Oostenryck
2017-11-08 10:27 ` [PATCH 4/9] dump-ir: set the default optimization level to 2 Luc Van Oostenryck
2017-11-08 10:27 ` [PATCH 5/9] dump-ir: use -O0 Luc Van Oostenryck
2017-11-08 10:27 ` Luc Van Oostenryck [this message]
2017-11-08 10:28 ` [PATCH 7/9] dump-ir: rename -fdump-linearize to -fdump-ir Luc Van Oostenryck
2017-11-08 10:28 ` [PATCH 8/9] dump-ir: make it more flexible Luc Van Oostenryck
2017-11-08 10:28 ` [PATCH 9/9] dump-ir: activate -fdump-ir=mem2reg Luc Van Oostenryck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171108102802.43987-7-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).