From 347132b32f69c9d4abb1cdcb5329f56f98904440 Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 16 Feb 2010 22:04:33 +0000 Subject: IRgen optimization: cache the value of 'this' and 'vtt' instead of repeatedly reloading from an alloca. We still need to create the alloca for debug info purposes (although we currently create it in all cases because of some abstraction boundaries that're hard to break down). llvm-svn: 96403 --- clang/lib/CodeGen/CGClass.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'clang/lib/CodeGen/CGClass.cpp') diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index fa5a47f3156..d9051675ba0 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -1405,11 +1405,3 @@ void CodeGenFunction::InitializeVtablePtrsRecursive( // Store address point Builder.CreateStore(VtableAddressPoint, VtableField); } - -llvm::Value *CodeGenFunction::LoadCXXVTT() { - assert((isa(CurFuncDecl) || - isa(CurFuncDecl)) && - "Must be in a C++ ctor or dtor to load the vtt parameter"); - - return Builder.CreateLoad(LocalDeclMap[CXXVTTDecl], "vtt"); -} -- cgit v1.2.3