LLVM API Documentation

llvm::SCEVExpander Struct Reference

#include <ScalarEvolutionExpander.h>

Inheritance diagram for llvm::SCEVExpander:
[legend]
Collaboration diagram for llvm::SCEVExpander:
[legend]

List of all members.

Public Types

typedef IRBuilder< true,
TargetFolder > 
BuilderType

Public Member Functions

 SCEVExpander (ScalarEvolution &se)
void clear ()
Value * getOrInsertCanonicalInductionVariable (const Loop *L, const Type *Ty)
Value * expandCodeFor (const SCEV *SH, const Type *Ty, Instruction *IP)

Public Attributes

ScalarEvolution & SE
std::map< std::pair< const
SCEV *, Instruction * >
, AssertingVH< Value > > 
InsertedExpressions
std::set< Value * > InsertedValues
BuilderType Builder

Friends

struct SCEVVisitor< SCEVExpander, Value * >


Detailed Description

SCEVExpander - This class uses information about analyze scalars to rewrite expressions in canonical form.

Clients should create an instance of this class when rewriting is needed, and destroy it when finished to allow the release of the associated memory.

Definition at line 29 of file ScalarEvolutionExpander.h.


Member Typedef Documentation

Definition at line 35 of file ScalarEvolutionExpander.h.


Constructor & Destructor Documentation

llvm::SCEVExpander::SCEVExpander ( ScalarEvolution &  se  )  [inline, explicit]

Definition at line 40 of file ScalarEvolutionExpander.h.


Member Function Documentation

void llvm::SCEVExpander::clear (  )  [inline]

clear - Erase the contents of the InsertedExpressions map so that users trying to expand the same expression into multiple BasicBlocks or different places within the same BasicBlock can do so.

Definition at line 47 of file ScalarEvolutionExpander.h.

References InsertedExpressions.

Value * SCEVExpander::getOrInsertCanonicalInductionVariable ( const Loop *  L,
const Type *  Ty 
)

getOrInsertCanonicalInductionVariable - This method returns the canonical induction variable of the specified type for the specified loop (inserting one if there is none). A canonical induction variable starts at zero and steps by one on each iteration.

getOrInsertCanonicalInductionVariable - This method returns the canonical induction variable of the specified type for the specified loop (inserting one if there is none). A canonical induction variable starts at zero and steps by one on each iteration.

Definition at line 867 of file ScalarEvolutionExpander.cpp.

References Builder, expandCodeFor(), llvm::ScalarEvolution::getAddRecExpr(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::ScalarEvolution::getIntegerSCEV(), H, llvm::Type::isInteger(), and SE.

Value* llvm::SCEVExpander::expandCodeFor ( const SCEV *  SH,
const Type *  Ty,
Instruction *  IP 
) [inline]

expandCodeFor - Insert code to directly compute the specified SCEV expression into the program. The inserted code is inserted into the specified block.

Definition at line 58 of file ScalarEvolutionExpander.h.

References Builder, and llvm::Instruction::getParent().

Referenced by getOrInsertCanonicalInductionVariable(), and InsertAffinePhi().


Friends And Related Function Documentation

friend struct SCEVVisitor< SCEVExpander, Value * > [friend]

Definition at line 38 of file ScalarEvolutionExpander.h.


Member Data Documentation

Definition at line 32 of file ScalarEvolutionExpander.h.

Referenced by clear().

Definition at line 33 of file ScalarEvolutionExpander.h.


The documentation for this struct was generated from the following files: