move a bunch of register constraints from being handled by
authorChris Lattner <sabre@nondot.org>
Mon, 9 Apr 2007 05:49:22 +0000 (05:49 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 9 Apr 2007 05:49:22 +0000 (05:49 +0000)
commit0f65cad57f041a2e7d3e6e11809a795c13cbfec7
tree5de4fcf37ce148a4f015206053b78aac5954cd3f
parente5a24ec782142ea90be1f24d19faa5fa11598c49
move a bunch of register constraints from being handled by
getRegClassForInlineAsmConstraint to being handled by
getRegForInlineAsmConstraint.  This allows us to let the llvm register allocator
allocate, which gives us better code.  For example, X86/2007-01-29-InlineAsm-ir.ll
used to compile to:

_run_init_process:
        subl $4, %esp
        movl %ebx, (%esp)
        xorl %ebx, %ebx
        movl $11, %eax
        movl %ebx, %ecx
        movl %ebx, %edx
        # InlineAsm Start
        push %ebx ; movl %ebx,%ebx ; int $0x80 ; pop %ebx
        # InlineAsm End

Now we get:
_run_init_process:
        xorl %ecx, %ecx
        movl $11, %eax
        movl %ecx, %edx
        # InlineAsm Start
        push %ebx ; movl %ecx,%ebx ; int $0x80 ; pop %ebx
        # InlineAsm End

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35804 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp