From: Christopher Li <sparse@chrisli.org>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Dave Jones <davej@redhat.com>,
Josh Triplett <josh@freedesktop.org>,
linux-sparse@vger.kernel.org
Subject: [PATCH] Fix the annotated inline call position
Date: Fri, 23 Mar 2007 16:08:17 -0700 [thread overview]
Message-ID: <20070323230817.GC27992@chrisli.org> (raw)
In-Reply-To: <20070322125911.GW4095@ftp.linux.org.uk>
Here is some diff comparing output between the sparse 0.2 and the tip of git.
-mm/mmap.c:1631:2: warning: context imbalance in 'expand_stack' - different lock
contexts for basic block
+include/linux/rmap.h:55:2: warning: context imbalance in 'expand_stack' - diffe
The change is introduced by the inline annotate instruction,
which mark the bb->pos to the inline function.
This change make it back to the caller position.
Signed-Off-By: Christopher Li <sparse@chrisli.org>
Index: sparse/linearize.c
===================================================================
--- sparse.orig/linearize.c 2007-03-22 14:11:40.000000000 -0700
+++ sparse/linearize.c 2007-03-23 13:15:28.000000000 -0700
@@ -1650,6 +1650,7 @@ static pseudo_t linearize_inlined_call(s
{
struct instruction *insn = alloc_instruction(OP_INLINED_CALL, 0);
struct statement *args = stmt->args;
+ struct basic_block *bb;
pseudo_t pseudo;
if (args) {
@@ -1664,6 +1665,9 @@ static pseudo_t linearize_inlined_call(s
insn->target = pseudo = linearize_compound_statement(ep, stmt);
use_pseudo(insn, symbol_pseudo(ep, stmt->inline_fn), &insn->func);
+ bb = ep->active;
+ if (bb && !bb->insns)
+ bb->pos = stmt->pos;
add_one_insn(ep, insn);
return pseudo;
}
next prev parent reply other threads:[~2007-03-23 23:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 6:36 sparse segfault on ppc64 Dave Jones
2007-03-22 7:33 ` Al Viro
2007-03-22 7:03 ` Christopher Li
2007-03-22 12:59 ` Al Viro
2007-03-22 22:16 ` Christopher Li
2007-03-23 23:08 ` Christopher Li [this message]
2007-04-20 10:09 ` [PATCH] Fix the annotated inline call position Josh Triplett
2007-03-22 16:04 ` sparse segfault on ppc64 Dave Jones
2007-03-22 17:11 ` Dave Jones
2007-03-22 22:10 ` Christopher Li
2007-03-23 22:04 ` more spewage (Re: sparse segfault on ppc64) Randy Dunlap
2007-03-23 22:57 ` Christopher Li
2007-03-23 23:10 ` [PATCH] handle label attributes Christopher Li
2007-03-25 18:52 ` Randy Dunlap
2007-04-20 10:17 ` Josh Triplett
2007-03-23 23:31 ` more spewage (Re: sparse segfault on ppc64) Sam Ravnborg
2007-03-23 23:01 ` Christopher Li
2007-03-23 23:43 ` Randy Dunlap
2007-03-24 6:44 ` Sam Ravnborg
2007-03-24 16:46 ` Randy Dunlap
2007-03-24 17:02 ` Linus Torvalds
2007-03-26 18:07 ` Christopher Li
2007-03-26 18:50 ` Randy Dunlap
2007-03-22 15:56 ` sparse segfault on ppc64 Dave Jones
2007-03-22 16:02 ` Al Viro
2007-03-22 8:36 ` [PATCH] vector parsing, was " Christopher Li
2007-03-23 23:14 ` [PATCH] vector parsing (take II) Christopher Li
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=20070323230817.GC27992@chrisli.org \
--to=sparse@chrisli.org \
--cc=davej@redhat.com \
--cc=josh@freedesktop.org \
--cc=linux-sparse@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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.