r179436 - Speed-up ObjCMethodDecl::getOverriddenMethods().
jahanian
fjahanian at apple.com
Sun Apr 14 10:51:09 PDT 2013
Is there anecdotal evidence of speed improvement (other than the obvious multiple iteration removal)?
- fariborz
On Apr 12, 2013, at 6:04 PM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> Author: akirtzidis
> Date: Fri Apr 12 20:04:01 2013
> New Revision: 179436
>
> URL: http://llvm.org/viewvc/llvm-project?rev=179436&view=rev
> Log:
> Speed-up ObjCMethodDecl::getOverriddenMethods().
>
> Use an newly introduce ASTContext::getBaseObjCCategoriesAfterInterface() which caches its
> results instead of re-calculating the categories multiple times.
>
> Modified: cfe/trunk/lib/AST/ASTContext.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=179436&r1=179435&r2=179436&view=diff
> ==============================================================================
> --- cfe/trunk/lib/AST/ASTContext.cpp (original)
> +++ cfe/trunk/lib/AST/ASTContext.cpp Fri Apr 12 20:04:01 2013
> @@ -1127,8 +1127,8 @@ void ASTContext::getOverriddenMethods(
> assert(D);
>
> if (const CXXMethodDecl *CXXMethod = dyn_cast<CXXMethodDecl>(D)) {
> - Overridden.append(CXXMethod->begin_overridden_methods(),
> - CXXMethod->end_overridden_methods());
> + Overridden.append(overridden_methods_begin(CXXMethod),
> + overridden_methods_end(CXXMethod));
> return;
> }
>
> @@ -1141,6 +1141,39 @@ void ASTContext::getOverriddenMethods(
> Overridden.append(OverDecls.begin(), OverDecls.end());
> }
>
> +void ASTContext::getBaseObjCCategoriesAfterInterface(
> +
More information about the cfe-commits
mailing list