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

Evan Cheng evan.cheng at apple.com
Thu Jul 21 12:20:44 PDT 2011


I haven't had a change to read the patch. But adding a dedicated pass for this seems wrong. How about putting it into codegenprep?

Evan

On Jul 19, 2011, at 8:56 PM, Rafael Ávila de Espíndola wrote:

> 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
> <indirectbr.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list