[LLVMdev] Speculative Loop Parallelization on LLVM IR

Devang Patel devang.patel at gmail.com
Mon Jun 21 11:23:36 PDT 2010


On Mon, Jun 21, 2010 at 10:27 AM, Daniel Berlin <dberlin at dberlin.org> wrote:
> On Mon, Jun 21, 2010 at 1:12 AM, Javed Absar <javed.absar at gmail.com> wrote:
>> Hi Tobias:
>>
>> Thanks for replying . So if I understand correctly,  in LLVM currently, the
>> Polyhedral model is being built ( LLVM IR -------> Poly Model ---------->
>> LLVM IR ).
>> This is for compile-time optimizations of loop-nests [e.g.
>> loop-transformations to expose parallelism or improve locality etc]. Yes,
>> thats great for optimizing loop-nests.
>>
>> As an additional, since the real value of LLVM to me is run-time
>> optimizations possibilities, some loop-nest optimizations "needs" to be done
>> at run-time.
>> I say "needs" because many loops have unresolvable data-dependencies at
>> compile-time
>
>
> In cases where it matters, most compilers will perform function
> versioning and include data dependence if checks to check at runtime
> which version (parallel or non) can be run.
>
> Then the JIT can simply eliminate the branches it proves are live/dead
> and you are left with either the parallelized or not version.

May be he is thinking about the cases where dependencies can not be
fully resolved until the loop is run ?

> As you say, this is the standard approach, why would you need to run
> Poly at runtime?

-
Devang




More information about the llvm-dev mailing list