LLVM API Documentation
#include "llvm/Transforms/IPO.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/Statistic.h"#include "llvm/IR/Constants.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/Module.h"#include "llvm/Transforms/Utils/CtorUtils.h"#include "llvm/Transforms/Utils/GlobalStatus.h"#include "llvm/Pass.h"
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "globaldce" |
Functions | |
| STATISTIC (NumAliases,"Number of global aliases removed") | |
| STATISTIC (NumFunctions,"Number of functions removed") | |
| STATISTIC (NumVariables,"Number of global variables removed") | |
| static bool | isEmptyFunction (Function *F) |
| Returns true if F contains only a single "ret" instruction. | |
| INITIALIZE_PASS (GlobalDCE,"globaldce","Dead Global Elimination", false, false) ModulePass *llvm | |
| #define DEBUG_TYPE "globaldce" |
Definition at line 29 of file GlobalDCE.cpp.
| INITIALIZE_PASS | ( | GlobalDCE | , |
| "globaldce" | , | ||
| "Dead Global Elimination" | , | ||
| false | , | ||
| false | |||
| ) |
Definition at line 70 of file GlobalDCE.cpp.
| static bool isEmptyFunction | ( | Function * | F | ) | [static] |
Returns true if F contains only a single "ret" instruction.
Definition at line 61 of file GlobalDCE.cpp.
References llvm::BasicBlock::front(), llvm::Function::getEntryBlock(), llvm::ReturnInst::getReturnValue(), and llvm::BasicBlock::size().
| STATISTIC | ( | NumAliases | , |
| "Number of global aliases removed" | |||
| ) |
| STATISTIC | ( | NumVariables | , |
| "Number of global variables removed" | |||
| ) |