[llvm-dev] Difference between "byval" and actually passing by value?
edA-qa mort-ora-y via llvm-dev
llvm-dev at lists.llvm.org
Sat Apr 21 22:34:23 PDT 2018
There appears to be a difference between passing by value:
call void @foo(%some_struct %v)
And using the `byval` attribute on a pointer:
call void @foo(%some_struct* byval %v)
They are not compatible with each other yet logically do the same
thing. The second form is the one that appears to work with the ABI on
linux, and the first one not.
What is the reason for the difference?
--
edA-qa mort-ora-y
http://mortoray.com/
Creator of the Leaf language
http://leaflang.org/
Streaming algorithms, AI, and design on Twitch
https://www.twitch.tv/mortoray
Twitter
edaqa
More information about the llvm-dev
mailing list