LLVM API Documentation

Defines | Functions
DeadArgumentElimination.cpp File Reference
#include "llvm/Transforms/IPO.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
#include <set>
Include dependency graph for DeadArgumentElimination.cpp:

Go to the source code of this file.


#define DEBUG_TYPE   "deadargelim"


 STATISTIC (NumArgumentsEliminated,"Number of unread args removed")
 STATISTIC (NumRetValsEliminated,"Number of unused return values removed")
 STATISTIC (NumArgumentsReplacedWithUndef,"Number of unread args replaced with undef")
 INITIALIZE_PASS (DAH,"deadarghaX0r","Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)", false, false) ModulePass *llvm
static unsigned NumRetVals (const Function *F)

Define Documentation

#define DEBUG_TYPE   "deadargelim"

Definition at line 20 of file DeadArgumentElimination.cpp.

Function Documentation

"deadarghaX0r"  ,
"Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)"  ,
false  ,

createDeadArgEliminationPass - This pass removes arguments from functions which are not used by the body of the function.

Definition at line 181 of file DeadArgumentElimination.cpp.

static unsigned NumRetVals ( const Function F) [static]

Convenience function that returns the number of return values. It returns 0 for void functions and 1 for functions not returning a struct. It returns the number of struct elements for functions returning a struct.

Definition at line 407 of file DeadArgumentElimination.cpp.

References llvm::Function::getReturnType(), and llvm::Type::isVoidTy().

STATISTIC ( NumArgumentsEliminated  ,
"Number of unread args removed"   
STATISTIC ( NumRetValsEliminated  ,
"Number of unused return values removed"   
STATISTIC ( NumArgumentsReplacedWithUndef  ,
"Number of unread args replaced with undef"