LLVM API Documentation

IndVarSimplify.cpp File Reference

#include "llvm/Transforms/Scalar.h"
#include "llvm/BasicBlock.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/Type.h"
#include "llvm/Analysis/ScalarEvolutionExpander.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"

Include dependency graph for IndVarSimplify.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "indvars"

Functions

 STATISTIC (NumRemoved,"Number of aux indvars removed")
 STATISTIC (NumPointer,"Number of pointer indvars promoted")
 STATISTIC (NumInserted,"Number of canonical indvars added")
 STATISTIC (NumReplaced,"Number of exit values replaced")
 STATISTIC (NumLFTR,"Number of loop exit tests replaced")
Passllvm::createIndVarSimplifyPass ()
static bool useSIToFPInst (ConstantFP &InitV, ConstantFP &ExitV, uint64_t intIV, uint64_t intEV)
static bool convertToInt (const APFloat &APF, uint64_t *intVal)
 convertToInt - Convert APF to an integer, if possible.

Variables

static RegisterPass
< IndVarSimplify > 
X ("indvars","Canonicalize Induction Variables")


Define Documentation

#define DEBUG_TYPE   "indvars"

Definition at line 40 of file IndVarSimplify.cpp.


Function Documentation

static bool convertToInt ( const APFloat APF,
uint64_t *  intVal 
) [static]

STATISTIC ( NumLFTR  ,
"Number of loop exit tests replaced"   
)

STATISTIC ( NumReplaced  ,
"Number of exit values replaced"   
)

STATISTIC ( NumInserted  ,
"Number of canonical indvars added"   
)

STATISTIC ( NumPointer  ,
"Number of pointer indvars promoted"   
)

STATISTIC ( NumRemoved  ,
"Number of aux indvars removed"   
)

static bool useSIToFPInst ( ConstantFP InitV,
ConstantFP ExitV,
uint64_t  intIV,
uint64_t  intEV 
) [static]

Return true if it is OK to use SIToFPInst for an inducation variable with given inital and exit values.

Definition at line 727 of file IndVarSimplify.cpp.

References llvm::ConstantFP::getValueAPF(), llvm::APInt::getZExtValue(), and llvm::APFloat::isNegative().


Variable Documentation

bool Changed

Definition at line 70 of file IndVarSimplify.cpp.

char ID [static]

Definition at line 73 of file IndVarSimplify.cpp.

Definition at line 68 of file IndVarSimplify.cpp.

Definition at line 69 of file IndVarSimplify.cpp.

RegisterPass<IndVarSimplify> X("indvars","Canonicalize Induction Variables") [static]




This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.