aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/System/DynamicLibrary.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-29 05:55:24 +0000
committerChris Lattner <sabre@nondot.org>2004-11-29 05:55:24 +0000
commitf9c5dc9fb4c1efce67de8aa5a55c347379efe815 (patch)
tree4e26be08f0aec0ee112b5a86a12782800cb89373 /llvm/lib/System/DynamicLibrary.cpp
parentfc66af4476d5ef35bdbd5e0da07646ac0adc29f9 (diff)
downloadllvm-f9c5dc9fb4c1efce67de8aa5a55c347379efe815.zip
llvm-f9c5dc9fb4c1efce67de8aa5a55c347379efe815.tar.gz
llvm-f9c5dc9fb4c1efce67de8aa5a55c347379efe815.tar.bz2
Revamp long/ulong comparisons to use a much more efficient sequence (thanks
to Brian and the Sun compiler for pointing out that the obvious works :) This also enables folding all long comparisons into setcc and branch instructions: before we could only do == and != For example, for: void test(unsigned long long A, unsigned long long B) { if (A < B) foo(); } We now generate: test: subl $4, %esp movl %esi, (%esp) movl 8(%esp), %eax movl 12(%esp), %ecx movl 16(%esp), %edx movl 20(%esp), %esi subl %edx, %eax sbbl %esi, %ecx jae .LBBtest_2 # UnifiedReturnBlock .LBBtest_1: # then call foo movl (%esp), %esi addl $4, %esp ret .LBBtest_2: # UnifiedReturnBlock movl (%esp), %esi addl $4, %esp ret Instead of: test: subl $12, %esp movl %esi, 8(%esp) movl %ebx, 4(%esp) movl 16(%esp), %eax movl 20(%esp), %ecx movl 24(%esp), %edx movl 28(%esp), %esi cmpl %edx, %eax setb %al cmpl %esi, %ecx setb %bl cmove %ax, %bx testb %bl, %bl je .LBBtest_2 # UnifiedReturnBlock .LBBtest_1: # then call foo movl 4(%esp), %ebx movl 8(%esp), %esi addl $12, %esp ret .LBBtest_2: # UnifiedReturnBlock movl 4(%esp), %ebx movl 8(%esp), %esi addl $12, %esp ret llvm-svn: 18330
Diffstat (limited to 'llvm/lib/System/DynamicLibrary.cpp')
0 files changed, 0 insertions, 0 deletions