LLVM API Documentation
#include "llvm/Transforms/Scalar.h"#include "llvm/Intrinsics.h"#include "llvm/Module.h"#include "llvm/Pass.h"#include "llvm/Support/IRBuilder.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/Target/TargetData.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/StringMap.h"#include "llvm/ADT/Statistic.h"#include "llvm/Support/Compiler.h"#include "llvm/Support/Debug.h"#include "llvm/Config/config.h"
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "simplify-libcalls" |
Functions | |
| STATISTIC (NumSimplified,"Number of library calls simplified") | |
| STATISTIC (NumAnnotated,"Number of attributes added to library functions") | |
| static uint64_t | GetStringLengthH (Value *V, SmallPtrSet< PHINode *, 32 > &PHIs) |
| static uint64_t | GetStringLength (Value *V) |
| static bool | IsOnlyUsedInZeroEqualityComparison (Value *V) |
| FunctionPass * | llvm::createSimplifyLibCallsPass () |
Variables | |
| static RegisterPass < SimplifyLibCalls > | X ("simplify-libcalls","Simplify well-known library calls") |
| #define DEBUG_TYPE "simplify-libcalls" |
Definition at line 20 of file SimplifyLibCalls.cpp.
| static uint64_t GetStringLength | ( | Value * | V | ) | [static] |
GetStringLength - If we can compute the length of the string pointed to by the specified pointer, return 'len+1'. If we can't, return 0.
Definition at line 415 of file SimplifyLibCalls.cpp.
References GetStringLengthH(), and llvm::Value::getType().
| static uint64_t GetStringLengthH | ( | Value * | V, | |
| SmallPtrSet< PHINode *, 32 > & | PHIs | |||
| ) | [static] |
GetStringLengthH - If we can compute the length of the string pointed to by the specified pointer, return 'len+1'. If we can't, return 0.
Definition at line 304 of file SimplifyLibCalls.cpp.
References llvm::dyn_cast(), llvm::SequentialType::getElementType(), llvm::GlobalVariable::getInitializer(), llvm::ArrayType::getNumElements(), llvm::User::getNumOperands(), llvm::Constant::getOperand(), llvm::User::getOperand(), llvm::ConstantArray::getType(), GV, llvm::GlobalVariable::hasInitializer(), Idx, llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::GlobalVariable::isConstant(), and llvm::ConstantInt::isZero().
Referenced by GetStringLength().
| static bool IsOnlyUsedInZeroEqualityComparison | ( | Value * | V | ) | [static] |
IsOnlyUsedInZeroEqualityComparison - Return true if it only matters that the value is equal or not-equal to zero.
Definition at line 427 of file SimplifyLibCalls.cpp.
References llvm::CallingConv::C, E, IC, llvm::Value::use_begin(), and llvm::Value::use_end().
| STATISTIC | ( | NumAnnotated | , | |
| "Number of attributes added to library functions" | ||||
| ) |
| STATISTIC | ( | NumSimplified | , | |
| "Number of library calls simplified" | ||||
| ) |
| AbsOpt Abs |
Definition at line 1337 of file SimplifyLibCalls.cpp.
Definition at line 48 of file SimplifyLibCalls.cpp.
Referenced by llvm::InlineCostAnalyzer::getInlineCost(), HandleInlinedInvoke(), InlineCallIfPossible(), llvm::InlineFunction(), llvm::Inliner::runOnSCC(), and UpdateCallGraphAfterInlining().
| ExitOpt Exit |
Definition at line 1329 of file SimplifyLibCalls.cpp.
| Exp2Opt Exp2 |
Definition at line 1335 of file SimplifyLibCalls.cpp.
| FFSOpt FFS |
Definition at line 1337 of file SimplifyLibCalls.cpp.
| FPrintFOpt FPrintF |
Definition at line 1341 of file SimplifyLibCalls.cpp.
| FPutsOpt FPuts |
Definition at line 1341 of file SimplifyLibCalls.cpp.
| FWriteOpt FWrite |
Definition at line 1341 of file SimplifyLibCalls.cpp.
char ID [static] |
Definition at line 1345 of file SimplifyLibCalls.cpp.
| IsAsciiOpt IsAscii |
Definition at line 1337 of file SimplifyLibCalls.cpp.
| IsDigitOpt IsDigit |
Definition at line 1337 of file SimplifyLibCalls.cpp.
| MemCmpOpt MemCmp |
Definition at line 1332 of file SimplifyLibCalls.cpp.
| MemCpyOpt MemCpy |
Definition at line 1332 of file SimplifyLibCalls.cpp.
| MemMoveOpt MemMove |
Definition at line 1333 of file SimplifyLibCalls.cpp.
| MemSetOpt MemSet |
Definition at line 1333 of file SimplifyLibCalls.cpp.
| bool Modified |
Definition at line 1343 of file SimplifyLibCalls.cpp.
| StringMap<LibCallOptimization*> Optimizations |
Definition at line 1327 of file SimplifyLibCalls.cpp.
| PowOpt Pow |
Definition at line 1335 of file SimplifyLibCalls.cpp.
| PrintFOpt PrintF |
Definition at line 1340 of file SimplifyLibCalls.cpp.
| SPrintFOpt SPrintF |
Definition at line 1340 of file SimplifyLibCalls.cpp.
| StrCatOpt StrCat |
Definition at line 1331 of file SimplifyLibCalls.cpp.
| StrChrOpt StrChr |
Definition at line 1331 of file SimplifyLibCalls.cpp.
| StrCmpOpt StrCmp |
Definition at line 1331 of file SimplifyLibCalls.cpp.
| StrCpyOpt StrCpy |
Definition at line 1332 of file SimplifyLibCalls.cpp.
| StrLenOpt StrLen |
Definition at line 1332 of file SimplifyLibCalls.cpp.
| StrNCmpOpt StrNCmp |
Definition at line 1331 of file SimplifyLibCalls.cpp.
| const TargetData* TD |
Definition at line 49 of file SimplifyLibCalls.cpp.
| ToAsciiOpt ToAscii |
Definition at line 1338 of file SimplifyLibCalls.cpp.
| UnaryDoubleFPOpt UnaryDoubleFP |
Definition at line 1335 of file SimplifyLibCalls.cpp.
RegisterPass<SimplifyLibCalls> X("simplify-libcalls","Simplify well-known library calls") [static] |