[LLVMdev] sret on scalars
andrewl at lenharth.org
Wed Aug 25 07:09:48 PDT 2010
On Mon, Aug 23, 2010 at 2:42 PM, Chris Lattner <clattner at apple.com> wrote:
> On Aug 19, 2010, at 1:38 PM, Andrew Lenharth wrote:
>> I am needing to return i128 as a shadow return due to abi issues on
>> alpha. The problem I am running into is the code for doing that with
>> scalars (currently only used for vectors, as far as I can tell) sets
>> the sret on the parameter. If I just go this path, then I am setting
>> sret on an integer pointer, which verify objects too. LangRef doesn't
>> say scalars are allowed to have sret set, but sret is used for
>> So my question is: should I, when updating the llvm-gcc, not set sret
>> on my i128 shadow returns (also on f128), or should Verify accept sret
>> on scalar pointers, not just struct or vector pointers?
> Hey Andrew,
> sret doesn't make sense on scalars or vectors. Where are you seeing it work with vectors?
Ok. There is a a HandleScalarShadowResult, which is an implementation
subset of HandleAggregateShadowResult (has but doesn't handle the
return-shadow-pointer-from-function flag it takes). The comments and
code path led me to believe it applied to Vector types, though
Verifier didn't. Perhaps it is a dead code path, I don't know.
I guess that means I need to duplicate or generalize some stuff.
More information about the llvm-dev