[llvm-commits] [llvm] r54744 - in /llvm/trunk/lib: AsmParser/LLLexer.cpp AsmParser/llvmAsmParser.y VMCore/AsmWriter.cpp VMCore/Verifier.cpp

Chris Lattner clattner at apple.com
Thu Aug 14 10:19:46 PDT 2008


On Aug 14, 2008, at 9:35 AM, Dale Johannesen wrote:
> On Aug 14, 2008, at 2:58 AMPDT, Anton Korobeynikov wrote:
>> Hello, Dale
>>
>>> It does that for parameters (already did); the issue is return
>>> values.
>>> (And it's not new, it was there, just not fully implemented.  See
>>> X86CallingConv.td.)
>> Well, that's ok. But I'm just thinking about not to duplicate  
>> efforts.
>> Why don't allow inreg attribute on return values and handle it in  
>> this
>> way? It seems to be the most flexible solution.
>
> Both the sseregparm and non-sseregparm conventions return the value in
> a register; but they use different registers.
> I suppose we could define 'inreg' to mean one or the other, but that
> seems very arbitrary to me.

I agree that it is arbitrary, but "inreg" is already an arbitrary flag  
that is used to communicate between the front-ends and backends.  I  
think it is simple enough to define that "inreg" for the x86 backend  
means to pass/return in an XMM register.

To me, having a well defined semantics is more important than the  
actual spelling of the magic attribute.  Like Anton, I prefer to use  
inreg on the result instead of introducing a new calling convention.

Thank you for working on this Dale!

-Chris



More information about the llvm-commits mailing list