LLVM API Documentation
#include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/CaptureTracking.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/InlineCost.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/Loads.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ValueHandle.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "tailcallelim" |
Functions | |
STATISTIC (NumEliminated,"Number of tail calls removed") | |
STATISTIC (NumRetDuped,"Number of return duplicated") | |
STATISTIC (NumAccumAdded,"Number of accumulators introduced") | |
INITIALIZE_PASS_BEGIN (TailCallElim,"tailcallelim","Tail Call Elimination", false, false) INITIALIZE_PASS_END(TailCallElim | |
static bool | CanTRE (Function &F) |
Scan the specified function for alloca instructions. If it contains any dynamic allocas, returns false. | |
static bool | isDynamicConstant (Value *V, CallInst *CI, ReturnInst *RI) |
static Value * | getCommonReturnValue (ReturnInst *IgnoreRI, CallInst *CI) |
static Instruction * | FirstNonDbg (BasicBlock::iterator I) |
Variables | |
tailcallelim | |
Tail Call | Elimination |
Tail Call | false |
#define DEBUG_TYPE "tailcallelim" |
Definition at line 80 of file TailRecursionElimination.cpp.
Scan the specified function for alloca instructions. If it contains any dynamic allocas, returns false.
Definition at line 142 of file TailRecursionElimination.cpp.
References I.
static Instruction* FirstNonDbg | ( | BasicBlock::iterator | I | ) | [static] |
Definition at line 559 of file TailRecursionElimination.cpp.
References I.
static Value* getCommonReturnValue | ( | ReturnInst * | IgnoreRI, |
CallInst * | CI | ||
) | [static] |
Definition at line 511 of file TailRecursionElimination.cpp.
References llvm::Function::begin(), llvm::dyn_cast(), llvm::Function::end(), llvm::User::getOperand(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), and isDynamicConstant().
INITIALIZE_PASS_BEGIN | ( | TailCallElim | , |
"tailcallelim" | , | ||
"Tail Call Elimination" | , | ||
false | , | ||
false | |||
) |
static bool isDynamicConstant | ( | Value * | V, |
CallInst * | CI, | ||
ReturnInst * | RI | ||
) | [static] |
Definition at line 476 of file TailRecursionElimination.cpp.
References llvm::Function::arg_begin(), llvm::CallInst::getArgOperand(), llvm::Instruction::getParent(), llvm::BasicBlock::getParent(), and llvm::BasicBlock::getUniquePredecessor().
Referenced by getCommonReturnValue().
STATISTIC | ( | NumEliminated | , |
"Number of tail calls removed" | |||
) |
STATISTIC | ( | NumRetDuped | , |
"Number of return duplicated" | |||
) |
STATISTIC | ( | NumAccumAdded | , |
"Number of accumulators introduced" | |||
) |
Tail Call Elimination |
Definition at line 128 of file TailRecursionElimination.cpp.
Tail Call false |
Definition at line 128 of file TailRecursionElimination.cpp.
Definition at line 128 of file TailRecursionElimination.cpp.