[llvm-commits] [hlvm] r38302 - in /hlvm/trunk: hlvm/AST/ hlvm/CodeGen/ hlvm/Pass/ hlvm/Reader/ hlvm/Writer/ test/return0/ test/xml2xml/

Reid Spencer reid at x10sys.com
Sat Jul 7 17:02:07 PDT 2007


Author: reid
Date: Sat Jul  7 19:02:07 2007
New Revision: 38302

URL: http://llvm.org/viewvc/llvm-project?rev=38302&view=rev
Log:
Create a "result" operator to dissociate the operation of specifying a result
value for a block from the operation of returning from a function. This allows
results to be specified at any point during a block, not just at the end of the
block, which allows post-result computations.

Modified:
    hlvm/trunk/hlvm/AST/AST.cpp
    hlvm/trunk/hlvm/AST/Block.cpp
    hlvm/trunk/hlvm/AST/ControlFlow.h
    hlvm/trunk/hlvm/AST/Node.h
    hlvm/trunk/hlvm/AST/Operator.cpp
    hlvm/trunk/hlvm/AST/Operator.h
    hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp
    hlvm/trunk/hlvm/Pass/Validate.cpp
    hlvm/trunk/hlvm/Reader/HLVM.rng
    hlvm/trunk/hlvm/Reader/XMLReader.cpp
    hlvm/trunk/hlvm/Writer/XMLWriter.cpp
    hlvm/trunk/test/return0/arithmetic.hlx
    hlvm/trunk/test/return0/bitwise.hlx
    hlvm/trunk/test/return0/boolean.hlx
    hlvm/trunk/test/return0/call.hlx
    hlvm/trunk/test/return0/complement.hlx
    hlvm/trunk/test/return0/helloworld.hlx
    hlvm/trunk/test/return0/return0.hlx
    hlvm/trunk/test/return0/select.hlx
    hlvm/trunk/test/xml2xml/block.hlx
    hlvm/trunk/test/xml2xml/helloworld.hlx
    hlvm/trunk/test/xml2xml/loop.hlx
    hlvm/trunk/test/xml2xml/return.hlx
    hlvm/trunk/test/xml2xml/select.hlx
    hlvm/trunk/test/xml2xml/switch.hlx

Modified: hlvm/trunk/hlvm/AST/AST.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/AST.cpp?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/AST.cpp (original)
+++ hlvm/trunk/hlvm/AST/AST.cpp Sat Jul  7 19:02:07 2007
@@ -1041,9 +1041,14 @@
 AST::new_NilaryOp<ContinueOp>(const Locator*loc);
 
 template ReturnOp* 
-AST::new_UnaryOp<ReturnOp>(const Type*Ty, Operator*op1,const Locator*loc);
+AST::new_NilaryOp<ReturnOp>(const Type*Ty, const Locator*loc);
 template ReturnOp* 
-AST::new_UnaryOp<ReturnOp>(Operator*op1,const Locator*loc);
+AST::new_NilaryOp<ReturnOp>(const Locator*loc);
+
+template ResultOp* 
+AST::new_UnaryOp<ResultOp>(const Type*Ty, Operator*op1,const Locator*loc);
+template ResultOp* 
+AST::new_UnaryOp<ResultOp>(Operator*op1,const Locator*loc);
 
 template CallOp* 
 AST::new_MultiOp<CallOp>(const Type*Ty, const std::vector<Operator*>& ops, const Locator*loc);

Modified: hlvm/trunk/hlvm/AST/Block.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Block.cpp?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Block.cpp (original)
+++ hlvm/trunk/hlvm/AST/Block.cpp Sat Jul  7 19:02:07 2007
@@ -47,7 +47,7 @@
   if (llvm::isa<AutoVarOp>(child)) {
     AutoVarOp* av = llvm::cast<AutoVarOp>(child);
     autovars[av->getName()] = av;
-  }
+  } else if (llvm::isa<ResultOp>(child))
   type = getResultType(); // update type to match type of thing just added
 }
 
@@ -83,4 +83,5 @@
   return 0;
 }
 
+ResultOp::~ResultOp() {}
 }

