[AST] Memoize ASTContext::getTypeInfo().
- On -emit-llvm-only of 403.gcc/combine.c, for example, we make 160k calls to getTypeInfo but only ever deal with 680 some distinct types. I saw these speedups (user time): 403.gcc/combine.c -- 3.1% OmniGroupFrameworks/NSBezierPath-OAExtensions.m -- 3.6% JavaScriptCore/Interpreter.cpp -- 1.4% which seems pretty sweet. I ran some histograms on those compiles and we end up doing a ton of getTypeInfo() on 'char' and 'int'. I tried splitting out a fast path for builtin types, but this wasn't a win. Still kinda seems like we could be doing better here. llvm-svn: 152377
Loading
Please register or sign in to comment