InstrProf: Use LLVM's -instrprof pass for profiling

The logic for lowering profiling counters has been moved to an LLVM
pass. Emit the intrinsics rather than duplicating the whole pass in
clang.

llvm-svn: 223683
This commit is contained in:
Justin Bogner
2014-12-08 19:04:51 +00:00
parent 903f3db7ac
commit 970ac60573
11 changed files with 70 additions and 287 deletions

View File

@@ -916,9 +916,6 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn,
// a quick pass now to see if we can.
if (!CurFn->doesNotThrow())
TryMarkNoThrow(CurFn);
PGO.emitInstrumentationData();
PGO.destroyRegionCounters();
}
/// ContainsLabel - Return true if the statement contains a label in it. If