Modified: hlvm/trunk/hlvm/AST/ControlFlow.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/ControlFlow.h?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/ControlFlow.h (original)
+++ hlvm/trunk/hlvm/AST/ControlFlow.h Sat Jul  7 19:02:07 2007
@@ -153,28 +153,22 @@
 /// The ReturnOp takes one operand which is the value to return to the caller
 /// of the Function.
 /// @brief AST Return Operator Node
-class ReturnOp : public UnaryOperator
+class ReturnOp : public NilaryOperator
 {
   /// @name Constructors
   /// @{
   protected:
-    ReturnOp() : UnaryOperator(ReturnOpID)  {}
+    ReturnOp() : NilaryOperator(ReturnOpID)  {}
     virtual ~ReturnOp();
 
   /// @}
   /// @name Accessors
   /// @{
   public:
-    Value* getResult() { return UnaryOperator::op1; }
     static inline bool classof(const ReturnOp*) { return true; }
     static inline bool classof(const Node* N) { return N->is(ReturnOpID); }
 
   /// @}
-  /// @name Accessors
-  /// @{
-  public:
-    void setResult(Value* op) { op->setParent(this); }
-  /// @}
   friend class AST;
 };
 

Modified: hlvm/trunk/hlvm/AST/Node.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Node.h?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Node.h (original)
+++ hlvm/trunk/hlvm/AST/Node.h Sat Jul  7 19:02:07 2007
@@ -155,9 +155,10 @@
 FirstOperatorID = BlockID,
 
   // Nilary Operators (those taking no operands)
-  BreakOpID,               ///< Break out of the enclosing loop
+  BreakOpID,               ///< Break out of the enclosing block
 FirstNilaryOperatorID = BreakOpID,
-  ContinueOpID,            ///< Continue from start of enclosing block
+  ContinueOpID,            ///< Continue from start of enclosing loop
+  ReturnOpID,              ///< Return to the function's caller
   PInfOpID,                ///< Constant Positive Infinity Real Value
   NInfOpID,                ///< Constant Negative Infinity Real Value
   NaNOpID,                 ///< Constant Not-A-Number Real Value
@@ -167,8 +168,7 @@
   // Control Flow Unary Operators
   NullOpID,                ///< The "do nothing" NullOp (no-op) Operator
 FirstUnaryOperatorID = NullOpID,
-  ReturnOpID,              ///< Return a value to the function's caller
-  ResultOpID,              ///< Specify the result of a block
+  ResultOpID,              ///< Specify the result of a block or function
   ThrowOpID,               ///< Throw an exception out of the function
 
   // Integer Arithmetic Unary Operators

Modified: hlvm/trunk/hlvm/AST/Operator.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Operator.cpp?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Operator.cpp (original)
+++ hlvm/trunk/hlvm/AST/Operator.cpp Sat Jul  7 19:02:07 2007
@@ -48,6 +48,14 @@
   return cast<Function>(p);
 }
 
+Block*
+Operator::getContainingBlock()
+{
+  Node* p = getParent();
+  while (p && !isa<Block>(p)) p = p->getParent();
+  return cast<Block>(p);
+}
+
 NilaryOperator::~NilaryOperator()
 {
 }

Modified: hlvm/trunk/hlvm/AST/Operator.h
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/AST/Operator.h?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/AST/Operator.h (original)
+++ hlvm/trunk/hlvm/AST/Operator.h Sat Jul  7 19:02:07 2007
@@ -37,6 +37,7 @@
 
 class Type; 
 class Function;
+class Block;
 
 /// This class is the abstract base class in the Abstract Syntax Tree for all
 /// operators. An Operator is an instruction to the virtual machine to take
@@ -70,6 +71,9 @@
     /// Return the function containing this operator
     Function* getContainingFunction();
 
+    /// Return the block containing this operator
+    Block* getContainingBlock();
+
     /// Determine if this is a classof some other type.
     static inline bool classof(const Operator*) { return true; }
     static inline bool classof(const Node* N) { return N->isOperator(); }

Modified: hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp (original)
+++ hlvm/trunk/hlvm/CodeGen/LLVMGenerator.cpp Sat Jul  7 19:02:07 2007
@@ -77,6 +77,7 @@
   typedef std::vector<llvm::Module*> ModuleList;
   typedef std::vector<llvm::Value*> OperandList;
   typedef std::vector<llvm::BasicBlock*> BlockStack;
