[PATCH] D15158: [PGO] Instrument only base constructors and destructors.

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 2 11:38:29 PST 2015


sepavloff created this revision.
sepavloff added a reviewer: bogner.
sepavloff added subscribers: cfe-commits, silvas.

Constructors and destructors may be represented by several functions
in IR. Only the base structors correspond to source code, others
are small pieces of code and eventually call the base variant. In
this case instrumentation of non-base structors has little sense,
this fix remove it. Now profile data of a declaration correspond to
exactly one function in IR, it agrees with current logic of profile
data loading.

This change fixes PR24996.

http://reviews.llvm.org/D15158

Files:
  lib/CodeGen/CGBlocks.cpp
  lib/CodeGen/CGObjC.cpp
  lib/CodeGen/CGStmt.cpp
  lib/CodeGen/CGStmtOpenMP.cpp
  lib/CodeGen/CodeGenFunction.cpp
  lib/CodeGen/CodeGenPGO.cpp
  lib/CodeGen/CodeGenPGO.h
  test/Profile/cxx-structors.cpp
  test/Profile/cxx-virtual-destructor-calls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15158.41653.patch
Type: text/x-patch
Size: 7923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151202/46d61289/attachment.bin>


More information about the cfe-commits mailing list