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

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Mon Aug 1 21:15:30 PDT 2011


> How do you define "works"?

Prouduces better code?

 > You haven't provided a good explanation
> for why the LLVM IR level is a better place for tail duplication than
> the MI level.

I provide an example in the very first email.

> Have you come up with a solution for the problem that
> you can't judge the code size of IR instructions?  I'd like to see a
> more detailed design proposal.

A similar problem exists with the early tail dup at the IL level too.

> I realize, of course, that I haven't yet provided any details of my
> work, either.  I've got a bunch more pressing things to do this week,
> but I'll try to make progress soon.

BTW, this is the second time you mention this pass to oppose to patch
I am working on. The previous time it so happened that my patch
helped both webkit and firefox and it has already been committed.

I always try to send work in progress patches to collect feedback.
Would you mind doing the same? If reading your patch I realize it
is clearly better, I would be more than happy finish the
missing parts. I would also be happy to benchmark the two.

>> Sorry, the question was more on the "how to duplicate", not "where
>> to duplicate". If previous optimizations gives us
>>
>> zed: ... br i1 %foo, %indirectgoto, %bar
>>
>> and you decide that the indirect goto should be duplicated to zed,
>> how do you do it?
>
> If you want to duplicate back "zed", you need to duplicate all the
> code between that point and the indirect branch.

Sorry, what is "that point"? the br instruction? The indirectgoto
above is the bb created by clang with the indirectbr.

Cheers,
Rafael



More information about the llvm-commits mailing list