+  typedef std::vector<llvm::Value*> ResultStack;
   typedef std::map<const hlvm::Variable*,llvm::Value*> VariableDictionary;
   typedef std::map<const hlvm::AutoVarOp*,llvm::Value*> AutoVarDictionary;
   typedef std::map<const hlvm::ConstantValue*,llvm::Constant*> 
@@ -88,12 +89,12 @@
   llvm::BasicBlock* lblk;    ///< The current LLVM block we're generating
   OperandList lops;          ///< The current list of instruction operands
   BlockStack blocks;         ///< The stack of blocks we're constructing
+  ResultStack results;       ///< The stack of block results
   VariableDictionary gvars;  ///< Dictionary of HLVM -> LLVM gvars
   AutoVarDictionary lvars;   ///< Dictionary of HLVM -> LLVM auto vars
   llvm::TypeSymbolTable ltypes; ///< The cached LLVM types we've generated
   ConstantDictionary consts; ///< The cached LLVM constants we've generated
   FunctionDictionary funcs;  ///< The cached LLVM constants we've generated
-    ///< The current LLVM instructions we're generating
   const AST* ast;            ///< The current Tree we're traversing
   const Bundle* bundle;      ///< The current Bundle we're traversing
   const hlvm::Function* function;  ///< The current Function we're traversing
@@ -120,8 +121,8 @@
   public:
     LLVMGeneratorPass(const AST* tree)
       : Pass(0,Pass::PreAndPostOrderTraversal),
-      modules(), lmod(0), lfunc(0), lblk(0), lops(), blocks(),
-      gvars(), lvars(), ltypes(), consts(),
+      modules(), lmod(0), lfunc(0), lblk(0), lops(), blocks(), results(),
+      gvars(), lvars(), ltypes(), consts(), funcs(),
       ast(tree),   bundle(0), function(0), block(0),
       hlvm_text(0), hlvm_text_create(0), hlvm_text_delete(0),
       hlvm_text_to_buffer(0),
@@ -1142,7 +1143,7 @@
 template<> void
 LLVMGeneratorPass::gen(LoopOp* op)
 {
-  hlvmAssert(lops.size() >= 3 && "Too few operands for SelectOp");
+  hlvmAssert(lops.size() >= 3 && "Too few operands for LoopOp");
   llvm::Value* op3 = lops.back(); lops.pop_back();
   llvm::Value* op2 = lops.back(); lops.pop_back();
   llvm::Value* op1 = lops.back(); lops.pop_back();
@@ -1159,18 +1160,32 @@
 }
 
 template<> void
+LLVMGeneratorPass::gen(ResultOp* r)
+{
+  hlvmAssert(lops.size() >= 1 && "Too few operands for ResultOp");
+  llvm::Value* result = lops.back(); lops.pop_back();
+  const llvm::Type* resultTy = result->getType();
+  if (resultTy != lfunc->getReturnType()) {
+    result = new llvm::CastInst(result,lfunc->getReturnType(),"result",lblk);
+  }
+  // Save the result value for use in other blocks or as the result of the
+  // function
+  results.push_back(result);
+}
+
+template<> void
 LLVMGeneratorPass::gen(ReturnOp* r)
 {
-  hlvmAssert(lops.size() >= 1 && "Too few operands for ReturnInst");
-  llvm::Value* retVal = lops.back(); lops.pop_back();
-  const llvm::Type* retTy = retVal->getType();
-  if (retTy != lfunc->getReturnType()) {
-    retVal = new llvm::CastInst(retVal,lfunc->getReturnType(),"",lblk);
+  // If this function returns a result then we need a return value
+  llvm::Value* result = 0;
+  if (lfunc->getReturnType() != llvm::Type::VoidTy) {
+    hlvmAssert(!results.empty() && "No result for function");
+    result = results.back(); results.pop_back();
   }
   // RetInst is never the operand of another instruction because it is
   // a terminator and cannot return a value. Consequently, we don't push it
   // on the lops stack.
-  new llvm::ReturnInst(retVal,lblk);
+  new llvm::ReturnInst(result,lblk);
 }
 
 template<> void
@@ -1439,6 +1454,7 @@
         lvars.clear();
         blocks.clear();
         lops.clear();
+        results.clear();
         break;
       }
       case ProgramID:
