summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-11-19 06:43:35 +0000
committerBill Wendling <isanbard@gmail.com>2013-11-19 06:43:35 +0000
commit9afea5975ad7dce588517a5249b6f8e7081ad537 (patch)
tree963574d820c891aabbd8d6c909777fd6c642008b
parent23a96ccc5dd6696a332692ff880c92b3f2933bd3 (diff)
downloadllvm-9afea5975ad7dce588517a5249b6f8e7081ad537.tar.gz
Merging r195103:
------------------------------------------------------------------------ r195103 | atrick | 2013-11-18 21:05:43 -0800 (Mon, 18 Nov 2013) | 1 line Fix patchpoint comments. ------------------------------------------------------------------------ llvm-svn: 195115
-rw-r--r--llvm/include/llvm/CodeGen/StackMaps.h6
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp3
2 files changed, 7 insertions, 2 deletions
diff --git a/llvm/include/llvm/CodeGen/StackMaps.h b/llvm/include/llvm/CodeGen/StackMaps.h
index 86d55cf27fa8..e90f22e5b69a 100644
--- a/llvm/include/llvm/CodeGen/StackMaps.h
+++ b/llvm/include/llvm/CodeGen/StackMaps.h
@@ -25,7 +25,11 @@ class MCExpr;
/// MI patchpoint operations take the form:
/// [<def>], <id>, <numBytes>, <target>, <numArgs>, <cc>, ...
///
-/// Note that IR/SD patchpoints do not have the <def> or <cc> operands.
+/// IR patchpoint intrinsics do not have the <cc> operand because calling
+/// convention is part of the subclass data.
+///
+/// SD patchpoint nodes do not have a def operand because it is part of the
+/// SDValue.
///
/// Patchpoints following the anyregcc convention are handled specially. For
/// these, the stack map also records the location of the return value and
diff --git a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
index 253aad59f150..3a8fb8591108 100644
--- a/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
@@ -21,6 +21,7 @@
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/CodeGen/StackMaps.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
@@ -732,7 +733,7 @@ EmitMachineNode(SDNode *Node, bool IsClone, bool IsCloned,
// Handle PATCHPOINT specially and then use the generic code.
if (Opc == TargetOpcode::PATCHPOINT) {
- unsigned CC = Node->getConstantOperandVal(4);
+ unsigned CC = Node->getConstantOperandVal(PatchPointOpers::CCPos);
NumDefs = NumResults;
ScratchRegs = TLI->getScratchRegisters((CallingConv::ID) CC);
}