struct ConstantCandidate

Declaration

struct ConstantCandidate { /* full declaration omitted */ };

Description

Keeps track of a constant candidate and its uses.

Declared at: llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h:80

Member Variables

public llvm::consthoist::ConstantUseListType Uses
public llvm::ConstantInt* ConstInt
public llvm::ConstantExpr* ConstExpr
public unsigned int CumulativeCost = 0

Method Overview

  • public ConstantCandidate(llvm::ConstantInt * ConstInt, llvm::ConstantExpr * ConstExpr = nullptr)
  • public void addUser(llvm::Instruction * Inst, unsigned int Idx, unsigned int Cost)

Methods

ConstantCandidate(
    llvm::ConstantInt* ConstInt,
    llvm::ConstantExpr* ConstExpr = nullptr)

Declared at: llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h:89

Parameters

llvm::ConstantInt* ConstInt
llvm::ConstantExpr* ConstExpr = nullptr

void addUser(llvm::Instruction* Inst,
             unsigned int Idx,
             unsigned int Cost)

Description

Add the user to the use list and update the cost.

Declared at: llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h:93

Parameters

llvm::Instruction* Inst
unsigned int Idx
unsigned int Cost