@@ -1461,7 +1477,9 @@
       }
       case BlockID:
       {
-        lblk = new llvm::BasicBlock(llvm::cast<Block>(n)->getLabel(),lfunc,0);
+        Block* B = llvm::cast<Block>(n);
+
+        lblk = new llvm::BasicBlock(B->getLabel(),lfunc,0);
         blocks.push_back(lblk);
         break;
       }
@@ -1533,6 +1551,7 @@
       case BreakOpID:               gen(llvm::cast<BreakOp>(n)); break;
       case ContinueOpID:            gen(llvm::cast<ContinueOp>(n)); break;
       case ReturnOpID:              gen(llvm::cast<ReturnOp>(n)); break;
+      case ResultOpID:              gen(llvm::cast<ResultOp>(n)); break;
       case CallOpID:                gen(llvm::cast<CallOp>(n)); break;
       case LoadOpID:                gen(llvm::cast<LoadOp>(n)); break;
       case StoreOpID:               gen(llvm::cast<StoreOp>(n)); break;

Modified: hlvm/trunk/hlvm/Pass/Validate.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Pass/Validate.cpp?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/Pass/Validate.cpp (original)
+++ hlvm/trunk/hlvm/Pass/Validate.cpp Sat Jul  7 19:02:07 2007
@@ -515,17 +515,27 @@
   checkOperator(n,NullOpID,0);
 }
 
+
 template<> inline void
-ValidateImpl::validate(ReturnOp* n)
+ValidateImpl::validate(ResultOp* n)
 {
-  if (checkOperator(n,ReturnOpID,1))
-    if (checkTerminator(n)) {
-      Operator* res = n->getOperand(0);
-      const Function* F = n->getContainingFunction();
+  if (checkOperator(n,ResultOpID,1)) {
+    const Function* F = n->getContainingFunction();
+    const Block* B = n->getContainingBlock();
+    if (F->getBlock() == B) {
       const SignatureType* SigTy = F->getSignature();
+      Operator* res = n->getOperand(0);
       if (res->getType() != SigTy->getResultType())
-        error(n,"ReturnOp operand does not agree in type with Function result");
+        error(n,"ResultOp operand does not agree in type with Function result");
     }
+  }
+}
+
+template<> inline void
+ValidateImpl::validate(ReturnOp* n)
+{
+  if (checkOperator(n,ReturnOpID,0))
+    checkTerminator(n);
 }
 
 template<> inline void
@@ -1264,6 +1274,7 @@
     case ThrowOpID:              /*validate(cast<ThrowOp>(n));*/ break;
     case NullOpID:               validate(cast<NullOp>(n)); break;
     case ReturnOpID:             validate(cast<ReturnOp>(n)); break;
+    case ResultOpID:             validate(cast<ResultOp>(n)); break;
     case ContinueOpID:           validate(cast<ContinueOp>(n)); break;
     case BreakOpID:              validate(cast<BreakOp>(n)); break;
     case SelectOpID:             validate(cast<SelectOp>(n)); break;

Modified: hlvm/trunk/hlvm/Reader/HLVM.rng
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Reader/HLVM.rng?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/Reader/HLVM.rng (original)
+++ hlvm/trunk/hlvm/Reader/HLVM.rng Sat Jul  7 19:02:07 2007
@@ -1053,6 +1053,7 @@
       <ref name="break.elem"/>
       <ref name="continue.elem"/>
       <ref name="ret.elem"/>
+      <ref name="result.elem"/>
       <ref name="call.elem"/>
     </choice>
   </define>
@@ -1102,6 +1103,12 @@
   <define name="ret.elem">
     <element name="ret">
       <ref name="Documentation.pat"/>
+    </element>
+  </define>
+
+  <define name="result.elem">
+    <element name="result">
+      <ref name="Documentation.pat"/>
       <ref name="Operators.pat"/>
     </element>
   </define>

Modified: hlvm/trunk/hlvm/Reader/XMLReader.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Reader/XMLReader.cpp?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/Reader/XMLReader.cpp (original)
+++ hlvm/trunk/hlvm/Reader/XMLReader.cpp Sat Jul  7 19:02:07 2007
@@ -1102,7 +1102,8 @@
       case TKN_loop:         op = parseTernaryOp<LoopOp>(cur); break;
       case TKN_break:        op = parseNilaryOp<BreakOp>(cur); break;
       case TKN_continue:     op = parseNilaryOp<ContinueOp>(cur); break;
-      case TKN_ret:          op = parseUnaryOp<ReturnOp>(cur); break;
+      case TKN_ret:          op = parseNilaryOp<ReturnOp>(cur); break;
+      case TKN_result:       op = parseUnaryOp<ResultOp>(cur); break;
       case TKN_call:         op = parseMultiOp<CallOp>(cur); break;
       case TKN_store:        op = parseBinaryOp<StoreOp>(cur); break;
       case TKN_load:         op = parseUnaryOp<LoadOp>(cur); break;

Modified: hlvm/trunk/hlvm/Writer/XMLWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/hlvm/Writer/XMLWriter.cpp?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/hlvm/Writer/XMLWriter.cpp (original)
+++ hlvm/trunk/hlvm/Writer/XMLWriter.cpp Sat Jul  7 19:02:07 2007
@@ -721,6 +721,13 @@
 }
 
 template<> void 
