[llvm-commits] [llvm] r121988 - /llvm/trunk/lib/MC/MCExpr.cpp

Daniel Dunbar daniel at zuster.org
Thu Dec 16 10:36:25 PST 2010


Author: ddunbar
Date: Thu Dec 16 12:36:25 2010
New Revision: 121988

URL: http://llvm.org/viewvc/llvm-project?rev=121988&view=rev
Log:
MC/Expr: Add a doxyment.

Modified:
    llvm/trunk/lib/MC/MCExpr.cpp

Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=121988&r1=121987&r2=121988&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Thu Dec 16 12:36:25 2010
@@ -290,6 +290,20 @@
   return true;
 }
 
+/// \brief Evaluate the result of an add between (conceptually) two MCValues.
+///
+/// This routine conceptually attempts to construct an MCValue:
+///   Result = (Result_A - Result_B + Result_Cst)
+/// from two MCValue's LHS and RHS where
+///   Result = LHS + RHS
+/// and
+///   Result = (LHS_A - LHS_B + LHS_Cst) + (RHS_A - RHS_B + RHS_Cst).
+///
+/// This routine attempts to aggresively fold the operands such that the result
+/// is representable in an MCValue, but may not always succeed.
+///
+/// \returns True on success, false if the result is not representable in an
+/// MCValue.
 static bool EvaluateSymbolicAdd(const MCAssembler *Asm,
                                 const MCAsmLayout *Layout,
                                 const SectionAddrMap *Addrs,





More information about the llvm-commits mailing list