[PATCH] D84679: [VPlan] Disconnect VPValue and VPUser.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 08:00:17 PDT 2020


dmgreen added a comment.

Hmm. OK. I do strong believe that we should be moving towards def-use chains, so in general I'm glad to see that happening.

I'm less convinced about the multiple inheritance.  That seems like an antipattern. We can likely make it work either way, but can you try and explain why you think that way is better? As opposed to making all VPRecipe's inherit from VPValue from VPRecipeBase? Perhaps I'm too stuck in the "llvm-ir" way of thinking, with VPValue being Value, VPUser being User, VPRecipeBase being Instruction and the individual recipes being the different instructions.

I have put up D88152 <https://reviews.llvm.org/D88152> and D88153 <https://reviews.llvm.org/D88153>, to try and show the difference between what I came up with for the two approaches. (They are still very rough. Both can probably be made to work, I'm just not sure what the advantage of the multiple inheritance version is)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84679/new/

https://reviews.llvm.org/D84679



More information about the llvm-commits mailing list