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/LLVMContext.h"
#include "llvm/Type.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/IVUsers.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/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/STLExtras.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 (NumInserted,"Number of canonical indvars added")
 STATISTIC (NumReplaced,"Number of exit values replaced")
 STATISTIC (NumLFTR,"Number of loop exit tests replaced")
Pass * llvm::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 41 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 ( 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 595 of file IndVarSimplify.cpp.

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


Variable Documentation

Definition at line 75 of file IndVarSimplify.cpp.

Definition at line 74 of file IndVarSimplify.cpp.

char ID [static]

Definition at line 78 of file IndVarSimplify.cpp.

Definition at line 71 of file IndVarSimplify.cpp.

Definition at line 72 of file IndVarSimplify.cpp.

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