[llvm-commits] [llvm] r122342 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Chris Lattner clattner at apple.com
Tue Dec 21 09:14:20 PST 2010


On Dec 21, 2010, at 9:07 AM, Stuart Hastings wrote:

> Author: stuart
> Date: Tue Dec 21 11:07:24 2010
> New Revision: 122342
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=122342&view=rev
> Log:
> Missing logic for nested CALLSEQ_START/END.

Ok, but please indent the code properly and add some comments explaining what this is doing.

-Chris

> 
> Modified:
>    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=122342&r1=122341&r2=122342&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Dec 21 11:07:24 2010
> @@ -255,8 +255,11 @@
> static SDNode *FindCallEndFromCallStart(SDNode *Node, int depth = 0) {
>   if (Node->getOpcode() == ISD::CALLSEQ_START)
>     depth++;
> -  if ((Node->getOpcode() == ISD::CALLSEQ_END) && (depth == 1))
> -    return Node;
> +  else if (Node->getOpcode() == ISD::CALLSEQ_END) {
> +      depth--;
> +      if (depth == 0)
> +        return Node;
> +    }
>   if (Node->use_empty())
>     return 0;   // No CallSeqEnd
> 
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list