[PATCH] D84683: [VPlan] Use VPValue def for VPWidenGEPRecipe.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 11:32:20 PDT 2020


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:907
+
+  GetElementPtrInst *getUnderlyingInstruction() {
+    return cast<GetElementPtrInst>(getUnderlyingValue());
----------------
dmgreen wrote:
> Should this be called getUnderlyingGEP? Or should they standardize on getUnderlyingInstruction? If so I might recommend getUnderlyingInstr at least to cut down the lengths of the lines, without losing much by way of readability.
I think it's probably easiest to standardize on `getUnderlyingInstr`. I updated D84680 to add `getUnderlyingInstr` to `VPRecipeBase`, which allows us to get rid of the code here. The GEP pointer (vs the Instruction ptr) is only needed once, and most recipes are similar in that respect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84683



More information about the llvm-commits mailing list