summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-02-24 20:46:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-02-24 20:46:36 +0000
commitfb532b9a340958494a5346f2230d51653e8ed31e (patch)
tree8b440293a23d1fb94658086ac9ef8c5266a7e449 /clang/lib/CodeGen/CodeGenFunction.h
parent40afcb547e4302017bcb5c06ae2204084c3dc776 (diff)
downloadbcm5719-llvm-fb532b9a340958494a5346f2230d51653e8ed31e.tar.gz
bcm5719-llvm-fb532b9a340958494a5346f2230d51653e8ed31e.zip
Add whole-program vtable optimization feature to Clang.
This patch introduces the -fwhole-program-vtables flag, which enables the whole-program vtable optimization feature (D16795) in Clang. Differential Revision: http://reviews.llvm.org/D16821 llvm-svn: 261767
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 1254a0f93fc..9a31c8f78b5 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -1401,7 +1401,7 @@ public:
/// EmitVTablePtrCheckForCall - Virtual method MD is being called via VTable.
/// If vptr CFI is enabled, emit a check that VTable is valid.
- void EmitVTablePtrCheckForCall(const CXXMethodDecl *MD, llvm::Value *VTable,
+ void EmitVTablePtrCheckForCall(const CXXRecordDecl *RD, llvm::Value *VTable,
CFITypeCheckKind TCK, SourceLocation Loc);
/// EmitVTablePtrCheck - Emit a check that VTable is a valid virtual table for
@@ -1409,6 +1409,12 @@ public:
void EmitVTablePtrCheck(const CXXRecordDecl *RD, llvm::Value *VTable,
CFITypeCheckKind TCK, SourceLocation Loc);
+ /// If whole-program virtual table optimization is enabled, emit an assumption
+ /// that VTable is a member of the type's bitset. Or, if vptr CFI is enabled,
+ /// emit a check that VTable is a member of the type's bitset.
+ void EmitBitSetCodeForVCall(const CXXRecordDecl *RD, llvm::Value *VTable,
+ SourceLocation Loc);
+
/// CanDevirtualizeMemberFunctionCalls - Checks whether virtual calls on given
/// expr can be devirtualized.
bool CanDevirtualizeMemberFunctionCall(const Expr *Base,
OpenPOWER on IntegriCloud