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
template<typename T>
void collectPotentiallyDeadInstrs (ArrayRef< T * > Bndl)
 Record instructions in Bndl that may be dead after vectorization.
LLVM_ABI 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 408 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()

template<typename T>
template void llvm::sandboxir::VecUtils::DeadInstructionMorgue::collectPotentiallyDeadInstrs< Instruction > ( ArrayRef< T * > 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 109 of file VecUtils.cpp.

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

◆ debug()

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

Definition at line 429 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 424 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 144 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: