diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-11-13 00:44:25 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-11-13 00:44:25 +0000 |
commit | 22f8debd4e886118daaa419ba6bfa0c1ef279beb (patch) | |
tree | ff1ec5ac7bcbe29e732b1a10fe515e14cfc39d44 /include | |
parent | 8bee354bf1c98e3b781294a082ab63bdc23e68cb (diff) | |
download | external_llvm-22f8debd4e886118daaa419ba6bfa0c1ef279beb.zip external_llvm-22f8debd4e886118daaa419ba6bfa0c1ef279beb.tar.gz external_llvm-22f8debd4e886118daaa419ba6bfa0c1ef279beb.tar.bz2 |
Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in
the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If
not, then there is the potential for the stack to be changed while the stack's
being used by another instruction (like a call).
This can only result in tears...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 6a66d03..b802deb 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -275,6 +275,20 @@ public: return getNode(ISD::CALLSEQ_START, VTs, 2, Ops, 2); } + /// getCALLSEQ_END - Return a new CALLSEQ_END node, which always must have a + /// flag result (to ensure it's not CSE'd). + SDOperand getCALLSEQ_END(SDOperand Chain, SDOperand Op1, SDOperand Op2, + SDOperand InFlag) { + SDVTList NodeTys = getVTList(MVT::Other, MVT::Flag); + SmallVector<SDOperand, 4> Ops; + Ops.push_back(Chain); + Ops.push_back(Op1); + Ops.push_back(Op2); + Ops.push_back(InFlag); + return getNode(ISD::CALLSEQ_END, NodeTys, &Ops[0], + Ops.size() - (InFlag.Val == 0 ? 1 : 0)); + } + /// getNode - Gets or creates the specified node. /// SDOperand getNode(unsigned Opcode, MVT::ValueType VT); |