+XMLWriterImpl::WriterPass::put(ResultOp* r)
+{
+  startElement("result");
+  putDoc(r);
+}
+
+template<> void 
 XMLWriterImpl::WriterPass::put(CallOp* r)
 {
   startElement("call");
@@ -852,6 +859,7 @@
       case BreakOpID:            put(cast<BreakOp>(n)); break;
       case ContinueOpID:         put(cast<ContinueOp>(n)); break;
       case ReturnOpID:           put(cast<ReturnOp>(n)); break;
+      case ResultOpID:           put(cast<ResultOp>(n)); break;
       case CallOpID:             put(cast<CallOp>(n)); break;
       case StoreOpID:            put(cast<StoreOp>(n)); break;
       case LoadOpID:             put(cast<LoadOp>(n)); break;

Modified: hlvm/trunk/test/return0/arithmetic.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/arithmetic.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/arithmetic.hlx (original)
+++ hlvm/trunk/test/return0/arithmetic.hlx Sat Jul  7 19:02:07 2007
@@ -8,7 +8,7 @@
     <constant id="8" type="s32"><dec>8</dec></constant>
     <program id="arithmetic">
       <block>
-        <ret>
+        <result>
           <sub>
             <add>
               <mul>
@@ -22,7 +22,8 @@
             </add>
             <ref id="8"/>
           </sub>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/return0/bitwise.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/bitwise.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/bitwise.hlx (original)
+++ hlvm/trunk/test/return0/bitwise.hlx Sat Jul  7 19:02:07 2007
@@ -7,7 +7,7 @@
     <constant id="00000000" type="s32"><hex>00000000</hex></constant>
     <program id="bitwise">
       <block>
-        <ret>
+        <result>
           <band>
             <bnor>
               <bor>
@@ -21,7 +21,8 @@
             </bnor>
             <ref id="00000000"/>
           </band>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/return0/boolean.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/boolean.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/boolean.hlx (original)
+++ hlvm/trunk/test/return0/boolean.hlx Sat Jul  7 19:02:07 2007
@@ -7,7 +7,7 @@
     <constant id="zero" type="s32"><dec>0</dec></constant>
     <program id="boolean">
       <block>
-        <ret>
+        <result>
           <select>
             <and>
               <nor>
@@ -25,7 +25,8 @@
             <ref id="one"/>
             <ref id="zero"/>
           </select>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/return0/call.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/call.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/call.hlx (original)
+++ hlvm/trunk/test/return0/call.hlx Sat Jul  7 19:02:07 2007
@@ -5,19 +5,21 @@
     <signature id="zero_func" result="s32"/>
     <function id="getResult" type="zero_func">
       <block>
-        <ret>
+        <result>
           <ref id="zero"/>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </function>
 
     <program id="call">
       <block>
-        <ret>
+        <result>
           <call>
             <ref id="getResult"/>
           </call>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/return0/complement.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/complement.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/complement.hlx (original)
+++ hlvm/trunk/test/return0/complement.hlx Sat Jul  7 19:02:07 2007
@@ -4,7 +4,7 @@
     <program id="complement">
       <block>
         <autovar id="v" type="s32"/>
-        <ret>
+        <result>
           <cmpl>
             <cmpl>
               <load>
@@ -12,7 +12,8 @@
               </load>
             </cmpl>
           </cmpl>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/return0/helloworld.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/helloworld.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/helloworld.hlx (original)
+++ hlvm/trunk/test/return0/helloworld.hlx Sat Jul  7 19:02:07 2007
@@ -25,9 +25,10 @@
         <close>
           <load><ref id="out"/></load>
         </close>
-        <ret>
+        <result>
           <ref id="zero"/>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/return0/return0.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/return0.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/return0.hlx (original)
+++ hlvm/trunk/test/return0/return0.hlx Sat Jul  7 19:02:07 2007
@@ -4,9 +4,10 @@
     <constant id="zero" type="s32"><dec>0</dec></constant>
     <program id="return0">
       <block>
-        <ret>
+        <result>
           <ref id="zero"/>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/return0/select.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/return0/select.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/return0/select.hlx (original)
+++ hlvm/trunk/test/return0/select.hlx Sat Jul  7 19:02:07 2007
@@ -12,7 +12,7 @@
     </constant>
     <program id="select">
       <block>
-        <ret>
+        <result>
           <select>
             <block>
               <ne><ref id="42"/><ref id="21"/></ne>
@@ -24,7 +24,8 @@
               <ref id="42"/>
             </block>
           </select>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/xml2xml/block.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/xml2xml/block.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/xml2xml/block.hlx (original)
+++ hlvm/trunk/test/xml2xml/block.hlx Sat Jul  7 19:02:07 2007
@@ -12,7 +12,7 @@
     </constant>
     <program id="block">
       <block>
-        <ret>
+        <result>
           <select>
             <block>
               <ne>
@@ -27,7 +27,8 @@
               <ref id="21"/>
             </block>
           </select>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/xml2xml/helloworld.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/xml2xml/helloworld.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/xml2xml/helloworld.hlx (original)
+++ hlvm/trunk/test/xml2xml/helloworld.hlx Sat Jul  7 19:02:07 2007
@@ -30,9 +30,10 @@
             <ref id="out"/>
           </load>
         </close>
-        <ret>
+        <result>
           <ref id="0"/>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/xml2xml/loop.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/xml2xml/loop.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/xml2xml/loop.hlx (original)
+++ hlvm/trunk/test/xml2xml/loop.hlx Sat Jul  7 19:02:07 2007
@@ -9,7 +9,7 @@
     </constant>
     <program id="return">
       <block>
-        <ret>
+        <result>
           <loop>
             <ne>
               <ref id="1"/>
@@ -18,7 +18,8 @@
             <ref id="0"/>
             <noop/>
           </loop>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/xml2xml/return.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/xml2xml/return.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/xml2xml/return.hlx (original)
+++ hlvm/trunk/test/xml2xml/return.hlx Sat Jul  7 19:02:07 2007
@@ -6,9 +6,10 @@
     </constant>
     <program id="return">
       <block>
-        <ret>
+        <result>
           <ref id="42"/>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/xml2xml/select.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/xml2xml/select.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/xml2xml/select.hlx (original)
+++ hlvm/trunk/test/xml2xml/select.hlx Sat Jul  7 19:02:07 2007
@@ -12,7 +12,7 @@
     </constant>
     <program id="select">
       <block>
-        <ret>
+        <result>
           <select>
             <ne>
               <ref id="0"/>
@@ -21,7 +21,8 @@
             <ref id="42"/>
             <ref id="21"/>
           </select>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>

Modified: hlvm/trunk/test/xml2xml/switch.hlx
URL: http://llvm.org/viewvc/llvm-project/hlvm/trunk/test/xml2xml/switch.hlx?rev=38302&r1=38301&r2=38302&view=diff

==============================================================================
--- hlvm/trunk/test/xml2xml/switch.hlx (original)
+++ hlvm/trunk/test/xml2xml/switch.hlx Sat Jul  7 19:02:07 2007
@@ -27,7 +27,7 @@
     </constant>
     <program id="return">
       <block>
-        <ret>
+        <result>
           <switch>
             <ref id="42"/>
             <ref id="42"/>
@@ -44,7 +44,8 @@
             <ref id="42"/>
             <ref id="21"/>
           </switch>
-        </ret>
+        </result>
+        <ret/>
       </block>
     </program>
   </bundle>





More information about the llvm-commits mailing list