LLVM  9.0.0svn
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")
 
 STATISTIC (NumReturnedArg, "Number of arguments inferred as returned")
 
static bool setDoesNotAccessMemory (Function &F)
 
static bool setOnlyReadsMemory (Function &F)
 
static bool setOnlyAccessesArgMemory (Function &F)
 
static bool setDoesNotThrow (Function &F)
 
static bool setRetDoesNotAlias (Function &F)
 
static bool setDoesNotCapture (Function &F, unsigned ArgNo)
 
static bool setOnlyReadsMemory (Function &F, unsigned ArgNo)
 
static bool setRetNonNull (Function &F)
 
static bool setReturnedArg (Function &F, unsigned ArgNo)
 
static bool setNonLazyBind (Function &F)
 
static ValueemitMemCmpOrBcmp (llvm::LibFunc libfunc, Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, const DataLayout &DL, const TargetLibraryInfo *TLI)
 
static void appendTypeSuffix (Value *Op, StringRef &Name, SmallString< 20 > &NameBuffer)
 Append a suffix to the function name according to the type of 'Op'. More...
 
static ValueemitUnaryFloatFnCallHelper (Value *Op, StringRef Name, IRBuilder<> &B, const AttributeList &Attrs)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "build-libcalls"

Definition at line 28 of file BuildLibCalls.cpp.

Function Documentation

◆ appendTypeSuffix()

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 969 of file BuildLibCalls.cpp.

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

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

◆ emitMemCmpOrBcmp()

static Value* emitMemCmpOrBcmp ( llvm::LibFunc  libfunc,
Value Ptr1,
Value Ptr2,
Value Len,
IRBuilder<> &  B,
const DataLayout DL,
const TargetLibraryInfo TLI 
)
static

◆ emitUnaryFloatFnCallHelper()

static Value* emitUnaryFloatFnCallHelper ( Value Op,
StringRef  Name,
IRBuilder<> &  B,
const AttributeList Attrs 
)
static

◆ setDoesNotAccessMemory()

static bool setDoesNotAccessMemory ( Function F)
static

◆ setDoesNotCapture()

static bool setDoesNotCapture ( Function F,
unsigned  ArgNo 
)
static

◆ setDoesNotThrow()

static bool setDoesNotThrow ( Function F)
static

◆ setNonLazyBind()

static bool setNonLazyBind ( Function F)
static

◆ setOnlyAccessesArgMemory()

static bool setOnlyAccessesArgMemory ( Function F)
static

◆ setOnlyReadsMemory() [1/2]

static bool setOnlyReadsMemory ( Function F)
static

◆ setOnlyReadsMemory() [2/2]

static bool setOnlyReadsMemory ( Function F,
unsigned  ArgNo 
)
static

◆ setRetDoesNotAlias()

static bool setRetDoesNotAlias ( Function F)
static

◆ setRetNonNull()

static bool setRetNonNull ( Function F)
static

◆ setReturnedArg()

static bool setReturnedArg ( Function F,
unsigned  ArgNo 
)
static

◆ STATISTIC() [1/9]

STATISTIC ( NumReadNone  ,
"Number of functions inferred as readnone"   
)

◆ STATISTIC() [2/9]

STATISTIC ( NumReadOnly  ,
"Number of functions inferred as readonly"   
)

◆ STATISTIC() [3/9]

STATISTIC ( NumArgMemOnly  ,
"Number of functions inferred as argmemonly"   
)

◆ STATISTIC() [4/9]

STATISTIC ( NumNoUnwind  ,
"Number of functions inferred as nounwind"   
)

◆ STATISTIC() [5/9]

STATISTIC ( NumNoCapture  ,
"Number of arguments inferred as nocapture"   
)

◆ STATISTIC() [6/9]

STATISTIC ( NumReadOnlyArg  ,
"Number of arguments inferred as readonly"   
)

◆ STATISTIC() [7/9]

STATISTIC ( NumNoAlias  ,
"Number of function returns inferred as noalias"   
)

◆ STATISTIC() [8/9]

STATISTIC ( NumNonNull  ,
"Number of function returns inferred as nonnull returns"   
)

◆ STATISTIC() [9/9]

STATISTIC ( NumReturnedArg  ,
"Number of arguments inferred as returned"   
)