llvm::UnrolledInstAnalyzer

Estimates optimization effects from complete loop unrolling.

Synopsis

Declared in <llvm/Analysis/LoopUnrollAnalyzer.h>

class UnrolledInstAnalyzer;

Description

This class is used to get an estimate of the optimization effects that we could get from complete loop unrolling. It comes from the fact that some loads might be replaced with concrete constant values and that could trigger a chain of instruction simplifications.

E.g. we might have: int a[]= {0, 1, 0}; v = 0; for (i = 0; i < 3; i ++) v += b[i]*a[i]; If we completely unroll the loop, we would get: v = b[0]*a[0]+ b[1]*a[1]+ b[2]*a[2] Which then will be simplified to: v = b[0]* 0 + b[1]* 1 + b[2]* 0 And finally: v = b[1]

Member Functions

NameDescription
UnrolledInstAnalyzer [constructor]Construct an analyzer for one simulated unrolled iteration.

Using Declarations

NameDescription
visit Expose the InstVisitor visit entry points.

Friends

NameDescription
llvm::InstVisitorBase class for instruction visitors