[llvm-commits] [llvm] r168893 - in /llvm/trunk: lib/Transforms/Scalar/SimplifyLibCalls.cpp lib/Transforms/Utils/SimplifyLibCalls.cpp test/Transforms/InstCombine/fprintf-1.ll test/Transforms/InstCombine/fputs-1.ll test/Transforms/SimplifyLibCalls/FPuts.ll

Meador Inge meadori at codesourcery.com
Tue Mar 5 15:11:09 PST 2013


Hi Nadav,

On 03/05/2013 04:52 PM, Nadav Rotem wrote:

> Hi Meador, 
> 
> I am now working on improving the clang compile time and I ran into a severe
> compile time regression in InstCombine and I think that it is due to your
> LibCallOptimization changes.  The problem is that InstCombiner::visitCallSite()
> calls LibCallSimplifier::initOptimizations().  InitOptimizations inserts dozens
> of function names into string map. It rehashes the map and allocates memory very
> often, and this initialization takes a long time.  I am profiling a typical C++
> programs that uses STL, and I see lots of functions don't do much beside calling
> other functions. I already optimized the memory allocation, but not the
> insertion into the StringMap. On my program, initOptimizations takes 13.5% of
> the execution time of InstCombine.  I understand that we only initialize this
> data structure once per function, but many c++ programs have lots of small
> functions and the cost of initialization is still high. Can you please look into
> this problem ? 

Sure.  I will look into it ASAP.  Thanks for the initial investigation.


-- 
Meador Inge
CodeSourcery / Mentor Embedded



More information about the llvm-commits mailing list