From d20089374179a4a64269a4cfcad4d950ba42f4f8 Mon Sep 17 00:00:00 2001 From: Sanjoy Das Date: Sat, 20 Jun 2015 00:01:03 +0000 Subject: [PATCH] [Statepoint] Remove unnecessary argument from Statepoint::getRelocates NFC. llvm-svn: 240198 --- llvm/include/llvm/IR/Statepoint.h | 7 +++---- llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp | 6 ++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/llvm/include/llvm/IR/Statepoint.h b/llvm/include/llvm/IR/Statepoint.h index 623a5a6..8159cde 100644 --- a/llvm/include/llvm/IR/Statepoint.h +++ b/llvm/include/llvm/IR/Statepoint.h @@ -198,7 +198,7 @@ public: /// May contain several relocations for the same base/derived pair. /// For example this could happen due to relocations on unwinding /// path of invoke. - std::vector getRelocates(ImmutableStatepoint &IS); + std::vector getRelocates(); #ifndef NDEBUG /// Asserts if this statepoint is malformed. Common cases for failure @@ -315,12 +315,11 @@ public: template std::vector -StatepointBase::getRelocates( - ImmutableStatepoint &IS) { +StatepointBase::getRelocates() { std::vector Result; - ImmutableCallSite StatepointCS = IS.getCallSite(); + CallSiteTy StatepointCS = getCallSite(); // Search for relocated pointers. Note that working backwards from the // gc_relocates ensures that we only get pairs which are actually relocated diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp index 914ff40..a6b3fc6 100644 --- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp @@ -372,8 +372,7 @@ static void getIncomingStatepointGCValues( SmallVectorImpl &Bases, SmallVectorImpl &Ptrs, SmallVectorImpl &Relocs, ImmutableStatepoint StatepointSite, SelectionDAGBuilder &Builder) { - for (GCRelocateOperands relocateOpers : - StatepointSite.getRelocates(StatepointSite)) { + for (GCRelocateOperands relocateOpers : StatepointSite.getRelocates()) { Relocs.push_back(relocateOpers.getUnderlyingCallSite().getInstruction()); Bases.push_back(relocateOpers.getBasePtr()); Ptrs.push_back(relocateOpers.getDerivedPtr()); @@ -573,8 +572,7 @@ static void lowerStatepointMetaArgs(SmallVectorImpl &Ops, FunctionLoweringInfo::StatepointSpilledValueMapTy &SpillMap = Builder.FuncInfo.StatepointRelocatedValues[StatepointInstr]; - for (GCRelocateOperands RelocateOpers : - StatepointSite.getRelocates(StatepointSite)) { + for (GCRelocateOperands RelocateOpers : StatepointSite.getRelocates()) { const Value *V = RelocateOpers.getDerivedPtr(); SDValue SDV = Builder.getValue(V); SDValue Loc = Builder.StatepointLowering.getLocation(SDV); -- 2.7.4