1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

For each function that we optimize we initialize a new list of lib functions. For each function name we malloc memory. This patch changes the Libcall map to use BumpPtrAllocator. Now we malloc only once. This speeds up instcombine by a few % on a large c++ program.

llvm-svn: 176170
This commit is contained in:
Nadav Rotem 2013-02-27 05:53:43 +00:00
parent 27576adcd5
commit 9786f5a9ee

View File

@ -23,6 +23,7 @@
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Target/TargetLibraryInfo.h"
#include "llvm/Transforms/Utils/BuildLibCalls.h"
@ -1672,7 +1673,7 @@ class LibCallSimplifierImpl {
const TargetLibraryInfo *TLI;
const LibCallSimplifier *LCS;
bool UnsafeFPShrink;
StringMap<LibCallOptimization*> Optimizations;
StringMap<LibCallOptimization*, BumpPtrAllocator> Optimizations;
// Fortified library call optimizations.
MemCpyChkOpt MemCpyChk;