diff options
author | Piotr Padlewski <prazek@google.com> | 2015-09-09 22:20:28 +0000 |
---|---|---|
committer | Piotr Padlewski <prazek@google.com> | 2015-09-09 22:20:28 +0000 |
commit | 255652e828ea84957f76d6719436e34ece09605d (patch) | |
tree | fd7ccd2736929fe411a932a9a07928d386b400f2 /clang/lib/CodeGen/CGVTables.cpp | |
parent | 66ef16b2890e57d4cc94e4ebf902a9ed741e8c26 (diff) | |
download | bcm5719-llvm-255652e828ea84957f76d6719436e34ece09605d.tar.gz bcm5719-llvm-255652e828ea84957f76d6719436e34ece09605d.zip |
Generating assumption loads of vptr after ctor call (fixed)
Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.
For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html
Edit:
Fixed version because of PR24479.
After this patch got reverted because of ScalarEvolution bug (D12719)
Merged after John McCall big patch (Added Address).
http://reviews.llvm.org/D11859
llvm-svn: 247199
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 48e06a3879d..6aa624ec060 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/lib/CodeGen/CGVTables.cpp @@ -696,7 +696,7 @@ CodeGenVTables::GenerateConstructionVTable(const CXXRecordDecl *RD, static bool shouldEmitAvailableExternallyVTable(const CodeGenModule &CGM, const CXXRecordDecl *RD) { return CGM.getCodeGenOpts().OptimizationLevel > 0 && - CGM.getCXXABI().canEmitAvailableExternallyVTable(RD); + CGM.getCXXABI().canSpeculativelyEmitVTable(RD); } /// Compute the required linkage of the v-table for the given class. @@ -846,11 +846,11 @@ bool CodeGenVTables::isVTableExternal(const CXXRecordDecl *RD) { /// we define that v-table? static bool shouldEmitVTableAtEndOfTranslationUnit(CodeGenModule &CGM, const CXXRecordDecl *RD) { - // If vtable is internal then it has to be done + // If vtable is internal then it has to be done. if (!CGM.getVTables().isVTableExternal(RD)) return true; - // If it's external then maybe we will need it as available_externally + // If it's external then maybe we will need it as available_externally. return shouldEmitAvailableExternallyVTable(CGM, RD); } |