LegalizerHelper.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //== llvm/CodeGen/GlobalISel/LegalizerHelper.h ---------------- -*- C++ -*-==//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. /// \file A pass to convert the target-illegal operations created by IR -> MIR
  15. /// translation into ones the target expects to be able to select. This may
  16. /// occur in multiple phases, for example G_ADD <2 x i8> -> G_ADD <2 x i16> ->
  17. /// G_ADD <4 x i16>.
  18. ///
  19. /// The LegalizerHelper class is where most of the work happens, and is
  20. /// designed to be callable from other passes that find themselves with an
  21. /// illegal instruction.
  22. //
  23. //===----------------------------------------------------------------------===//
  24. #ifndef LLVM_CODEGEN_GLOBALISEL_LEGALIZERHELPER_H
  25. #define LLVM_CODEGEN_GLOBALISEL_LEGALIZERHELPER_H
  26. #include "llvm/CodeGen/GlobalISel/CallLowering.h"
  27. #include "llvm/CodeGen/RuntimeLibcalls.h"
  28. #include "llvm/CodeGen/TargetOpcodes.h"
  29. namespace llvm {
  30. // Forward declarations.
  31. class APInt;
  32. class GAnyLoad;
  33. class GLoadStore;
  34. class GStore;
  35. class GenericMachineInstr;
  36. class MachineFunction;
  37. class MachineIRBuilder;
  38. class MachineInstr;
  39. class MachineInstrBuilder;
  40. struct MachinePointerInfo;
  41. template <typename T> class SmallVectorImpl;
  42. class LegalizerInfo;
  43. class MachineRegisterInfo;
  44. class GISelChangeObserver;
  45. class LostDebugLocObserver;
  46. class TargetLowering;
  47. class LegalizerHelper {
  48. public:
  49. /// Expose MIRBuilder so clients can set their own RecordInsertInstruction
  50. /// functions
  51. MachineIRBuilder &MIRBuilder;
  52. /// To keep track of changes made by the LegalizerHelper.
  53. GISelChangeObserver &Observer;
  54. private:
  55. MachineRegisterInfo &MRI;
  56. const LegalizerInfo &LI;
  57. const TargetLowering &TLI;
  58. public:
  59. enum LegalizeResult {
  60. /// Instruction was already legal and no change was made to the
  61. /// MachineFunction.
  62. AlreadyLegal,
  63. /// Instruction has been legalized and the MachineFunction changed.
  64. Legalized,
  65. /// Some kind of error has occurred and we could not legalize this
  66. /// instruction.
  67. UnableToLegalize,
  68. };
  69. /// Expose LegalizerInfo so the clients can re-use.
  70. const LegalizerInfo &getLegalizerInfo() const { return LI; }
  71. const TargetLowering &getTargetLowering() const { return TLI; }
  72. LegalizerHelper(MachineFunction &MF, GISelChangeObserver &Observer,
  73. MachineIRBuilder &B);
  74. LegalizerHelper(MachineFunction &MF, const LegalizerInfo &LI,
  75. GISelChangeObserver &Observer, MachineIRBuilder &B);
  76. /// Replace \p MI by a sequence of legal instructions that can implement the
  77. /// same operation. Note that this means \p MI may be deleted, so any iterator
  78. /// steps should be performed before calling this function. \p Helper should
  79. /// be initialized to the MachineFunction containing \p MI.
  80. ///
  81. /// Considered as an opaque blob, the legal code will use and define the same
  82. /// registers as \p MI.
  83. LegalizeResult legalizeInstrStep(MachineInstr &MI,
  84. LostDebugLocObserver &LocObserver);
  85. /// Legalize an instruction by emiting a runtime library call instead.
  86. LegalizeResult libcall(MachineInstr &MI, LostDebugLocObserver &LocObserver);
  87. /// Legalize an instruction by reducing the width of the underlying scalar
  88. /// type.
  89. LegalizeResult narrowScalar(MachineInstr &MI, unsigned TypeIdx, LLT NarrowTy);
  90. /// Legalize an instruction by performing the operation on a wider scalar type
  91. /// (for example a 16-bit addition can be safely performed at 32-bits
  92. /// precision, ignoring the unused bits).
  93. LegalizeResult widenScalar(MachineInstr &MI, unsigned TypeIdx, LLT WideTy);
  94. /// Legalize an instruction by replacing the value type
  95. LegalizeResult bitcast(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  96. /// Legalize an instruction by splitting it into simpler parts, hopefully
  97. /// understood by the target.
  98. LegalizeResult lower(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  99. /// Legalize a vector instruction by splitting into multiple components, each
  100. /// acting on the same scalar type as the original but with fewer elements.
  101. LegalizeResult fewerElementsVector(MachineInstr &MI, unsigned TypeIdx,
  102. LLT NarrowTy);
  103. /// Legalize a vector instruction by increasing the number of vector elements
  104. /// involved and ignoring the added elements later.
  105. LegalizeResult moreElementsVector(MachineInstr &MI, unsigned TypeIdx,
  106. LLT MoreTy);
  107. /// Cast the given value to an LLT::scalar with an equivalent size. Returns
  108. /// the register to use if an instruction was inserted. Returns the original
  109. /// register if no coercion was necessary.
  110. //
  111. // This may also fail and return Register() if there is no legal way to cast.
  112. Register coerceToScalar(Register Val);
  113. /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  114. /// Use by extending the operand's type to \p WideTy using the specified \p
  115. /// ExtOpcode for the extension instruction, and replacing the vreg of the
  116. /// operand in place.
  117. void widenScalarSrc(MachineInstr &MI, LLT WideTy, unsigned OpIdx,
  118. unsigned ExtOpcode);
  119. /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  120. /// Use by truncating the operand's type to \p NarrowTy using G_TRUNC, and
  121. /// replacing the vreg of the operand in place.
  122. void narrowScalarSrc(MachineInstr &MI, LLT NarrowTy, unsigned OpIdx);
  123. /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  124. /// Def by extending the operand's type to \p WideTy and truncating it back
  125. /// with the \p TruncOpcode, and replacing the vreg of the operand in place.
  126. void widenScalarDst(MachineInstr &MI, LLT WideTy, unsigned OpIdx = 0,
  127. unsigned TruncOpcode = TargetOpcode::G_TRUNC);
  128. // Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  129. // Def by truncating the operand's type to \p NarrowTy, replacing in place and
  130. // extending back with \p ExtOpcode.
  131. void narrowScalarDst(MachineInstr &MI, LLT NarrowTy, unsigned OpIdx,
  132. unsigned ExtOpcode);
  133. /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  134. /// Def by performing it with additional vector elements and extracting the
  135. /// result elements, and replacing the vreg of the operand in place.
  136. void moreElementsVectorDst(MachineInstr &MI, LLT MoreTy, unsigned OpIdx);
  137. /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  138. /// Use by producing a vector with undefined high elements, extracting the
  139. /// original vector type, and replacing the vreg of the operand in place.
  140. void moreElementsVectorSrc(MachineInstr &MI, LLT MoreTy, unsigned OpIdx);
  141. /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  142. /// use by inserting a G_BITCAST to \p CastTy
  143. void bitcastSrc(MachineInstr &MI, LLT CastTy, unsigned OpIdx);
  144. /// Legalize a single operand \p OpIdx of the machine instruction \p MI as a
  145. /// def by inserting a G_BITCAST from \p CastTy
  146. void bitcastDst(MachineInstr &MI, LLT CastTy, unsigned OpIdx);
  147. private:
  148. LegalizeResult
  149. widenScalarMergeValues(MachineInstr &MI, unsigned TypeIdx, LLT WideTy);
  150. LegalizeResult
  151. widenScalarUnmergeValues(MachineInstr &MI, unsigned TypeIdx, LLT WideTy);
  152. LegalizeResult
  153. widenScalarExtract(MachineInstr &MI, unsigned TypeIdx, LLT WideTy);
  154. LegalizeResult
  155. widenScalarInsert(MachineInstr &MI, unsigned TypeIdx, LLT WideTy);
  156. LegalizeResult widenScalarAddSubOverflow(MachineInstr &MI, unsigned TypeIdx,
  157. LLT WideTy);
  158. LegalizeResult widenScalarAddSubShlSat(MachineInstr &MI, unsigned TypeIdx,
  159. LLT WideTy);
  160. LegalizeResult widenScalarMulo(MachineInstr &MI, unsigned TypeIdx,
  161. LLT WideTy);
  162. /// Helper function to split a wide generic register into bitwise blocks with
  163. /// the given Type (which implies the number of blocks needed). The generic
  164. /// registers created are appended to Ops, starting at bit 0 of Reg.
  165. void extractParts(Register Reg, LLT Ty, int NumParts,
  166. SmallVectorImpl<Register> &VRegs);
  167. /// Version which handles irregular splits.
  168. bool extractParts(Register Reg, LLT RegTy, LLT MainTy,
  169. LLT &LeftoverTy,
  170. SmallVectorImpl<Register> &VRegs,
  171. SmallVectorImpl<Register> &LeftoverVRegs);
  172. /// Version which handles irregular sub-vector splits.
  173. void extractVectorParts(Register Reg, unsigned NumElst,
  174. SmallVectorImpl<Register> &VRegs);
  175. /// Helper function to build a wide generic register \p DstReg of type \p
  176. /// RegTy from smaller parts. This will produce a G_MERGE_VALUES,
  177. /// G_BUILD_VECTOR, G_CONCAT_VECTORS, or sequence of G_INSERT as appropriate
  178. /// for the types.
  179. ///
  180. /// \p PartRegs must be registers of type \p PartTy.
  181. ///
  182. /// If \p ResultTy does not evenly break into \p PartTy sized pieces, the
  183. /// remainder must be specified with \p LeftoverRegs of type \p LeftoverTy.
  184. void insertParts(Register DstReg, LLT ResultTy,
  185. LLT PartTy, ArrayRef<Register> PartRegs,
  186. LLT LeftoverTy = LLT(), ArrayRef<Register> LeftoverRegs = {});
  187. /// Merge \p PartRegs with different types into \p DstReg.
  188. void mergeMixedSubvectors(Register DstReg, ArrayRef<Register> PartRegs);
  189. void appendVectorElts(SmallVectorImpl<Register> &Elts, Register Reg);
  190. /// Unmerge \p SrcReg into smaller sized values, and append them to \p
  191. /// Parts. The elements of \p Parts will be the greatest common divisor type
  192. /// of \p DstTy, \p NarrowTy and the type of \p SrcReg. This will compute and
  193. /// return the GCD type.
  194. LLT extractGCDType(SmallVectorImpl<Register> &Parts, LLT DstTy,
  195. LLT NarrowTy, Register SrcReg);
  196. /// Unmerge \p SrcReg into \p GCDTy typed registers. This will append all of
  197. /// the unpacked registers to \p Parts. This version is if the common unmerge
  198. /// type is already known.
  199. void extractGCDType(SmallVectorImpl<Register> &Parts, LLT GCDTy,
  200. Register SrcReg);
  201. /// Produce a merge of values in \p VRegs to define \p DstReg. Perform a merge
  202. /// from the least common multiple type, and convert as appropriate to \p
  203. /// DstReg.
  204. ///
  205. /// \p VRegs should each have type \p GCDTy. This type should be greatest
  206. /// common divisor type of \p DstReg, \p NarrowTy, and an undetermined source
  207. /// type.
  208. ///
  209. /// \p NarrowTy is the desired result merge source type. If the source value
  210. /// needs to be widened to evenly cover \p DstReg, inserts high bits
  211. /// corresponding to the extension opcode \p PadStrategy.
  212. ///
  213. /// \p VRegs will be cleared, and the the result \p NarrowTy register pieces
  214. /// will replace it. Returns The complete LCMTy that \p VRegs will cover when
  215. /// merged.
  216. LLT buildLCMMergePieces(LLT DstTy, LLT NarrowTy, LLT GCDTy,
  217. SmallVectorImpl<Register> &VRegs,
  218. unsigned PadStrategy = TargetOpcode::G_ANYEXT);
  219. /// Merge the values in \p RemergeRegs to an \p LCMTy typed value. Extract the
  220. /// low bits into \p DstReg. This is intended to use the outputs from
  221. /// buildLCMMergePieces after processing.
  222. void buildWidenedRemergeToDst(Register DstReg, LLT LCMTy,
  223. ArrayRef<Register> RemergeRegs);
  224. /// Perform generic multiplication of values held in multiple registers.
  225. /// Generated instructions use only types NarrowTy and i1.
  226. /// Destination can be same or two times size of the source.
  227. void multiplyRegisters(SmallVectorImpl<Register> &DstRegs,
  228. ArrayRef<Register> Src1Regs,
  229. ArrayRef<Register> Src2Regs, LLT NarrowTy);
  230. void changeOpcode(MachineInstr &MI, unsigned NewOpcode);
  231. LegalizeResult tryNarrowPow2Reduction(MachineInstr &MI, Register SrcReg,
  232. LLT SrcTy, LLT NarrowTy,
  233. unsigned ScalarOpc);
  234. // Memcpy family legalization helpers.
  235. LegalizeResult lowerMemset(MachineInstr &MI, Register Dst, Register Val,
  236. uint64_t KnownLen, Align Alignment,
  237. bool IsVolatile);
  238. LegalizeResult lowerMemcpyInline(MachineInstr &MI, Register Dst, Register Src,
  239. uint64_t KnownLen, Align DstAlign,
  240. Align SrcAlign, bool IsVolatile);
  241. LegalizeResult lowerMemcpy(MachineInstr &MI, Register Dst, Register Src,
  242. uint64_t KnownLen, uint64_t Limit, Align DstAlign,
  243. Align SrcAlign, bool IsVolatile);
  244. LegalizeResult lowerMemmove(MachineInstr &MI, Register Dst, Register Src,
  245. uint64_t KnownLen, Align DstAlign, Align SrcAlign,
  246. bool IsVolatile);
  247. public:
  248. /// Return the alignment to use for a stack temporary object with the given
  249. /// type.
  250. Align getStackTemporaryAlignment(LLT Type, Align MinAlign = Align()) const;
  251. /// Create a stack temporary based on the size in bytes and the alignment
  252. MachineInstrBuilder createStackTemporary(TypeSize Bytes, Align Alignment,
  253. MachinePointerInfo &PtrInfo);
  254. /// Get a pointer to vector element \p Index located in memory for a vector of
  255. /// type \p VecTy starting at a base address of \p VecPtr. If \p Index is out
  256. /// of bounds the returned pointer is unspecified, but will be within the
  257. /// vector bounds.
  258. Register getVectorElementPointer(Register VecPtr, LLT VecTy, Register Index);
  259. /// Handles most opcodes. Split \p MI into same instruction on sub-vectors or
  260. /// scalars with \p NumElts elements (1 for scalar). Supports uneven splits:
  261. /// there can be leftover sub-vector with fewer then \p NumElts or a leftover
  262. /// scalar. To avoid this use moreElements first and set MI number of elements
  263. /// to multiple of \p NumElts. Non-vector operands that should be used on all
  264. /// sub-instructions without split are listed in \p NonVecOpIndices.
  265. LegalizeResult fewerElementsVectorMultiEltType(
  266. GenericMachineInstr &MI, unsigned NumElts,
  267. std::initializer_list<unsigned> NonVecOpIndices = {});
  268. LegalizeResult fewerElementsVectorPhi(GenericMachineInstr &MI,
  269. unsigned NumElts);
  270. LegalizeResult moreElementsVectorPhi(MachineInstr &MI, unsigned TypeIdx,
  271. LLT MoreTy);
  272. LegalizeResult moreElementsVectorShuffle(MachineInstr &MI, unsigned TypeIdx,
  273. LLT MoreTy);
  274. LegalizeResult fewerElementsVectorUnmergeValues(MachineInstr &MI,
  275. unsigned TypeIdx,
  276. LLT NarrowTy);
  277. LegalizeResult fewerElementsVectorMerge(MachineInstr &MI, unsigned TypeIdx,
  278. LLT NarrowTy);
  279. LegalizeResult fewerElementsVectorExtractInsertVectorElt(MachineInstr &MI,
  280. unsigned TypeIdx,
  281. LLT NarrowTy);
  282. LegalizeResult reduceLoadStoreWidth(GLoadStore &MI, unsigned TypeIdx,
  283. LLT NarrowTy);
  284. LegalizeResult narrowScalarShiftByConstant(MachineInstr &MI, const APInt &Amt,
  285. LLT HalfTy, LLT ShiftAmtTy);
  286. LegalizeResult fewerElementsVectorReductions(MachineInstr &MI,
  287. unsigned TypeIdx, LLT NarrowTy);
  288. LegalizeResult fewerElementsVectorShuffle(MachineInstr &MI, unsigned TypeIdx,
  289. LLT NarrowTy);
  290. LegalizeResult narrowScalarShift(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  291. LegalizeResult narrowScalarAddSub(MachineInstr &MI, unsigned TypeIdx,
  292. LLT NarrowTy);
  293. LegalizeResult narrowScalarMul(MachineInstr &MI, LLT Ty);
  294. LegalizeResult narrowScalarFPTOI(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  295. LegalizeResult narrowScalarExtract(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  296. LegalizeResult narrowScalarInsert(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  297. LegalizeResult narrowScalarBasic(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  298. LegalizeResult narrowScalarExt(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  299. LegalizeResult narrowScalarSelect(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  300. LegalizeResult narrowScalarCTLZ(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  301. LegalizeResult narrowScalarCTTZ(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  302. LegalizeResult narrowScalarCTPOP(MachineInstr &MI, unsigned TypeIdx, LLT Ty);
  303. /// Perform Bitcast legalize action on G_EXTRACT_VECTOR_ELT.
  304. LegalizeResult bitcastExtractVectorElt(MachineInstr &MI, unsigned TypeIdx,
  305. LLT CastTy);
  306. /// Perform Bitcast legalize action on G_INSERT_VECTOR_ELT.
  307. LegalizeResult bitcastInsertVectorElt(MachineInstr &MI, unsigned TypeIdx,
  308. LLT CastTy);
  309. LegalizeResult lowerBitcast(MachineInstr &MI);
  310. LegalizeResult lowerLoad(GAnyLoad &MI);
  311. LegalizeResult lowerStore(GStore &MI);
  312. LegalizeResult lowerBitCount(MachineInstr &MI);
  313. LegalizeResult lowerFunnelShiftWithInverse(MachineInstr &MI);
  314. LegalizeResult lowerFunnelShiftAsShifts(MachineInstr &MI);
  315. LegalizeResult lowerFunnelShift(MachineInstr &MI);
  316. LegalizeResult lowerRotateWithReverseRotate(MachineInstr &MI);
  317. LegalizeResult lowerRotate(MachineInstr &MI);
  318. LegalizeResult lowerU64ToF32BitOps(MachineInstr &MI);
  319. LegalizeResult lowerUITOFP(MachineInstr &MI);
  320. LegalizeResult lowerSITOFP(MachineInstr &MI);
  321. LegalizeResult lowerFPTOUI(MachineInstr &MI);
  322. LegalizeResult lowerFPTOSI(MachineInstr &MI);
  323. LegalizeResult lowerFPTRUNC_F64_TO_F16(MachineInstr &MI);
  324. LegalizeResult lowerFPTRUNC(MachineInstr &MI);
  325. LegalizeResult lowerFPOWI(MachineInstr &MI);
  326. LegalizeResult lowerISFPCLASS(MachineInstr &MI);
  327. LegalizeResult lowerMinMax(MachineInstr &MI);
  328. LegalizeResult lowerFCopySign(MachineInstr &MI);
  329. LegalizeResult lowerFMinNumMaxNum(MachineInstr &MI);
  330. LegalizeResult lowerFMad(MachineInstr &MI);
  331. LegalizeResult lowerIntrinsicRound(MachineInstr &MI);
  332. LegalizeResult lowerFFloor(MachineInstr &MI);
  333. LegalizeResult lowerMergeValues(MachineInstr &MI);
  334. LegalizeResult lowerUnmergeValues(MachineInstr &MI);
  335. LegalizeResult lowerExtractInsertVectorElt(MachineInstr &MI);
  336. LegalizeResult lowerShuffleVector(MachineInstr &MI);
  337. LegalizeResult lowerDynStackAlloc(MachineInstr &MI);
  338. LegalizeResult lowerExtract(MachineInstr &MI);
  339. LegalizeResult lowerInsert(MachineInstr &MI);
  340. LegalizeResult lowerSADDO_SSUBO(MachineInstr &MI);
  341. LegalizeResult lowerAddSubSatToMinMax(MachineInstr &MI);
  342. LegalizeResult lowerAddSubSatToAddoSubo(MachineInstr &MI);
  343. LegalizeResult lowerShlSat(MachineInstr &MI);
  344. LegalizeResult lowerBswap(MachineInstr &MI);
  345. LegalizeResult lowerBitreverse(MachineInstr &MI);
  346. LegalizeResult lowerReadWriteRegister(MachineInstr &MI);
  347. LegalizeResult lowerSMULH_UMULH(MachineInstr &MI);
  348. LegalizeResult lowerSelect(MachineInstr &MI);
  349. LegalizeResult lowerDIVREM(MachineInstr &MI);
  350. LegalizeResult lowerAbsToAddXor(MachineInstr &MI);
  351. LegalizeResult lowerAbsToMaxNeg(MachineInstr &MI);
  352. LegalizeResult lowerVectorReduction(MachineInstr &MI);
  353. LegalizeResult lowerMemcpyInline(MachineInstr &MI);
  354. LegalizeResult lowerMemCpyFamily(MachineInstr &MI, unsigned MaxLen = 0);
  355. };
  356. /// Helper function that creates a libcall to the given \p Name using the given
  357. /// calling convention \p CC.
  358. LegalizerHelper::LegalizeResult
  359. createLibcall(MachineIRBuilder &MIRBuilder, const char *Name,
  360. const CallLowering::ArgInfo &Result,
  361. ArrayRef<CallLowering::ArgInfo> Args, CallingConv::ID CC);
  362. /// Helper function that creates the given libcall.
  363. LegalizerHelper::LegalizeResult
  364. createLibcall(MachineIRBuilder &MIRBuilder, RTLIB::Libcall Libcall,
  365. const CallLowering::ArgInfo &Result,
  366. ArrayRef<CallLowering::ArgInfo> Args);
  367. /// Create a libcall to memcpy et al.
  368. LegalizerHelper::LegalizeResult
  369. createMemLibcall(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI,
  370. MachineInstr &MI, LostDebugLocObserver &LocObserver);
  371. } // End namespace llvm.
  372. #endif
  373. #ifdef __GNUC__
  374. #pragma GCC diagnostic pop
  375. #endif