class InstructionWorklist
Declaration
class InstructionWorklist { /* full declaration omitted */ };
Description
InstructionWorklist - This is the worklist management logic for InstCombine and other simplification passes.
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:25
Member Variables
- private SmallVector<llvm::Instruction*, 256> Worklist
- private DenseMap<llvm::Instruction*, unsigned int> WorklistMap
- private SmallSetVector<llvm::Instruction*, 16> Deferred
- These instructions will be added in reverse order after the current combine has finished. This means that these instructions will be visited in the order they have been added.
Method Overview
- public InstructionWorklist()
- public InstructionWorklist(llvm::InstructionWorklist &&)
- public void add(llvm::Instruction * I)
- public void addValue(llvm::Value * V)
- public bool isEmpty() const
- public llvm::Instruction * popDeferred()
- public void push(llvm::Instruction * I)
- public void pushUsersToWorkList(llvm::Instruction & I)
- public void pushValue(llvm::Value * V)
- public void remove(llvm::Instruction * I)
- public llvm::Instruction * removeOne()
- public void reserve(size_t Size)
- public void zap()
Methods
¶InstructionWorklist()
InstructionWorklist()
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:34
¶InstructionWorklist(llvm::InstructionWorklist&&)
InstructionWorklist(llvm::InstructionWorklist&&)
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:36
Parameters
¶void add(llvm::Instruction* I)
void add(llvm::Instruction* I)
Description
Add instruction to the worklist. Instructions will be visited in the order they are added. You likely want to use this method.
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:44
Parameters
¶void addValue(llvm::Value* V)
void addValue(llvm::Value* V)
Description
Add value to the worklist if it is an instruction. Instructions will be visited in the order they are added.
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:51
Parameters
- llvm::Value* V
¶bool isEmpty() const
bool isEmpty() const
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:39
¶llvm::Instruction* popDeferred()
llvm::Instruction* popDeferred()
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:73
¶void push(llvm::Instruction* I)
void push(llvm::Instruction* I)
Description
Push the instruction onto the worklist stack. Instructions that have been added first will be visited last.
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:58
Parameters
¶void pushUsersToWorkList(llvm::Instruction& I)
void pushUsersToWorkList(llvm::Instruction& I)
Description
When an instruction is simplified, add all users of the instruction to the work lists because they might get more simplified now.
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:106
Parameters
¶void pushValue(llvm::Value* V)
void pushValue(llvm::Value* V)
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:68
Parameters
- llvm::Value* V
¶void remove(llvm::Instruction* I)
void remove(llvm::Instruction* I)
Description
Remove I from the worklist if it exists.
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:85
Parameters
¶llvm::Instruction* removeOne()
llvm::Instruction* removeOne()
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:96
¶void reserve(size_t Size)
void reserve(size_t Size)
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:79
Parameters
- size_t Size
¶void zap()
void zap()
Description
Check that the worklist is empty and nuke the backing store for the map.
Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:112