edA-qa mort-ora-y via llvm-dev
2018-Apr-21 17:01 UTC
[llvm-dev] How to add/use parameter attributes? Troubles with "byval"
I'm unable to figure out how IR attributes can be added via the C++ API. I need to create a function like this: %1 = call i64 @abi_call_test_tuple_2p(%struct.abi_tuple_2p* byval align 8 %v) Where a structure is being passed by value. I need to add the `byval` attribute somewhere (I'm not clear if this is on the function arguments or the type). I'm also uncertain of why that results in a different calling convention than just: %1 = call i64 @abi_call_test_tuple_2p(%":abi_tuple_2" %0) Does this not also pass the same structure by-value to the function? (It doesn't yield the same results it appears). -- 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
Reasonably Related Threads
- Subject: How to define vector element type bool in builtin function
- Difference between "byval" and actually passing by value?
- Difference between "byval" and actually passing by value?
- A struct {i8, i64} has size == 12, clang says size 16
- A struct {i8, i64} has size == 12, clang says size 16