[llvm-commits] [patch] Add a pass for duplicating indirectbr at the IL level

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Jul 19 20:56:54 PDT 2011


The attached patch adds a pass for duplicating indirectbr at the IL
level. The motivation is to get better instruction selection. For
example, with the current MI based duplication, we get

leaq    table(,%r11,8), %r8
jmpq    *(%r8)

with this patch we get

jmpq    *table(,%r11,8)


The pass is mostly the current CodeGen TailDuplication with ideas taken
from the old IL TailDuplication (it looks like this one is unused,
should it be deleted?).

With this patch in we can probably remove the bias for duplicating
indirectbr in CodeGen.

The two main points I would like a review are the two fixmes in the
code: What it is the best place to factor the "isDefLiveOut" function
and if SSAUpdate should be extended to handle the case mentioned by the
other FIXME.

Thanks,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: indirectbr.patch
Type: text/x-patch
Size: 24460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110719/55f7674c/attachment.bin>


More information about the llvm-commits mailing list