Fix patchpoint comments.
authorAndrew Trick <atrick@apple.com>
Tue, 19 Nov 2013 05:05:43 +0000 (05:05 +0000)
committerAndrew Trick <atrick@apple.com>
Tue, 19 Nov 2013 05:05:43 +0000 (05:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195103 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/StackMaps.h
lib/CodeGen/SelectionDAG/InstrEmitter.cpp

index 86d55cf27fa8259b6163b427d9448d04c37591e9..e90f22e5b69a6ce8b6c7c59a0ba5d308d4f87605 100644 (file)
@@ -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
index 253aad59f1505ac5b3179ee19fff8625925e9c0b..3a8fb85911080723c996ef59a644d3129a2b7eb5 100644 (file)
@@ -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);
   }