[PATCH] D78203: [VP,Integer,#2] ExpandVectorPredication pass

Simon Moll via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 01:36:27 PDT 2020


simoll planned changes to this revision.
simoll marked an inline comment as done.
simoll added a comment.

Will fix remaining `auto*` cases.



================
Comment at: llvm/include/llvm/IR/PredicatedInst.h:34
+
+class PredicatedInstruction : public User {
+public:
----------------
craig.topper wrote:
> simoll wrote:
> > craig.topper wrote:
> > > Can this inherit from Instruction? Its a little surprising that it has Instruction in its name but has to be casted to Instruction.
> > Conceptually, `PredicatedInstruction` is a super class of `Instruction`: An `Instruction` is a `PredicatedInstruction` with the mask/evl parameters hard-wired to "all lanes true". That's why we can't make Instruction an ancestor of this one.
> > I'll clarify this with a comment.
> But a VPIntrinsic is also an Instruction isn't it? At least the CallInst for the vp intrinsic is an Instruction.
The whole reason for having the `PredicatedInstruction` class is that we want to add a new perspective on the IR where all instructions may be predicated (through a mask and evl). There are no VPIntrinsics in that perspective.

In the standard IR perspective, using the `Instruction` type, VPIntrinsics are just regular `CallInst`s calling intrinsics.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78203





More information about the llvm-commits mailing list