LLVM  4.0.0
Macros | Functions
BuildLibCalls.cpp File Reference
#include "llvm/Transforms/Utils/BuildLibCalls.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
Include dependency graph for BuildLibCalls.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "build-libcalls"
 

Functions

 STATISTIC (NumReadNone,"Number of functions inferred as readnone")
 
 STATISTIC (NumReadOnly,"Number of functions inferred as readonly")
 
 STATISTIC (NumArgMemOnly,"Number of functions inferred as argmemonly")
 
 STATISTIC (NumNoUnwind,"Number of functions inferred as nounwind")
 
 STATISTIC (NumNoCapture,"Number of arguments inferred as nocapture")
 
 STATISTIC (NumReadOnlyArg,"Number of arguments inferred as readonly")
 
 STATISTIC (NumNoAlias,"Number of function returns inferred as noalias")
 
 STATISTIC (NumNonNull,"Number of function returns inferred as nonnull returns")
 
static bool setDoesNotAccessMemory (Function &F)
 
static bool setOnlyReadsMemory (Function &F)
 
static bool setOnlyAccessesArgMemory (Function &F)
 
static bool setDoesNotThrow (Function &F)
 
static bool setDoesNotCapture (Function &F, unsigned n)
 
static bool setOnlyReadsMemory (Function &F, unsigned n)
 
static bool setDoesNotAlias (Function &F, unsigned n)
 
static bool setNonNull (Function &F, unsigned n)
 
static void appendTypeSuffix (Value *Op, StringRef &Name, SmallString< 20 > &NameBuffer)
 Append a suffix to the function name according to the type of 'Op'. More...
 

Macro Definition Documentation

#define DEBUG_TYPE   "build-libcalls"

Definition at line 29 of file BuildLibCalls.cpp.

Function Documentation

static void appendTypeSuffix ( Value Op,
StringRef Name,
SmallString< 20 > &  NameBuffer 
)
static

Append a suffix to the function name according to the type of 'Op'.

Definition at line 869 of file BuildLibCalls.cpp.

References llvm::Value::getType(), llvm::Type::isDoubleTy(), and llvm::Type::isFloatTy().

Referenced by llvm::emitBinaryFloatFnCall(), and llvm::emitUnaryFloatFnCall().

static bool setDoesNotAccessMemory ( Function F)
static
static bool setDoesNotAlias ( Function F,
unsigned  n 
)
static
static bool setDoesNotCapture ( Function F,
unsigned  n 
)
static
static bool setDoesNotThrow ( Function F)
static
static bool setNonNull ( Function F,
unsigned  n 
)
static
static bool setOnlyAccessesArgMemory ( Function F)
static
static bool setOnlyReadsMemory ( Function F)
static
static bool setOnlyReadsMemory ( Function F,
unsigned  n 
)
static
STATISTIC ( NumReadNone  ,
"Number of functions inferred as readnone"   
)
STATISTIC ( NumReadOnly  ,
"Number of functions inferred as readonly"   
)
STATISTIC ( NumArgMemOnly  ,
"Number of functions inferred as argmemonly"   
)
STATISTIC ( NumNoUnwind  ,
"Number of functions inferred as nounwind"   
)
STATISTIC ( NumNoCapture  ,
"Number of arguments inferred as nocapture"   
)
STATISTIC ( NumReadOnlyArg  ,
"Number of arguments inferred as readonly"   
)
STATISTIC ( NumNoAlias  ,
"Number of function returns inferred as noalias"   
)
STATISTIC ( NumNonNull  ,
"Number of function returns inferred as nonnull returns"   
)