linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dibyendu Majumdar <mobile@majumdar.org.uk>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: sparse-llvm incorrect definition of local variables
Date: Tue, 7 Mar 2017 07:31:34 +0000	[thread overview]
Message-ID: <CACXZuxcC-VPjB9CD0E9zUXp6XNS8v1DdvPUZ1vc88jqwYdFUhA@mail.gmail.com> (raw)
In-Reply-To: <20170307064436.qtcscbwbjsrjoyko@macpro.local>

Hi Luc,

On 7 March 2017 at 06:44, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> On Tue, Mar 07, 2017 at 12:08:22AM +0000, Dibyendu Majumdar wrote:
>> When I try to compile following in sparse-llvm:
>>
>> int main(const char *argv[]) {
>>  int values[5];
>>  values[0] = 9;
>>  ...
>>  values[4] = 5;
>>  int *p = &values[4];
>>  return (*p == 5) ? 0 : 1;
>> }
>>
>> I get:
>>
>> @values = external global [5 x i32]
>> ...
>>
>> Here 'values' has been defined above as external global, whereas it
>> should be allocated on the stack.
>
> Mmmh, I'll need to look a bit further at this one.
>

It appears that sparse-llvm only creates a local stack object for each
OP_PHI instruction. What should be the general approach for
identifying local stack objects in sparse linearized output?

Regards
Dibyendu

  reply	other threads:[~2017-03-07  7:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-07  0:08 sparse-llvm incorrect definition of local variables Dibyendu Majumdar
2017-03-07  6:44 ` Luc Van Oostenryck
2017-03-07  7:31   ` Dibyendu Majumdar [this message]
2017-03-08  6:53     ` Luc Van Oostenryck
2017-03-08 23:38       ` Dibyendu Majumdar
2017-03-09  1:50         ` Dibyendu Majumdar
2017-03-09 14:35           ` Luc Van Oostenryck
2017-03-09 14:42             ` Dibyendu Majumdar
2017-03-09 23:30             ` Dibyendu Majumdar
2017-03-09 23:37               ` Dibyendu Majumdar
2017-03-09 14:42         ` Luc Van Oostenryck
2017-03-13 11:16 ` Dibyendu Majumdar
2017-03-14 15:54   ` Dibyendu Majumdar
2017-03-17 10:48     ` Dibyendu Majumdar

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=CACXZuxcC-VPjB9CD0E9zUXp6XNS8v1DdvPUZ1vc88jqwYdFUhA@mail.gmail.com \
    --to=mobile@majumdar.org.uk \
    --cc=linux-sparse@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    /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).