summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprComplex.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-04-23 23:06:47 +0000
committerJustin Bogner <mail@justinbogner.com>2015-04-23 23:06:47 +0000
commitaa53a4f2ee57217d83b151004d80628c14dcdbf4 (patch)
tree7cecb2b47a79193fee798f059ff854661caa9982 /lib/CodeGen/CGExprComplex.cpp
parentb58f3164d3e1e1ce89dc6d7650a5b4f9638d7bea (diff)
downloadclang-aa53a4f2ee57217d83b151004d80628c14dcdbf4.tar.gz
InstrProf: Stop using RegionCounter outside of CodeGenPGO (NFC)
The RegionCounter type does a lot of legwork, but most of it is only meaningful within the implementation of CodeGenPGO. The uses elsewhere in CodeGen generally just want to increment or read counters, so do that directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprComplex.cpp')
-rw-r--r--lib/CodeGen/CGExprComplex.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp
index dead1b5d15..27d1c68996 100644
--- a/lib/CodeGen/CGExprComplex.cpp
+++ b/lib/CodeGen/CGExprComplex.cpp
@@ -949,13 +949,14 @@ VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) {
// Bind the common expression if necessary.
CodeGenFunction::OpaqueValueMapping binding(CGF, E);
- RegionCounter Cnt = CGF.getPGORegionCounter(E);
+
CodeGenFunction::ConditionalEvaluation eval(CGF);
- CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock, Cnt.getCount());
+ CGF.EmitBranchOnBoolExpr(E->getCond(), LHSBlock, RHSBlock,
+ CGF.getProfileCount(E));
eval.begin(CGF);
CGF.EmitBlock(LHSBlock);
- Cnt.beginRegion(Builder);
+ CGF.incrementProfileCounter(E);
ComplexPairTy LHS = Visit(E->getTrueExpr());
LHSBlock = Builder.GetInsertBlock();
CGF.EmitBranch(ContBlock);