LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

TailRecursionElimination.cpp File Reference

#include "llvm/Transforms/Scalar.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
#include "llvm/ADT/Statistic.h"

Include dependency graph for TailRecursionElimination.cpp:

Go to the source code of this file.

Functions

FunctionPassllvm::createTailCallEliminationPass ()
static bool isDynamicConstant (Value *V, CallInst *CI)
static ValuegetCommonReturnValue (ReturnInst *TheRI, CallInst *CI)


Function Documentation

static Value* getCommonReturnValue ReturnInst TheRI,
CallInst CI
[static]
 

Definition at line 181 of file TailRecursionElimination.cpp.

References llvm::Function::begin(), E, llvm::Function::end(), llvm::Constant::getOperand(), llvm::BasicBlock::getParent(), llvm::Instruction::getParent(), and isDynamicConstant().

static bool isDynamicConstant Value V,
CallInst CI
[static]
 

Definition at line 155 of file TailRecursionElimination.cpp.

References llvm::Function::abegin(), llvm::User::getOperand(), llvm::BasicBlock::getParent(), and llvm::Instruction::getParent().

Referenced by getCommonReturnValue().


Variable Documentation

Statistic NumAccumAdded("tailcallelim","Number of accumulators introduced") [static]
 

Statistic NumEliminated("tailcallelim","Number of tail calls removed") [static]
 

RegisterOpt<TailCallElim> X("tailcallelim","Tail Call Elimination") [static]