LLVM 24.0.0git
llvm::sandboxir::VecUtils::DeadInstructionMorgue Class Reference

Utility class to collect and erase dead instructions. More...

#include "llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h"

Public Member Functions

 DeadInstructionMorgue ()=default
 DeadInstructionMorgue (const DeadInstructionMorgue &)=delete
void collectPotentiallyDeadInstrs (ArrayRef< Value * > Bndl)
 Record instructions in Bndl that may be dead after vectorization.
void tryEraseDeadInstrs ()
 Erase candidates recorded by collectPotentiallyDeadInstrs() that now have no uses, then clear the candidate set.
void print (raw_ostream &OS) const
LLVM_DUMP_METHOD void debug () const

Detailed Description

Utility class to collect and erase dead instructions.

Definition at line 407 of file VecUtils.h.

Constructor & Destructor Documentation

◆ DeadInstructionMorgue() [1/2]

llvm::sandboxir::VecUtils::DeadInstructionMorgue::DeadInstructionMorgue ( )
default

Referenced by DeadInstructionMorgue().

◆ DeadInstructionMorgue() [2/2]

llvm::sandboxir::VecUtils::DeadInstructionMorgue::DeadInstructionMorgue ( const DeadInstructionMorgue & )
delete

Member Function Documentation

◆ collectPotentiallyDeadInstrs()

void llvm::sandboxir::VecUtils::DeadInstructionMorgue::collectPotentiallyDeadInstrs ( ArrayRef< Value * > Bndl)

Record instructions in Bndl that may be dead after vectorization.

For load/store bundles, also record non-first-lane pointer operands; the first lane's pointer is skipped because the vector load/store reuses it. Erased later by tryEraseDeadInstrs().

Definition at line 107 of file VecUtils.cpp.

References llvm::cast(), llvm::drop_begin(), llvm::dyn_cast(), and llvm::getPointerOperand().

◆ debug()

LLVM_DUMP_METHOD void llvm::sandboxir::VecUtils::DeadInstructionMorgue::debug ( ) const
inline

Definition at line 428 of file VecUtils.h.

References llvm::dbgs(), LLVM_DUMP_METHOD, and print().

◆ print()

void llvm::sandboxir::VecUtils::DeadInstructionMorgue::print ( raw_ostream & OS) const
inline

Definition at line 423 of file VecUtils.h.

References I.

Referenced by debug().

◆ tryEraseDeadInstrs()

void llvm::sandboxir::VecUtils::DeadInstructionMorgue::tryEraseDeadInstrs ( )

Erase candidates recorded by collectPotentiallyDeadInstrs() that now have no uses, then clear the candidate set.

Definition at line 133 of file VecUtils.cpp.

References llvm::cast(), llvm::dbgs(), DEBUG_PREFIX, I, LLVM_DEBUG, llvm::reverse(), and llvm::sort().


The documentation for this class was generated from the following files: