[PATCH] D84679: [VPlan] Disconnect VPValue and VPUser.
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 21 09:54:08 PDT 2020
dmgreen added a comment.
I was trying very recently to get VPlan to perform some vector combines. Things like recognizing vmulh patterns.
The code I had was still in a very rough state but I ended up going in completely the opposite direction. I had VPRecipeBase inherit from VPUser, which in turn inherited from VPValue. Like I said it was all very rough and I'm not sure yet if it was necessary, but I felt like it simplified things. It was useful to know you could inspect operands and uses of any recipe, and properly walk up and down the def-uses chain. Perform things like replaceAllUsesWith and recursively delete dead recipes after replacing them with others.
Perhaps I need to look at that again, as I certainly hadn't tried to tackle multiple producing values. My gut instinct would be to use something like the SDValue from ISel, but I hadn't looked at all into what that would really look like. This way might well be better in the long run, I'm not sure. I had gotten distracted into cost modelling instead..
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