Skip to content

Commit 0fbec1e

Browse files
committed
[SandboxVec][BottomUpVec][NFC] Add comments
1 parent 3805355 commit 0fbec1e

File tree

1 file changed

+5
-0
lines changed
  • llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes

1 file changed

+5
-0
lines changed

llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/BottomUpVec.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ namespace llvm::sandboxir {
2626
class BottomUpVec final : public FunctionPass {
2727
bool Change = false;
2828
std::unique_ptr<LegalityAnalysis> Legality;
29+
/// The original instructions that are potentially dead after vectorization.
2930
DenseSet<Instruction *> DeadInstrCandidates;
3031
/// Maps scalars to vectors.
3132
std::unique_ptr<InstrMaps> IMaps;
@@ -40,6 +41,10 @@ class BottomUpVec final : public FunctionPass {
4041
Value *createShuffle(Value *VecOp, const ShuffleMask &Mask);
4142
/// Packs all elements of \p ToPack into a vector and returns that vector.
4243
Value *createPack(ArrayRef<Value *> ToPack);
44+
/// After we create vectors for groups of instructions, the original
45+
/// instructions are potentially dead and may need to be removed. This
46+
/// function helps collect these instructions (along with the pointer operands
47+
/// for loads/stores) so that they can be cleaned up later.
4348
void collectPotentiallyDeadInstrs(ArrayRef<Value *> Bndl);
4449
/// Recursively try to vectorize \p Bndl and its operands.
4550
Value *vectorizeRec(ArrayRef<Value *> Bndl, unsigned Depth);

0 commit comments

Comments
 (0)