[llvm-commits] [dragonegg] r126570 - /dragonegg/trunk/llvm-convert.cpp

Duncan Sands baldrick at free.fr
Sun Feb 27 05:29:05 PST 2011


Author: baldrick
Date: Sun Feb 27 07:29:05 2011
New Revision: 126570

URL: http://llvm.org/viewvc/llvm-project?rev=126570&view=rev
Log:
Add descriptions of some variables using when processing inline asm.

Modified:
    dragonegg/trunk/llvm-convert.cpp

Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=126570&r1=126569&r2=126570&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Sun Feb 27 07:29:05 2011
@@ -6862,8 +6862,6 @@
   // side effects.
   bool HasSideEffects = gimple_asm_volatile_p(stmt) || (NumOutputs == 0);
 
-  std::vector<Value*> CallOps;
-
   // CallResultTypes - The inline asm call may return one or more results.  The
   // types of the results are recorded here along with a flag indicating whether
   // the corresponding GCC type is signed.
@@ -6876,10 +6874,15 @@
   // in which case the result is converted before being stored.
   SmallVector<std::pair<Value *, bool>, 4> CallResultDests;
 
-  SmallVector<std::pair<bool, unsigned>, 4> OutputLocations;
+  // CallOps - The operands pass to the inline asm call.
+  std::vector<Value*> CallOps;
 
-  // ConstraintStr - The string of constraints in LLVM format.
-  std::string ConstraintStr;
+  // OutputLocations - For each output holds an index into CallOps (if the flag
+  // is false) or into CallResultTypes (if the flag is true).  Outputs returned
+  // in memory are passed to the asm as an operand and thus appear in CallOps.
+  // Those returned in registers are obtained as one of the results of the asm
+  // call and thus correspond to an entry in CallResultTypes.
+  SmallVector<std::pair<bool, unsigned>, 4> OutputLocations;
 
   // SSADefinitions - If the asm defines an SSA name then the SSA name and a
   // memory location are recorded here.  The asm result defining the SSA name
@@ -6887,6 +6890,9 @@
   // to define the SSA name.
   SmallVector<std::pair<tree, MemRef>, 4> SSADefinitions;
 
+  // ConstraintStr - The string of constraints in LLVM format.
+  std::string ConstraintStr;
+
   // Process outputs.
   for (unsigned i = 0; i != NumOutputs; ++i) {
     tree Output = gimple_asm_output_op(stmt, i);





More information about the llvm-commits mailing list