[llvm] r279590 - [stackmaps] Remove an unneeded member variable [NFC]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 16:58:08 PDT 2016


Author: reames
Date: Tue Aug 23 18:58:08 2016
New Revision: 279590

URL: http://llvm.org/viewvc/llvm-project?rev=279590&view=rev
Log:
[stackmaps] Remove an unneeded member variable [NFC]


Modified:
    llvm/trunk/include/llvm/CodeGen/StackMaps.h
    llvm/trunk/lib/CodeGen/StackMaps.cpp

Modified: llvm/trunk/include/llvm/CodeGen/StackMaps.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/StackMaps.h?rev=279590&r1=279589&r2=279590&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/StackMaps.h (original)
+++ llvm/trunk/include/llvm/CodeGen/StackMaps.h Tue Aug 23 18:58:08 2016
@@ -75,7 +75,6 @@ public:
 private:
   const MachineInstr *MI;
   bool HasDef;
-  bool IsAnyReg;
 
   unsigned getMetaIdx(unsigned Pos = 0) const {
     assert(Pos < MetaEnd && "Meta operand index out of range.");
@@ -89,7 +88,7 @@ private:
 public:
   explicit PatchPointOpers(const MachineInstr *MI);
 
-  bool isAnyReg() const { return IsAnyReg; }
+  bool isAnyReg() const { return (getCallingConv() == CallingConv::AnyReg); }
   bool hasDef() const { return HasDef; }
 
   /// Return the ID for the given patchpoint.
@@ -126,7 +125,7 @@ public:
   /// Get the index at which stack map locations will be recorded.
   /// Arguments are not recorded unless the anyregcc convention is used.
   unsigned getStackMapStartIdx() const {
-    if (IsAnyReg)
+    if (isAnyReg())
       return getArgIdx();
     return getVarIdx();
   }

Modified: llvm/trunk/lib/CodeGen/StackMaps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackMaps.cpp?rev=279590&r1=279589&r2=279590&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/StackMaps.cpp (original)
+++ llvm/trunk/lib/CodeGen/StackMaps.cpp Tue Aug 23 18:58:08 2016
@@ -43,8 +43,7 @@ StackMapOpers::StackMapOpers(const Machi
 
 PatchPointOpers::PatchPointOpers(const MachineInstr *MI)
     : MI(MI), HasDef(MI->getOperand(0).isReg() && MI->getOperand(0).isDef() &&
-                     !MI->getOperand(0).isImplicit()),
-      IsAnyReg(getCallingConv() == CallingConv::AnyReg) {
+                     !MI->getOperand(0).isImplicit()) {
 #ifndef NDEBUG
   unsigned CheckStartIdx = 0, e = MI->getNumOperands();
   while (CheckStartIdx < e && MI->getOperand(CheckStartIdx).isReg() &&




More information about the llvm-commits mailing list