All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Dibyendu Majumdar <mobile@majumdar.org.uk>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>
Subject: Re: sparse-llvm array size computation issue
Date: Wed, 29 Mar 2017 17:10:25 +0200	[thread overview]
Message-ID: <CAMHZB6FgpmkNbfcNWb-QjLghkAOZo6=1O0YafZXWFk4O70Neew@mail.gmail.com> (raw)
In-Reply-To: <CACXZuxcYqojtsQEU4t4Kvf1FARj8W1c__6DHXWFxzubEq9Wpjg@mail.gmail.com>

On Wed, Mar 29, 2017 at 4:41 PM, Dibyendu Majumdar
<mobile@majumdar.org.uk> wrote:
> Hi Luc,
>
>>
>> Okay thank you for the insight. It seems then that sparse-llvm is not
>> handing this correctly.
>>
>
> I looked at this again briefly today. I think that not having the size
> information on the array type poses some problems.
>
> + will instructions have access to the SYM_NODE always? It doesn't
> appear to be the case.

The SYM_NODE is present/only added when needed.
Of course, it's possible that it's somehow stripped in sparse-llvm.

> + sparse-llvm caches the symbol's type in symbol->aux. For array
> types, we would still need to do this - storing the type against
> SYM_NODE objects is probably not correct.

I don't see why it shouldn't be correct.

> So I feel that given that the size is an integral part of the array
> type then it makes sense that it should be present on the array type.

I feel some sympathy for the argument here but ...
there are other infos stored in the SYM_NODE that *can't* be
stored in the symbol underneath it. I'm thinking about the exact type,
the modifiers, for example. You will soon or later need to handle
the SYM_NODE anyway; stripping it and trying to directly use the
base type under is in general wrong.

-- Luc

  reply	other threads:[~2017-03-29 15:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 20:25 sparse-llvm array size computation issue Dibyendu Majumdar
2017-03-28 20:41 ` Dibyendu Majumdar
2017-03-28 20:49   ` Luc Van Oostenryck
2017-03-28 21:06     ` Dibyendu Majumdar
2017-03-28 21:14       ` Dibyendu Majumdar
2017-03-28 21:33         ` Luc Van Oostenryck
2017-03-28 21:43           ` Dibyendu Majumdar
2017-03-28 22:21             ` Luc Van Oostenryck
2017-03-29 11:32               ` Dibyendu Majumdar
2017-03-29 14:41                 ` Dibyendu Majumdar
2017-03-29 15:10                   ` Luc Van Oostenryck [this message]
2017-03-29 16:21                     ` Dibyendu Majumdar
2017-03-29 16:41                       ` Linus Torvalds
2017-03-29 18:12                         ` Dibyendu Majumdar
2017-03-29 20:24                           ` Dibyendu Majumdar
2017-12-28 21:30         ` 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='CAMHZB6FgpmkNbfcNWb-QjLghkAOZo6=1O0YafZXWFk4O70Neew@mail.gmail.com' \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=mobile@majumdar.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.