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
This commit is contained in:
@@ -1405,11 +1405,3 @@ void CodeGenFunction::InitializeVtablePtrsRecursive(
|
||||
// Store address point
|
||||
Builder.CreateStore(VtableAddressPoint, VtableField);
|
||||
}
|
||||
|
||||
llvm::Value *CodeGenFunction::LoadCXXVTT() {
|
||||
assert((isa<CXXConstructorDecl>(CurFuncDecl) ||
|
||||
isa<CXXDestructorDecl>(CurFuncDecl)) &&
|
||||
"Must be in a C++ ctor or dtor to load the vtt parameter");
|
||||
|
||||
return Builder.CreateLoad(LocalDeclMap[CXXVTTDecl], "vtt");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user