r218888 - Reapply "InstrProf: Update for the LLVM API change in r218879"
Justin Bogner
mail at justinbogner.com
Thu Oct 2 09:44:02 PDT 2014
Author: bogner
Date: Thu Oct 2 11:44:01 2014
New Revision: 218888
URL: http://llvm.org/viewvc/llvm-project?rev=218888&view=rev
Log:
Reapply "InstrProf: Update for the LLVM API change in r218879"
Reapplying now that r218887 is in.
This reverts commit r218882, reapplying r218880.
Modified:
cfe/trunk/lib/CodeGen/CodeGenPGO.cpp
cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp
cfe/trunk/lib/CodeGen/CoverageMappingGen.h
Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenPGO.cpp?rev=218888&r1=218887&r2=218888&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenPGO.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Thu Oct 2 11:44:01 2014
@@ -908,8 +908,7 @@ void CodeGenPGO::emitCounterRegionMappin
llvm::raw_string_ostream OS(CoverageMapping);
CoverageMappingGen MappingGen(*CGM.getCoverageMapping(),
CGM.getContext().getSourceManager(),
- CGM.getLangOpts(), RegionCounterMap.get(),
- NumRegionCounters);
+ CGM.getLangOpts(), RegionCounterMap.get());
MappingGen.emitCounterMapping(D, OS);
OS.flush();
}
Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp?rev=218888&r1=218887&r2=218888&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp (original)
+++ cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Thu Oct 2 11:44:01 2014
@@ -581,11 +581,9 @@ struct CounterCoverageMappingBuilder
CounterCoverageMappingBuilder(
CoverageMappingModuleGen &CVM,
- llvm::DenseMap<const Stmt *, unsigned> &CounterMap,
- unsigned NumRegionCounters, SourceManager &SM,
+ llvm::DenseMap<const Stmt *, unsigned> &CounterMap, SourceManager &SM,
const LangOptions &LangOpts)
- : CoverageMappingBuilder(CVM, SM, LangOpts), CounterMap(CounterMap),
- Builder(NumRegionCounters) {}
+ : CoverageMappingBuilder(CVM, SM, LangOpts), CounterMap(CounterMap) {}
/// \brief Write the mapping data to the output stream
void write(llvm::raw_ostream &OS) {
@@ -1213,8 +1211,7 @@ unsigned CoverageMappingModuleGen::getFi
void CoverageMappingGen::emitCounterMapping(const Decl *D,
llvm::raw_ostream &OS) {
assert(CounterMap);
- CounterCoverageMappingBuilder Walker(CVM, *CounterMap, NumRegionCounters, SM,
- LangOpts);
+ CounterCoverageMappingBuilder Walker(CVM, *CounterMap, SM, LangOpts);
Walker.VisitDecl(D);
Walker.write(OS);
}
Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CoverageMappingGen.h?rev=218888&r1=218887&r2=218888&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CoverageMappingGen.h (original)
+++ cfe/trunk/lib/CodeGen/CoverageMappingGen.h Thu Oct 2 11:44:01 2014
@@ -87,20 +87,16 @@ class CoverageMappingGen {
SourceManager &SM;
const LangOptions &LangOpts;
llvm::DenseMap<const Stmt *, unsigned> *CounterMap;
- unsigned NumRegionCounters;
public:
CoverageMappingGen(CoverageMappingModuleGen &CVM, SourceManager &SM,
const LangOptions &LangOpts)
- : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(nullptr),
- NumRegionCounters(0) {}
+ : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(nullptr) {}
CoverageMappingGen(CoverageMappingModuleGen &CVM, SourceManager &SM,
const LangOptions &LangOpts,
- llvm::DenseMap<const Stmt *, unsigned> *CounterMap,
- unsigned NumRegionCounters)
- : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(CounterMap),
- NumRegionCounters(NumRegionCounters) {}
+ llvm::DenseMap<const Stmt *, unsigned> *CounterMap)
+ : CVM(CVM), SM(SM), LangOpts(LangOpts), CounterMap(CounterMap) {}
/// \brief Emit the coverage mapping data which maps the regions of
/// code to counters that will be used to find the execution
More information about the cfe-commits
mailing list