All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christopher Li <sparse@chrisli.org>
To: linux-sparse@vger.kernel.org
Cc: Josh Triplett <josh@freedesktop.org>
Subject: [PATCH 4] Disable liveness "dead" instruction by default.
Date: Fri, 9 Feb 2007 16:18:10 -0800	[thread overview]
Message-ID: <20070210001810.GC20644@chrisli.org> (raw)

The liveness instruction take up about 10% of the bytecode bloat file.
It is not very useful, it is duplicate information can be obtain
from the def/user chain.

This change disable the liveness instruction by default.
The caller can track_pseudo_death() if needed.

Signed-Off-By: Christopher Li <sparse@chrisli.org>

Index: sparse/lib.c
===================================================================
--- sparse.orig/lib.c	2007-02-02 16:03:32.000000000 -0800
+++ sparse/lib.c	2007-02-02 16:06:25.000000000 -0800
@@ -191,7 +191,8 @@ int Wenum_mismatch = 1;
 int Wdo_while = 1;
 int Wuninitialized = 1;
 
-int dbg_entry;
+int dbg_entry = 0;
+int dbg_dead = 0;
 
 int preprocess_only;
 char *include;
@@ -391,6 +392,7 @@ static char **handle_switch_W(char *arg,
 
 static struct warning debugs[] = {
 	{ "entry", &dbg_entry},
+	{ "dead", &dbg_dead},
 };
 
 
Index: sparse/example.c
===================================================================
--- sparse.orig/example.c	2007-02-02 16:00:51.000000000 -0800
+++ sparse/example.c	2007-02-02 16:06:02.000000000 -0800
@@ -1946,6 +1946,7 @@ int main(int argc, char **argv)
 	char *file;
 
 	compile(sparse_initialize(argc, argv, &filelist));
+	dbg_dead = 1;
 	FOR_EACH_PTR_NOTAG(filelist, file) {
 		compile(sparse(file));
 	} END_FOR_EACH_PTR_NOTAG(file);
Index: sparse/lib.h
===================================================================
--- sparse.orig/lib.h	2007-02-02 16:04:07.000000000 -0800
+++ sparse/lib.h	2007-02-02 16:04:46.000000000 -0800
@@ -98,6 +98,7 @@ extern int Wdo_while;
 extern int Wuninitialized;
 
 extern int dbg_entry;
+extern int dbg_dead;
 
 extern void declare_builtin_functions(void);
 extern void create_builtin_stream(void);
Index: sparse/linearize.c
===================================================================
--- sparse.orig/linearize.c	2007-02-02 16:00:51.000000000 -0800
+++ sparse/linearize.c	2007-02-02 16:05:15.000000000 -0800
@@ -2134,7 +2134,8 @@ repeat:
 	}
 
 	/* Finally, add deathnotes to pseudos now that we have them */
-	track_pseudo_death(ep);
+	if (dbg_dead)
+		track_pseudo_death(ep);
 
 	return ep;
 }

             reply	other threads:[~2007-02-10  0:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-10  0:18 Christopher Li [this message]
2007-02-28 19:46 ` [PATCH 4] Disable liveness "dead" instruction by default Josh Triplett

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=20070210001810.GC20644@chrisli.org \
    --to=sparse@chrisli.org \
    --cc=josh@freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.