linux-sparse.vger.kernel.org archive mirror
 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 casts needed on function call arguments and returns
Date: Sun, 19 Mar 2017 16:32:23 +0100	[thread overview]
Message-ID: <20170319153222.wihoz27fiw3ospxw@macpro.local> (raw)
In-Reply-To: <CACXZuxd79XySoaYR5wckhx3KfQELV-gg5hWyTS5Q5i+=zOh6Fw@mail.gmail.com>

On Tue, Mar 14, 2017 at 10:48:53AM +0000, Dibyendu Majumdar wrote:
> It appears that both function call arguments and returns from
> functions need to be cast to the expected type in sparse-llvm. This
> may be because the linearizer is eliminating casts - I am not sure.

It's one of the cause, yes.
But again, in sparse the type are in the instructions, not in the values.

> From LLVM perspective two pointers to different base types are not the
> same - similarly various integer types and floating types are not
> interchangeable.
> 
> By adding casts to store operations (both op_store and op_phisrc) as
> well as in function call arguments the number of errors I am getting
> when compiling 'minilua' has reduced significantly. However still 192
> errors remain (but hopefully many will go with the next fix!).
> 
> Of course even with all errors being fixed it doesn't mean that the
> generated code is right. Only when I run the program on Lua test suite
> it will become apparent whether the generated code is correct or not.

Things should be greatly improved in the llvm-fixes-v3 serie
I submitted yesterday.

-- Luc

      reply	other threads:[~2017-03-19 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 10:48 sparse-llvm casts needed on function call arguments and returns Dibyendu Majumdar
2017-03-19 15:32 ` Luc Van Oostenryck [this message]

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=20170319153222.wihoz27fiw3ospxw@macpro.local \
    --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 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).