GCC AutoFDO profile reader - Initial support.
authorDiego Novillo <dnovillo@google.com>
Thu, 17 Sep 2015 00:17:24 +0000 (00:17 +0000)
committerDiego Novillo <dnovillo@google.com>
Thu, 17 Sep 2015 00:17:24 +0000 (00:17 +0000)
commitd139c5d412156f29f3c250283be18f91c97effcf
treed1445ba72039714173446275ec34e9041749d333
parent1e5eaadbbdf3c1ddf0b2c425e1027e60a3b1b4a7
GCC AutoFDO profile reader - Initial support.

This adds enough machinery to support reading simple GCC AutoFDO
profiles. It now supports reading flat profiles (no function calls).
Subsequent patches will add support for:

- Inlined calls (in particular, the inline call stack is not traversed
  to accumulate samples).

- Working sets and modules. These are used mostly for GCC's LIPO
  optimizations, so they're not needed in LLVM atm. I'm not sure that
  we will ever need them. For now, I've if0'd around the calls.

The patch also adds support in GCOV.h for gcov version V704 (generated
by GCC's profile conversion tool).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247874 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ProfileData/SampleProf.h
include/llvm/ProfileData/SampleProfReader.h
include/llvm/Support/GCOV.h
lib/ProfileData/SampleProf.cpp
lib/ProfileData/SampleProfReader.cpp
test/Transforms/SampleProfile/Inputs/gcc-simple.afdo [new file with mode: 0644]
test/Transforms/SampleProfile/gcc-simple.ll [new file with mode: 0644]