[PM] Add a basic doxygen comment for this pass.
[oota-llvm.git] / lib / Transforms / Scalar / LowerExpectIntrinsic.cpp
index 3a0474279a6cebf64f77324ab5b2849ebcfb079d..2a11f9a4f5433c63707d6f7a83985379b4ccb2a9 100644 (file)
@@ -40,6 +40,12 @@ UnlikelyBranchWeight("unlikely-branch-weight", cl::Hidden, cl::init(4),
                    cl::desc("Weight of the branch unlikely to be taken (default = 4)"));
 
 namespace {
+/// \brief Legacy pass for lowering expect intrinsics out of the IR.
+///
+/// When this pass is run over a function it uses expect intrinsics which feed
+/// branches and switches to provide branch weight metadata for those
+/// terminators. It then removes the expect intrinsics from the IR so the rest
+/// of the optimizer can ignore them.
 class LowerExpectIntrinsic : public FunctionPass {
 
   bool HandleSwitchExpect(SwitchInst *SI);