I looked at the profiling support in LLVM, and it seems that all
the bits needed for profile guided transformations are there.
We are using LLVM as a cross compiler, and the target is simulation
only at the moment. Would it be possible to use the native llvm
installation for profiling? That is, compile the application and
run it on the host, collecting profile data. Then use the profile
to guide optimization during cross compilation.
Obviously there are corner cases where this will not work, such
as conditionals involving sizeof(int) etc., but it seems that
for many applications it should work. Is there anything I am
missing that would prevent such use?
As an aside, a minor point about the profiling runtime library
is that it installs as profile_rt.*, not libprofile_rt.* as one