[PATCH] D46827: [VPlan] Add VPInstruction to VPRecipe transformation.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 10:17:11 PDT 2018


fhahn added a comment.

> My only concern is how that is going to work for outer loops. We need VPInstructionToVPRecipe working for them and, IMO, we shouldn't create another fork inside the VPlan native path to treat outer and inner loops differently. Reducing the number of recipes used in this step would also help us replace them quickly with VPInstructions in the VPlan native path. For those reasons, I suggested that we should start with a very simple VPInstructionToVPRecipe step that only created basic recipes (i.e., VPWiden*) for now, and leave interleaving and other optimizations for later, at least until we can make them work for outer loops. Do you see any problem with this approach? Is there something specific that you need for your follow-up work? We can think about how to accommodate it.

I played a around a bit with generating code for outer loops. I think there are a few things we need to do:

1. collect some required information about phis during the legality checks,
2. set which instructions to widen/scalarize in the outer/inner loops for the user provided VF, - that's all  VPInstructionToVPRecipe needs for most instructions
3. handle inner loop PHI nodes and control flow between outer  & inner loop.


https://reviews.llvm.org/D46827





More information about the llvm-commits mailing list