]> granicus.if.org Git - clang/commit
Improve obvious-most-derived-type devirtualization:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 3 Nov 2016 18:55:18 +0000 (18:55 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 3 Nov 2016 18:55:18 +0000 (18:55 +0000)
commit4d47937a5393428157049587bb361e36ccd197ca
tree5d3e2676f399de8fa7ae88d5ad85ed5d92d747a4
parentf1b760ebd6aaea8b930aa076a36db0768b80c1f2
Improve obvious-most-derived-type devirtualization:

  * if the base is produced by a series of derived-to-base conversions, check
    the expression inside them when looking for an expression with a known
    dynamic type
  * step past MaterializeTemporaryExprs when checking for a known dynamic type
  * when checking for a known dynamic type, treat all class prvalues as having
    a known dynamic type after skipping all relevant rvalue subobject
    adjustments
  * treat callees formed by pointer-to-member access for a non-reference member
    type like callees formed by member access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285954 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Expr.h
lib/AST/Expr.cpp
lib/CodeGen/CGClass.cpp
test/CodeGenCXX/devirtualize-virtual-function-calls.cpp