Google has released a port of their GCC AutoFDO utility for LLVM for directing optimizations back into the compiler from the Linux kernel perf support.
AutoFDO is short for the Automatic Feedback Directed Optimizer that uses the Linux kernel's perf to collect sample profiles and to then pass that translated profile data back into the compiler so it's able to better optimize code generation of the targeted perf'ed binary to yield better performance. AutoFDO was originally written for GCC and can be found via gcc.gnu.org
The GCC AutoFDO was written by Dehao Chen at Google while now fellow Google engineer and compiler expert Diego Novillo has ported this tool to read a profile generated by Linux Perf and make it compatible with LLVM's sample-based profiler. With the prof support you'll need to be using the Linux 3.4 kernel or newer and the LLVM code from its latest trunk.
Details and instructions on using AutoFDO for LLVM can be found via the mailing list release announcement