Handle passing constant integers to functions much more efficiently. Instead
authorChris Lattner <sabre@nondot.org>
Mon, 1 Mar 2004 02:42:43 +0000 (02:42 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 1 Mar 2004 02:42:43 +0000 (02:42 +0000)
commit21585221b6338b9cc8b685e28138345e4e78bdee
tree67a1cfed51b8dbfbba20782e512e4a002d10e845
parentf2cab76a47d6caf459b27fccc849cd6a6145725a
Handle passing constant integers to functions much more efficiently.  Instead
of generating this code:

        mov %EAX, 4
        mov DWORD PTR [%ESP], %EAX
        mov %AX, 123
        movsx %EAX, %AX
        mov DWORD PTR [%ESP + 4], %EAX
        call Y

we now generate:
        mov DWORD PTR [%ESP], 4
        mov DWORD PTR [%ESP + 4], 123
        call Y

Which hurts the eyes less.  :)

Considering that register pressure around call sites is already high (with all
of the callee clobber registers n stuff), this may help a lot.

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