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

Methods

InstructionWorklist()

Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:34

InstructionWorklist(llvm::InstructionWorklist&&)

Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:36

Parameters

llvm::InstructionWorklist&&

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

llvm::Instruction* I

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

Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:39

llvm::Instruction* popDeferred()

Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:73

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

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

llvm::Instruction& I

void pushValue(llvm::Value* V)

Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:68

Parameters

llvm::Value* V

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* I

llvm::Instruction* removeOne()

Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:96

void reserve(size_t Size)

Declared at: llvm/include/llvm/Transforms/Utils/InstructionWorklist.h:79

Parameters

size_t Size

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