[llvm-commits] [llvm-gcc-4.2] r48502 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Dale Johannesen
dalej at apple.com
Wed Mar 19 18:20:57 PDT 2008
On Mar 19, 2008, at 6:02 PM, Chris Lattner wrote:
>
> On Mar 19, 2008, at 12:08 PM, Duncan Sands wrote:
>
>> Hi Dale,
>>
>>> That term 'aggregate' is confusing.
>>
>> inside llvm-convert, aggregate means: not a first class type. So an
>> "aggregate" is exactly something that cannot be passed around in a
>> Value (thus the use of DestLoc). Since gcc vector types are
>> converted
>> to LLVM vector types, they are not aggregates in this sense, because
>> they are first class types. In the rest of this email, when I use
>> the
>> word "aggregate" I will mean it in this sense.
>>
>>> From the point of view of LLVM
>>> calls these vectors *are* aggregates in this case, in that the
>>> correct
>>> IR to generate for the call uses the sret mechanism.
>>
>> Let's call this: "pass by sret". Whether something is passed by sret
>> or not is specified by the ABI and as such has nothing to do with
>> whether
>> it is an aggregate or not. For example, some strange ABI could
>> specify
>> that integers should be passed using the sret mechanism. Silly, but
>> logically possible.
>
> Right. It seems logical in this case for the EmitCall code to say
> "this is a first class LLVM value that is references as llvm values"
> and "this first class value needs to be returned as sret" therefore
> "I should create a temporary in EmitCall, and issue a load after the
> call to return the first class value".
>
> Does this seem reasonable Dale?
Yes. I'll do it that way.
More information about the llvm-commits
mailing list