mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Rename MallocFreeHelper as MemoryBuiltins
llvm-svn: 85286
This commit is contained in:
parent
5e0b3e4973
commit
0f662a7acf
@ -1,4 +1,4 @@
|
||||
//===- llvm/Analysis/MallocFreeHelper.h - Identify malloc/free --*- C++ -*-===//
|
||||
//===- llvm/Analysis/MemoryBuiltins.h- Calls to memory builtins -*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -7,14 +7,13 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This family of functions identifies calls to malloc, bitcasts of malloc
|
||||
// calls, and the types and array sizes associated with them. It also
|
||||
// identifies calls to the free builtin.
|
||||
// This family of functions identifies calls to builtin functions that allocate
|
||||
// or free memory.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_ANALYSIS_MALLOCHELPER_H
|
||||
#define LLVM_ANALYSIS_MALLOCHELPER_H
|
||||
#ifndef LLVM_ANALYSIS_MEMORYBUILTINS_H
|
||||
#define LLVM_ANALYSIS_MEMORYBUILTINS_H
|
||||
|
||||
namespace llvm {
|
||||
class CallInst;
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "llvm/Analysis/AliasSetTracker.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/IntrinsicInst.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/CaptureTracking.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
|
@ -23,7 +23,7 @@ add_llvm_library(LLVMAnalysis
|
||||
LoopDependenceAnalysis.cpp
|
||||
LoopInfo.cpp
|
||||
LoopPass.cpp
|
||||
MallocFreeHelper.cpp
|
||||
MemoryBuiltins.cpp
|
||||
MemoryDependenceAnalysis.cpp
|
||||
PointerTracking.cpp
|
||||
PostDominators.cpp
|
||||
|
@ -17,7 +17,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/CaptureTracking.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/Value.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
|
@ -63,7 +63,7 @@
|
||||
#include "llvm/Support/InstIterator.h"
|
||||
#include "llvm/Support/InstVisitor.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/System/Atomic.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/InstIterator.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
//===-- MallocFreeHelper.cpp - Identify calls to malloc and free builtins -===//
|
||||
//===------ MemoryBuiltins.cpp - Identify calls to memory builtins --------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
@ -7,13 +7,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This family of functions identifies calls to malloc, bitcasts of malloc
|
||||
// calls, and the types and array sizes associated with them. It also
|
||||
// identifies calls to the free builtin.
|
||||
// This family of functions identifies calls to builtin functions that allocate
|
||||
// or free memory.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/Module.h"
|
@ -20,7 +20,7 @@
|
||||
#include "llvm/IntrinsicInst.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Support/PredIteratorCache.h"
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "llvm/Analysis/ConstantFolding.h"
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/PointerTracking.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include "llvm/Analysis/CaptureTracking.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/UniqueVector.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Analysis/ConstantFolding.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Support/CallSite.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/MemoryDependenceAnalysis.h"
|
||||
#include "llvm/Support/CFG.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "llvm/GlobalVariable.h"
|
||||
#include "llvm/Operator.h"
|
||||
#include "llvm/Analysis/ConstantFolding.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Analysis/ConstantFolding.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/ValueTracking.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
#include "llvm/Support/CallSite.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "llvm/ADT/SmallPtrSet.h"
|
||||
#include "llvm/Analysis/ConstantFolding.h"
|
||||
#include "llvm/Analysis/DebugInfo.h"
|
||||
#include "llvm/Analysis/MallocFreeHelper.h"
|
||||
#include "llvm/Analysis/MemoryBuiltins.h"
|
||||
#include "llvm/Analysis/ProfileInfo.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Support/GetElementPtrTypeIterator.h"
|
||||
|
@ -303,7 +303,7 @@ bool Instruction::isUsedOutsideOfBlock(const BasicBlock *BB) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Code here matches isFreeCall from MallocFreeHelper, which is not in VMCore.
|
||||
// Code here matches isFreeCall from MemoryBuiltins, which is not in VMCore.
|
||||
static bool isFreeCall(const Value* I) {
|
||||
const CallInst *CI = dyn_cast<CallInst>(I);
|
||||
if (!CI)
|
||||
@ -408,7 +408,7 @@ bool Instruction::isCommutative(unsigned op) {
|
||||
}
|
||||
}
|
||||
|
||||
// Code here matches isMalloc from MallocFreeHelper, which is not in VMCore.
|
||||
// Code here matches isMalloc from MemoryBuiltins, which is not in VMCore.
|
||||
static bool isMalloc(const Value* I) {
|
||||
const CallInst *CI = dyn_cast<CallInst>(I);
|
||||
if (!CI) {
|
||||
|
Loading…
Reference in New Issue
Block a user