OSDN Git Service

[PGO] Fix insane counts due to nonreturn calls
authorRong Xu <xur@google.com>
Tue, 13 Dec 2016 06:41:14 +0000 (06:41 +0000)
committerRong Xu <xur@google.com>
Tue, 13 Dec 2016 06:41:14 +0000 (06:41 +0000)
commit8a66c7e485eb1677d7b3ab9751b941f7efaa80e8
treea66febfbd65485373eb19779b0c2d402e1298ee6
parent22f8c83c859fa60c512b40566494ec8d2026676d
[PGO] Fix insane counts due to nonreturn calls

Summary:
Since we don't break BBs for function calls. We might get some insane counts
(wrap of unsigned) in the presence of noreturn calls.

This patch sets these counts to zero instead of the wrapped number.

Reviewers: davidxl

Subscribers: xur, eraman, llvm-commits

Differential Revision: https://reviews.llvm.org/D27602

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289521 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
test/Transforms/PGOProfile/Inputs/noreturncall.proftext [new file with mode: 0644]
test/Transforms/PGOProfile/noreturncall.ll [new file with mode: 0644]