From 4ecbb916b7598e0680d0ec5db1659e8339bc7e16 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Tue, 23 Aug 2016 23:58:08 +0000 Subject: [PATCH] [stackmaps] Remove an unneeded member variable [NFC] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279590 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/StackMaps.h | 5 ++--- lib/CodeGen/StackMaps.cpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/llvm/CodeGen/StackMaps.h b/include/llvm/CodeGen/StackMaps.h index 7cd334091e8..2b5a4327908 100644 --- a/include/llvm/CodeGen/StackMaps.h +++ b/include/llvm/CodeGen/StackMaps.h @@ -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(); } diff --git a/lib/CodeGen/StackMaps.cpp b/lib/CodeGen/StackMaps.cpp index c7f45fff29e..9e6fc3e094b 100644 --- a/lib/CodeGen/StackMaps.cpp +++ b/lib/CodeGen/StackMaps.cpp @@ -43,8 +43,7 @@ StackMapOpers::StackMapOpers(const MachineInstr *MI) 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() && -- 2.11.0