summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenPGO.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-04-11 06:10:10 +0000
committerJustin Bogner <mail@justinbogner.com>2014-04-11 06:10:10 +0000
commit53c55d993f01e7efb430bac75c8b1a03f938eb22 (patch)
treecef73625f1d9ed0d30ecb0673ec8ef4903447073 /clang/lib/CodeGen/CodeGenPGO.cpp
parent5eb139fc7c248410ec589ee987258d5e05b5e66d (diff)
downloadbcm5719-llvm-53c55d993f01e7efb430bac75c8b1a03f938eb22.tar.gz
bcm5719-llvm-53c55d993f01e7efb430bac75c8b1a03f938eb22.zip
CodeGen: Handle binary conditional operators in PGO instrumentation
This treats binary conditional operators in the same way as ternary conditional operators for instrumentation based profiling. llvm-svn: 206021
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 8c3340a9d3b..ea069cebfe7 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -442,7 +442,8 @@ namespace {
}
/// Assign a counter for the "true" part of a conditional operator. The
/// count in the "false" part will be calculated from this counter.
- void VisitConditionalOperator(const ConditionalOperator *E) {
+ void VisitAbstractConditionalOperator(
+ const AbstractConditionalOperator *E) {
CounterMap[E] = NextCounter++;
Visit(E->getCond());
Visit(E->getTrueExpr());
@@ -768,7 +769,8 @@ namespace {
Visit(S->getHandlerBlock());
}
- void VisitConditionalOperator(const ConditionalOperator *E) {
+ void VisitAbstractConditionalOperator(
+ const AbstractConditionalOperator *E) {
RecordStmtCount(E);
RegionCounter Cnt(PGO, E);
Visit(E->getCond());
OpenPOWER on IntegriCloud