[CodeGen] Add Performance Monitor
commitd7264640cf62169d3f12251bf62164d296eb5148
authorTobias Grosser <tobias@grosser.es>
Mon, 3 Apr 2017 14:55:37 +0000 (3 14:55 +0000)
committerTobias Grosser <tobias@grosser.es>
Mon, 3 Apr 2017 14:55:37 +0000 (3 14:55 +0000)
treef47a91b0987c5ced176ae61df3c21dcee13ae873
parente59cd294716e568c36bfc87aec91003b8c34d443
[CodeGen] Add Performance Monitor

Add support for -polly-codegen-perf-monitoring. When performance monitoring
is enabled, we emit performance monitoring code during code generation that
prints after program exit statistics about the total number of cycles executed
as well as the number of cycles spent in scops. This gives an estimate on how
useful polyhedral optimizations might be for a given program.

Example output:

  Polly runtime information
  -------------------------
  Total: 783110081637
  Scops: 663718949365

In the future, we might also add functionality to measure how much time is spent
in optimized scops and how many cycles are spent in the fallback code.

Reviewers: bollu,sebpop

Tags: #polly

Differential Revision: https://reviews.llvm.org/D31599

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@299359 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/CodeGen/PerfMonitor.h [new file with mode: 0644]
lib/CMakeLists.txt
lib/CodeGen/CodeGeneration.cpp
lib/CodeGen/PerfMonitor.cpp [new file with mode: 0644]
test/Isl/CodeGen/perf_monitoring.ll [new file with mode: 0644]