From: Matt Arsenault Date: Thu, 15 Jul 2021 18:44:03 +0000 (-0400) Subject: GlobalISel: Remove dead function X-Git-Tag: llvmorg-14-init~1255 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f57f8f7ccc804d0ae24541442abdd8bbc4c129cb;p=platform%2Fupstream%2Fllvm.git GlobalISel: Remove dead function --- diff --git a/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h b/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h index 0e63920..6bdaddd 100644 --- a/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/CallLowering.h @@ -363,14 +363,6 @@ protected: const DataLayout &DL, CallingConv::ID CallConv, SmallVectorImpl *Offsets = nullptr) const; - /// Generate instructions for unpacking \p SrcReg into the \p DstRegs - /// corresponding to the aggregate type \p PackedTy. - /// - /// \param DstRegs should contain one virtual register for each base type in - /// \p PackedTy, as returned by computeValueLLTs. - void unpackRegs(ArrayRef DstRegs, Register SrcReg, Type *PackedTy, - MachineIRBuilder &MIRBuilder) const; - /// Analyze the argument list in \p Args, using \p Assigner to populate \p /// CCInfo. This will determine the types and locations to use for passed or /// returned values. This may resize fields in \p Args if the value is split diff --git a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp index a165896..83dc9bf 100644 --- a/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp +++ b/llvm/lib/CodeGen/GlobalISel/CallLowering.cpp @@ -242,22 +242,6 @@ void CallLowering::splitToValueTypes(const ArgInfo &OrigArg, SplitArgs.back().Flags[0].setInConsecutiveRegsLast(); } -void CallLowering::unpackRegs(ArrayRef DstRegs, Register SrcReg, - Type *PackedTy, - MachineIRBuilder &MIRBuilder) const { - assert(DstRegs.size() > 1 && "Nothing to unpack"); - - const DataLayout &DL = MIRBuilder.getDataLayout(); - - SmallVector LLTs; - SmallVector Offsets; - computeValueLLTs(DL, *PackedTy, LLTs, &Offsets); - assert(LLTs.size() == DstRegs.size() && "Regs / types mismatch"); - - for (unsigned i = 0; i < DstRegs.size(); ++i) - MIRBuilder.buildExtract(DstRegs[i], SrcReg, Offsets[i]); -} - /// Pack values \p SrcRegs to cover the vector type result \p DstRegs. static MachineInstrBuilder mergeVectorRegsToResultRegs(MachineIRBuilder &B, ArrayRef DstRegs,