LLVM API Documentation
#include "llvm/Transforms/IPO.h"#include "llvm/ADT/DenseMap.h"#include "llvm/ADT/Statistic.h"#include "llvm/Constants.h"#include "llvm/InlineAsm.h"#include "llvm/Instructions.h"#include "llvm/Module.h"#include "llvm/Pass.h"#include "llvm/Support/CallSite.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include <map>#include <vector>
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "mergefunc" |
Functions | |
| STATISTIC (NumFunctionsMerged,"Number of functions merged") | |
| STATISTIC (NumMergeFails,"Number of identical function pairings not merged") | |
| ModulePass * | llvm::createMergeFunctionsPass () |
| static unsigned long | hash (const Function *F) |
| static bool | compare (const Value *V, const Value *U) |
| static bool | equals (const BasicBlock *BB1, const BasicBlock *BB2, DenseMap< const Value *, const Value * > &ValueMap, DenseMap< const Value *, const Value * > &SpeculationMap) |
| static bool | equals (const Function *F, const Function *G) |
| static bool | fold (std::vector< Function * > &FnVec, unsigned i, unsigned j) |
| static bool | hasAddressTaken (User *U) |
Variables | |
| static RegisterPass < MergeFunctions > | X ("mergefunc","Merge Functions") |
| #define DEBUG_TYPE "mergefunc" |
Definition at line 48 of file MergeFunctions.cpp.
Definition at line 89 of file MergeFunctions.cpp.
References llvm::InlineAsm::getAsmString(), llvm::InlineAsm::getConstraintString(), and llvm::Value::getType().
Referenced by equals(), LowerSELECT_CC(), and llvm::APInt::tcDivide().
Definition at line 187 of file MergeFunctions.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), llvm::Function::arg_size(), llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::begin(), E, llvm::DenseMap< KeyT, ValueT, KeyInfoT, ValueInfoT >::end(), equals(), llvm::Function::getAttributes(), llvm::Function::getCallingConv(), llvm::Function::getEntryBlock(), llvm::Function::getGC(), llvm::GlobalValue::getSection(), llvm::GlobalValue::getType(), llvm::Function::hasGC(), and llvm::GlobalValue::hasSection().
| static bool equals | ( | const BasicBlock * | BB1, | |
| const BasicBlock * | BB2, | |||
| DenseMap< const Value *, const Value * > & | ValueMap, | |||
| DenseMap< const Value *, const Value * > & | SpeculationMap | |||
| ) | [static] |
Definition at line 117 of file MergeFunctions.cpp.
References llvm::BasicBlock::begin(), compare(), llvm::BasicBlock::end(), FI, GE, llvm::Value::getType(), and llvm::Value::getValueID().
Referenced by equals().
Definition at line 240 of file MergeFunctions.cpp.
References DOUT, llvm::Function::eraseFromParent(), llvm::GlobalValue::ExternalLinkage, F, G, llvm::GlobalValue::getAlignment(), llvm::GlobalValue::getLinkage(), llvm::Value::getName(), llvm::GlobalValue::getParent(), llvm::GlobalValue::getType(), llvm::GlobalValue::getVisibility(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::hasWeakLinkage(), llvm::GlobalValue::mayBeOverridden(), llvm::Value::replaceAllUsesWith(), llvm::GlobalAlias::setAliasee(), llvm::GlobalValue::setAlignment(), llvm::GlobalValue::setLinkage(), llvm::Value::setName(), llvm::GlobalValue::setVisibility(), std::swap(), and llvm::Value::takeName().
| static bool hasAddressTaken | ( | User * | U | ) | [static] |
Definition at line 297 of file MergeFunctions.cpp.
References E, llvm::Value::hasOneUse(), llvm::Value::use_begin(), and llvm::Value::use_end().
Definition at line 84 of file MergeFunctions.cpp.
References llvm::GlobalValue::getType(), and llvm::Function::size().
Referenced by llvm::DenseMapInfo< Expression >::getHashValue(), llvm::APInt::getHashValue(), and llvm::APFloat::getHashValue().
| STATISTIC | ( | NumMergeFails | , | |
| "Number of identical function pairings not merged" | ||||
| ) |
| STATISTIC | ( | NumFunctionsMerged | , | |
| "Number of functions merged" | ||||
| ) |
char ID [static] |
Definition at line 69 of file MergeFunctions.cpp.
RegisterPass<MergeFunctions> X("mergefunc","Merge Functions") [static] |