diff options
| author | Justin Bogner <mail@justinbogner.com> | 2015-04-23 23:06:47 +0000 |
|---|---|---|
| committer | Justin Bogner <mail@justinbogner.com> | 2015-04-23 23:06:47 +0000 |
| commit | 66242d6c5e6a99ed81339d166b0bac7cfbdf1975 (patch) | |
| tree | 3699d8df58dd13457707e2f8d90e622fd060eef1 /clang/lib/CodeGen/CGExprAgg.cpp | |
| parent | d86e90abdd1e9cd1018aa5dc5522b266c6bac937 (diff) | |
| download | bcm5719-llvm-66242d6c5e6a99ed81339d166b0bac7cfbdf1975.tar.gz bcm5719-llvm-66242d6c5e6a99ed81339d166b0bac7cfbdf1975.zip | |
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.
llvm-svn: 235664
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 6b4cf68e05a..b139ef299ff 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -916,16 +916,16 @@ 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)); // Save whether the destination's lifetime is externally managed. bool isExternallyDestructed = Dest.isExternallyDestructed(); eval.begin(CGF); CGF.EmitBlock(LHSBlock); - Cnt.beginRegion(Builder); + CGF.incrementProfileCounter(E); Visit(E->getTrueExpr()); eval.end(CGF); |

