[LLVMdev] LLVM Parallel IR

Renato Golin renato.golin at linaro.org
Thu Mar 12 03:11:03 PDT 2015


On 12 March 2015 at 09:29, Kevin Streit <streit at mailbox.org> wrote:
> Basically the parallelism and the different dominance resulting from it might
> affect most flow analyses.
> Of course we could make them all aware of the intrinsics, but how far are we
> then away from integrating it into the one, or a different, IR.

Any choice (metadata, intrinsics, new IR, change IR) will take time
and will be hard. What matters most is where do you want to go from
there.

If your task is mainly research, produce a PhD and be gone with it,
probably creating a whole new IR where you can control how it comes
and goes to/from LLVM IR on a very specific version of LLVM is the
fastest way you'll get there. This will also ensure that you're not
adding unknown delays to an already troubled enterprise (PhDs). As an
example, we have Polly, which is still not fully integrated into LLVM
and maybe never will. It's got some very interesting transformations,
but the integration with the rest of the workflow has proven not easy.

If you want this to be widely used after the research is done, than
I'd suggest a little more discussion on the merits of the remaining
alternatives (metadata, intrinsics, IR changes). Your short
description has already given some food for thought, and I see why
you'd use intrinsics (barrier?) and why metadata could be cumbersome
(annotate everything?) and fragile (we'd have to teach most passes to
not throw them on specific conditions). Other heavy weight
optimisations, such as the vectorizer and LTO, have been quickly
integrated and evolved inside LLVM, because that was the original
intention.

One thing that would help a lot is to know which IR constructs are
short-sighted. So, like you did just now, give some examples of the
problems you'll face and why the current IR can't handle it. We can
then discuss the other options and see which ones are more
appropriate. Based on that discussion, you can decide which parts of
your project will change the IR and which will use some other
techniques (metadata, intrinsics).

cheers,
--renato



More information about the llvm-dev mailing list