LLVM API Documentation

llvm::SCEV Class Reference

#include <ScalarEvolution.h>

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

List of all members.

Public Member Functions

 SCEV (const FoldingSetNodeID &ID, unsigned SCEVTy)
unsigned getSCEVType () const
virtual bool isLoopInvariant (const Loop *L) const =0
virtual bool hasComputableLoopEvolution (const Loop *L) const =0
virtual const Type * getType () const =0
bool isZero () const
bool isOne () const
bool isAllOnesValue () const
virtual bool hasOperand (const SCEV *Op) const =0
virtual bool dominates (BasicBlock *BB, DominatorTree *DT) const =0
virtual void print (raw_ostream &OS) const =0
void print (std::ostream &OS) const
void print (std::ostream *OS) const
void dump () const

Protected Member Functions

virtual ~SCEV ()

Protected Attributes

unsigned short SubclassData


Detailed Description

SCEV - This class represents an analyzed expression in the program. These are opaque objects that the client is not allowed to do much with directly.

Definition at line 53 of file ScalarEvolution.h.


Constructor & Destructor Documentation

SCEV::~SCEV (  )  [protected, virtual]

Definition at line 117 of file ScalarEvolution.cpp.

llvm::SCEV::SCEV ( const FoldingSetNodeID &  ID,
unsigned  SCEVTy 
) [inline, explicit]

Definition at line 68 of file ScalarEvolution.h.


Member Function Documentation

unsigned llvm::SCEV::getSCEVType (  )  const [inline]

virtual bool llvm::SCEV::isLoopInvariant ( const Loop *  L  )  const [pure virtual]

virtual bool llvm::SCEV::hasComputableLoopEvolution ( const Loop *  L  )  const [pure virtual]

hasComputableLoopEvolution - Return true if this SCEV changes value in a known way in the specified loop. This property being true implies that the value is variant in the loop AND that we can emit an expression to compute the value of the expression at any particular loop iteration.

Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVAddRecExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.

Referenced by llvm::SCEVCastExpr::hasComputableLoopEvolution().

virtual const Type* llvm::SCEV::getType (  )  const [pure virtual]

bool SCEV::isZero (  )  const

isZero - Return true if the expression is a constant zero.

Definition at line 129 of file ScalarEvolution.cpp.

Referenced by FactorOutConstant(), SeparateSubExprs(), and SplitAddRecs().

bool SCEV::isOne (  )  const

isOne - Return true if the expression is a constant one.

Definition at line 135 of file ScalarEvolution.cpp.

Referenced by FactorOutConstant(), llvm::ScalarEvolution::getSignedRange(), and llvm::ScalarEvolution::getUnsignedRange().

bool SCEV::isAllOnesValue (  )  const

isAllOnesValue - Return true if the expression is a constant all-ones value.

Definition at line 141 of file ScalarEvolution.cpp.

Referenced by llvm::ScalarEvolution::getSignedRange(), and llvm::ScalarEvolution::getUnsignedRange().

virtual bool llvm::SCEV::hasOperand ( const SCEV *  Op  )  const [pure virtual]

hasOperand - Test whether this SCEV has Op as a direct or indirect operand.

Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.

Referenced by llvm::SCEVCastExpr::hasOperand().

virtual bool llvm::SCEV::dominates ( BasicBlock *  BB,
DominatorTree *  DT 
) const [pure virtual]

dominates - Return true if elements that makes up this SCEV dominates the specified basic block.

Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVCastExpr, llvm::SCEVNAryExpr, llvm::SCEVUDivExpr, llvm::SCEVTargetDataConstant, and llvm::SCEVUnknown.

Referenced by llvm::SCEVCastExpr::dominates(), and getSCEVStartAndStride().

virtual void llvm::SCEV::print ( raw_ostream &  OS  )  const [pure virtual]

print - Print out the internal representation of this scalar to the specified stream. This should really only be used for debugging purposes.

Implemented in llvm::SCEVCouldNotCompute, llvm::SCEVConstant, llvm::SCEVTruncateExpr, llvm::SCEVZeroExtendExpr, llvm::SCEVSignExtendExpr, llvm::SCEVCommutativeExpr, llvm::SCEVUDivExpr, llvm::SCEVAddRecExpr, llvm::SCEVFieldOffsetExpr, llvm::SCEVAllocSizeExpr, and llvm::SCEVUnknown.

Referenced by dump(), llvm::operator<<(), llvm::ScalarEvolution::print(), and print().

void SCEV::print ( std::ostream &  OS  )  const

Definition at line 124 of file ScalarEvolution.cpp.

References OS, and print().

void llvm::SCEV::print ( std::ostream *  OS  )  const [inline]

Definition at line 113 of file ScalarEvolution.h.

References print().

void SCEV::dump (  )  const

dump - This method is used for debugging.

Definition at line 119 of file ScalarEvolution.cpp.

References llvm::errs(), and print().


Member Data Documentation

SubclassData - This field is initialized to zero and may be used in subclasses to store miscelaneous information.

Definition at line 60 of file ScalarEvolution.h.

Referenced by llvm::SCEVAddRecExpr::hasNoSignedWrap(), llvm::SCEVAddRecExpr::hasNoUnsignedWrap(), llvm::SCEVAddRecExpr::setHasNoSignedWrap(), and llvm::SCEVAddRecExpr::setHasNoUnsignedWrap().


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