|
LLVM
3.7.0
|
#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 <tuple>Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "deadargelim" |
Functions | |
| 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 | |
| createDeadArgEliminationPass - This pass removes arguments from functions which are not used by the body of the function. More... | |
| static unsigned | NumRetVals (const Function *F) |
| Convenience function that returns the number of return values. More... | |
| static Type * | getRetComponentType (const Function *F, unsigned Idx) |
| Returns the sub-type a function will return at a given Idx. More... | |
| #define DEBUG_TYPE "deadargelim" |
Definition at line 43 of file DeadArgumentElimination.cpp.
Returns the sub-type a function will return at a given Idx.
Should correspond to the result type of an ExtractValue instruction executed with just that one Idx (i.e. only top-level structure is considered).
Definition at line 402 of file DeadArgumentElimination.cpp.
References llvm::Function::getReturnType(), and llvm::Type::isVoidTy().
| INITIALIZE_PASS | ( | DAH | , |
| "deadarghaX0r" | , | ||
| "Dead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE)" | , | ||
| false | , | ||
| 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.
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 387 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" | |||
| ) |
1.8.6