linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sparse-llvm casts needed on function call arguments and returns
@ 2017-03-14 10:48 Dibyendu Majumdar
  2017-03-19 15:32 ` Luc Van Oostenryck
  0 siblings, 1 reply; 2+ messages in thread
From: Dibyendu Majumdar @ 2017-03-14 10:48 UTC (permalink / raw)
  To: Linux-Sparse

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.
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.

Regards
Dibyendu

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-19 15:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).