[GSoC 2011] Improving LLVM's support for profile information

Hi,all:

My name is Wei Wu and I would like to participate in Google Summer of
Code 2011.I'm willing to improve LLVM's support for profile
information,follow Bob Wilson's proposal[1].After read his proposal I
have some questions below:

1.Is the "__builtin_expect" works now and how to use it?
   I have searched llvm's trunk and found it in two files
only("include/llvm/Support/Compiler.h" and
"lib/Support/raw_ostream.cpp"),documents were not found either.I
wonder if the implementation is in other branches,not in trunk?
2.Bob Wilson proposed this idea four months ago and I'm not sure if
the basic profile info analysis pass has implemented?(not the edge
profiling or path profiling passes)
3.Profile info was suggested to use LLVM IR metadata form.That means
.bc files(executed with lli) or binary file(generated with llc) will
be modified to update profile info if enabled.Right?
4.Some analysis and/or transformation passes are using heuristics to
guess profile info.To use the new profile API interfaces they must be
patched one by one.Should these works be a part of this proposal?

Your comments will be very appreciated.

I am a first year PhD candidate from Institute of Software,Chinese
Academy of Sciences.My major research area includes programming
languages and compiling technologies.

[1] http://permalink.gmane.org/gmane.comp.compilers.llvm.devel/37107