[llvm-commits] [llvm] r46485 - in /llvm/trunk: include/llvm/Target/TargetLowering.h lib/CodeGen/AsmPrinter.cpp lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h

Dale Johannesen dalej at apple.com
Mon Jan 28 21:24:23 PST 2008


On Jan 28, 2008, at 8:29 PM, Chris Lattner wrote:

>
> On Jan 28, 2008, at 6:21 PM, Dale Johannesen wrote:
>
>> Author: johannes
>> Date: Mon Jan 28 20:21:21 2008
>> New Revision: 46485
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=46485&view=rev
>> Log:
>> Handle 'X' constraint in asm's better.
>
> Hey Dale,
>
> Can this be done in llvm-gcc?  It seems better to only expose
> 'simplified' constraints to the llvm code generator.  This means the
> target hooks would become wonderful macros in i386.h for example, but
> that seems tolerable.

Sure, but you'd have to reimplement it in clang (etc).  I think it's  
better to have it in one place.  (If you're thinking we  don't need to  
support this in clang eventually, I don't believe it, alas.)

> It also might be possible to iterate over the constraint letters
> somehow in GCC, which would make it possible to implement this in a
> target independent way.

In llvm you mean maybe?  Could be, I didn't look at that closely.  I  
know there are some collisions between targets of machine-dependent  
constraint letters, but the semantics can't be too different or reload  
would screw up; it might be doable.

That said, I'm not particularly happy with the implementation I wound  
up with, not neat-looking at all and there's probably cases that  
aren't handled the same as gcc.  I don't think there's a silver bullet  
though.




More information about the llvm-commits mailing list