summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-12-08 19:04:51 +0000
committerJustin Bogner <mail@justinbogner.com>2014-12-08 19:04:51 +0000
commit970ac60573da3cce98934d73f65285bbcbfb5ba3 (patch)
tree481fade33caaf808c8fbc72c741c8518ee743d99 /clang/lib/CodeGen/BackendUtil.cpp
parent903f3db7acbd3b994e5adf0ea20a5bfff40fba81 (diff)
downloadbcm5719-llvm-970ac60573da3cce98934d73f65285bbcbfb5ba3.tar.gz
bcm5719-llvm-970ac60573da3cce98934d73f65285bbcbfb5ba3.zip
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
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 41f21312bc2..97485b73927 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -366,6 +366,12 @@ void EmitAssemblyHelper::CreatePasses() {
MPM->add(createStripSymbolsPass(true));
}
+ if (CodeGenOpts.ProfileInstrGenerate) {
+ InstrProfOptions Options;
+ Options.NoRedZone = CodeGenOpts.DisableRedZone;
+ MPM->add(createInstrProfilingPass(Options));
+ }
+
PMBuilder.populateModulePassManager(*MPM);
}
OpenPOWER on IntegriCloud