[PATCH] D76200: [VPlan] Use underlying value for printing, if available.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 10:52:48 PDT 2020


fhahn marked 2 inline comments as done.
fhahn added a comment.

Thanks. I'll prepare the follow-ups shortly.



================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:739
+
+  bool hasResult() const {
+    if (const Value *UV = getUnderlyingValue())
----------------
Ayal wrote:
> fhahn wrote:
> > Ayal wrote:
> > > Better look at the VPInstruction's Opcode to determine if it has a result?
> > I wanted to avoid to have such a check here initially, but it does not look too bad. Unless I missed an instruction, I think calls should be the only instruction where the opcode does not determine if it has a result or not. But just assuming calls have results should be fine.
> > 
> > Plenty of instructions without result are not likely to be VPInstructions, but I guess it does not hurt to include them here.
> Sure. Some of these cannot be processed by LV.
> 
> Would be good to switch back to something like "!getType()->isVoidTy()", once [VP]Types are introduced into VPlan/VPValue.
Sounds good!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76200





More information about the llvm-commits mailing list