LLVM  6.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")
 
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 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

◆ DEBUG_TYPE

#define DEBUG_TYPE   "build-libcalls"

Definition at line 29 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 870 of file BuildLibCalls.cpp.

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

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

◆ setDoesNotAccessMemory()

static bool setDoesNotAccessMemory ( Function F)
static

◆ setDoesNotCapture()

static bool setDoesNotCapture ( Function F,
unsigned  ArgNo 
)
static

◆ setDoesNotThrow()

static bool setDoesNotThrow ( 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

◆ STATISTIC() [1/8]

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

◆ STATISTIC() [2/8]

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

◆ STATISTIC() [3/8]

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

◆ STATISTIC() [4/8]

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

◆ STATISTIC() [5/8]

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

◆ STATISTIC() [6/8]

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

◆ STATISTIC() [7/8]

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

◆ STATISTIC() [8/8]

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