LLVM API Documentation

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

ArgumentPromotion.cpp File Reference

#include "llvm/Transforms/IPO.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/CallGraphSCCPass.h"
#include "llvm/Instructions.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Debug.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include <set>

Include dependency graph for ArgumentPromotion.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "argpromotion"

Functions

ModulePassllvm::createArgumentPromotionPass ()
static bool IsAlwaysValidPointer (Value *V)
static bool AllCalleesPassInValidPointerForArgument (Argument *Arg)


Define Documentation

#define DEBUG_TYPE   "argpromotion"
 

Definition at line 31 of file ArgumentPromotion.cpp.


Function Documentation

static bool AllCalleesPassInValidPointerForArgument Argument Arg  )  [static]
 

AllCalleesPassInValidPointerForArgument - Return true if we can prove that all callees pass in a valid pointer for the specified function argument.

Definition at line 163 of file ArgumentPromotion.cpp.

References llvm::Function::abegin(), E, llvm::CallSite::getArgument(), llvm::CallSite::getInstruction(), llvm::Argument::getParent(), IsAlwaysValidPointer(), llvm::Value::use_begin(), and llvm::Value::use_end().

static bool IsAlwaysValidPointer Value V  )  [static]
 

IsAlwaysValidPointer - Return true if the specified pointer is always legal to load.

Definition at line 150 of file ArgumentPromotion.cpp.

Referenced by AllCalleesPassInValidPointerForArgument().


Variable Documentation

Statistic NumAggregatesPromoted("argpromotion","Number of aggregate arguments promoted") [static]
 

Statistic NumArgumentsDead("argpromotion","Number of dead pointer args eliminated") [static]
 

Statistic NumArgumentsPromoted("argpromotion","Number of pointer arguments promoted") [static]
 

RegisterOpt<ArgPromotion> X("argpromotion","Promote 'by reference' arguments to scalars") [static]