OSDN Git Service

Implement major new fastisel functionality: the matcher can now handle immediates...
authorChris Lattner <sabre@nondot.org>
Mon, 18 Apr 2011 06:22:33 +0000 (06:22 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 18 Apr 2011 06:22:33 +0000 (06:22 +0000)
commit1518afddea6c0a4275a9ac64a9ffe2b6b4c0600a
treef09998e754d0346e63168c3547b3d67c2c9fc880
parent1023643d501b4375b261eb5449a2bb0195f49780
Implement major new fastisel functionality: the matcher can now handle immediates with
value constraints on them (when defined as ImmLeaf's).  This is particularly important
for X86-64, where almost all reg/imm instructions take a i64immSExt32 immediate operand,
which has a value constraint.  Before this patch we ended up iseling the examples into
such amazing code as:

movabsq $7, %rax
imulq %rax, %rdi
movq %rdi, %rax
ret

now we produce:

imulq $7, %rdi, %rax
ret

This dramatically shrinks the generated code at -O0 on x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129691 91177308-0d34-0410-b5e6-96231b3b80d8
test/CodeGen/X86/fast-isel-x86-64.ll
utils/TableGen/CodeGenDAGPatterns.h
utils/TableGen/FastISelEmitter.cpp