diff options
| author | Justin Bogner <mail@justinbogner.com> | 2014-04-11 06:10:10 +0000 |
|---|---|---|
| committer | Justin Bogner <mail@justinbogner.com> | 2014-04-11 06:10:10 +0000 |
| commit | 6699b197f657547e9f3fd1ad699df68d8a19dc52 (patch) | |
| tree | c76cdad261d1adaced35130412e47cb58d94ed00 /lib/CodeGen/CodeGenPGO.cpp | |
| parent | 94d470b741ae6296ac42dd6809ff866c30239a93 (diff) | |
| download | clang-6699b197f657547e9f3fd1ad699df68d8a19dc52.tar.gz clang-6699b197f657547e9f3fd1ad699df68d8a19dc52.tar.bz2 clang-6699b197f657547e9f3fd1ad699df68d8a19dc52.tar.xz | |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenPGO.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenPGO.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenPGO.cpp b/lib/CodeGen/CodeGenPGO.cpp index 8c3340a9d3..ea069cebfe 100644 --- a/lib/CodeGen/CodeGenPGO.cpp +++ b/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()); |
