llvm::SCEV::getExpressionSize

Return the estimated size of this SCEV's expression tree.

Synopsis

Declared in <llvm/Analysis/ScalarEvolution.h>

unsigned short
getExpressionSize() const;

Description

The rules of its calculation are following: 1) Size of a SCEV without operands (like constants and SCEVUnknown) is 1; 2) Size SCEV with operands Op1, Op2, ..., OpN is calculated by formula: (1 + Size(Op1) + ... + Size(OpN)). This value gives us an estimation of time we need to traverse through this SCEV and all its operands recursively. We may use it to avoid performing heavy transformations on SCEVs of excessive size for sake of saving the compilation time.

Return Value

The estimated size of this SCEV's expression tree.