LLVM  13.0.0git
Public Member Functions | List of all members
llvm::InstCombineWorklist Class Reference

InstCombineWorklist - This is the worklist management logic for InstCombine. More...

#include "llvm/Transforms/InstCombine/InstCombineWorklist.h"

Public Member Functions

 InstCombineWorklist ()=default
 
 InstCombineWorklist (InstCombineWorklist &&)=default
 
InstCombineWorklistoperator= (InstCombineWorklist &&)=default
 
bool isEmpty () const
 
void add (Instruction *I)
 Add instruction to the worklist. More...
 
void addValue (Value *V)
 Add value to the worklist if it is an instruction. More...
 
void push (Instruction *I)
 Push the instruction onto the worklist stack. More...
 
void pushValue (Value *V)
 
InstructionpopDeferred ()
 
void reserve (size_t Size)
 
void remove (Instruction *I)
 Remove I from the worklist if it exists. More...
 
InstructionremoveOne ()
 
void pushUsersToWorkList (Instruction &I)
 When an instruction is simplified, add all users of the instruction to the work lists because they might get more simplified now. More...
 
void zap ()
 Check that the worklist is empty and nuke the backing store for the map. More...
 

Detailed Description

InstCombineWorklist - This is the worklist management logic for InstCombine.

Definition at line 27 of file InstCombineWorklist.h.

Constructor & Destructor Documentation

◆ InstCombineWorklist() [1/2]

llvm::InstCombineWorklist::InstCombineWorklist ( )
default

◆ InstCombineWorklist() [2/2]

llvm::InstCombineWorklist::InstCombineWorklist ( InstCombineWorklist &&  )
default

Member Function Documentation

◆ add()

void llvm::InstCombineWorklist::add ( Instruction I)
inline

Add instruction to the worklist.

Instructions will be visited in the order they are added. You likely want to use this method.

Definition at line 46 of file InstCombineWorklist.h.

References llvm::dbgs(), I, llvm::SetVector< T, SmallVector< T, N >, SmallDenseSet< T, N > >::insert(), and LLVM_DEBUG.

Referenced by addValue(), and combineInstructionsOverFunction().

◆ addValue()

void llvm::InstCombineWorklist::addValue ( Value V)
inline

Add value to the worklist if it is an instruction.

Instructions will be visited in the order they are added.

Definition at line 53 of file InstCombineWorklist.h.

References add(), and I.

Referenced by llvm::InstCombiner::replaceOperand(), and llvm::InstCombiner::replaceUse().

◆ isEmpty()

bool llvm::InstCombineWorklist::isEmpty ( ) const
inline

◆ operator=()

InstCombineWorklist& llvm::InstCombineWorklist::operator= ( InstCombineWorklist &&  )
default

◆ popDeferred()

Instruction* llvm::InstCombineWorklist::popDeferred ( )
inline

◆ push()

void llvm::InstCombineWorklist::push ( Instruction I)
inline

◆ pushUsersToWorkList()

void llvm::InstCombineWorklist::pushUsersToWorkList ( Instruction I)
inline

When an instruction is simplified, add all users of the instruction to the work lists because they might get more simplified now.

Definition at line 108 of file InstCombineWorklist.h.

References I, and push().

Referenced by llvm::InstCombiner::replaceInstUsesWith().

◆ pushValue()

void llvm::InstCombineWorklist::pushValue ( Value V)
inline

Definition at line 70 of file InstCombineWorklist.h.

References I, and push().

◆ remove()

void llvm::InstCombineWorklist::remove ( Instruction I)
inline

◆ removeOne()

Instruction* llvm::InstCombineWorklist::removeOne ( )
inline

◆ reserve()

void llvm::InstCombineWorklist::reserve ( size_t  Size)
inline

◆ zap()

void llvm::InstCombineWorklist::zap ( )
inline

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