FastISel.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- FastISel.h - Definition of the FastISel class ------------*- 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
  15. /// This file defines the FastISel class.
  16. ///
  17. //===----------------------------------------------------------------------===//
  18. #ifndef LLVM_CODEGEN_FASTISEL_H
  19. #define LLVM_CODEGEN_FASTISEL_H
  20. #include "llvm/ADT/DenseMap.h"
  21. #include "llvm/ADT/SmallVector.h"
  22. #include "llvm/ADT/StringRef.h"
  23. #include "llvm/CodeGen/MachineBasicBlock.h"
  24. #include "llvm/CodeGen/MachineInstrBuilder.h"
  25. #include "llvm/CodeGen/TargetLowering.h"
  26. #include "llvm/IR/Attributes.h"
  27. #include "llvm/IR/CallingConv.h"
  28. #include "llvm/IR/DebugLoc.h"
  29. #include "llvm/IR/DerivedTypes.h"
  30. #include "llvm/IR/InstrTypes.h"
  31. #include "llvm/Support/MachineValueType.h"
  32. #include <cstdint>
  33. #include <utility>
  34. namespace llvm {
  35. class AllocaInst;
  36. class Instruction;
  37. class IntrinsicInst;
  38. class BasicBlock;
  39. class CallInst;
  40. class Constant;
  41. class ConstantFP;
  42. class DataLayout;
  43. class FunctionLoweringInfo;
  44. class LoadInst;
  45. class MachineConstantPool;
  46. class MachineFrameInfo;
  47. class MachineFunction;
  48. class MachineInstr;
  49. class MachineMemOperand;
  50. class MachineOperand;
  51. class MachineRegisterInfo;
  52. class MCContext;
  53. class MCInstrDesc;
  54. class MCSymbol;
  55. class TargetInstrInfo;
  56. class TargetLibraryInfo;
  57. class TargetMachine;
  58. class TargetRegisterClass;
  59. class TargetRegisterInfo;
  60. class Type;
  61. class User;
  62. class Value;
  63. /// This is a fast-path instruction selection class that generates poor
  64. /// code and doesn't support illegal types or non-trivial lowering, but runs
  65. /// quickly.
  66. class FastISel {
  67. public:
  68. using ArgListEntry = TargetLoweringBase::ArgListEntry;
  69. using ArgListTy = TargetLoweringBase::ArgListTy;
  70. struct CallLoweringInfo {
  71. Type *RetTy = nullptr;
  72. bool RetSExt : 1;
  73. bool RetZExt : 1;
  74. bool IsVarArg : 1;
  75. bool IsInReg : 1;
  76. bool DoesNotReturn : 1;
  77. bool IsReturnValueUsed : 1;
  78. bool IsPatchPoint : 1;
  79. // IsTailCall Should be modified by implementations of FastLowerCall
  80. // that perform tail call conversions.
  81. bool IsTailCall = false;
  82. unsigned NumFixedArgs = -1;
  83. CallingConv::ID CallConv = CallingConv::C;
  84. const Value *Callee = nullptr;
  85. MCSymbol *Symbol = nullptr;
  86. ArgListTy Args;
  87. const CallBase *CB = nullptr;
  88. MachineInstr *Call = nullptr;
  89. Register ResultReg;
  90. unsigned NumResultRegs = 0;
  91. SmallVector<Value *, 16> OutVals;
  92. SmallVector<ISD::ArgFlagsTy, 16> OutFlags;
  93. SmallVector<Register, 16> OutRegs;
  94. SmallVector<ISD::InputArg, 4> Ins;
  95. SmallVector<Register, 4> InRegs;
  96. CallLoweringInfo()
  97. : RetSExt(false), RetZExt(false), IsVarArg(false), IsInReg(false),
  98. DoesNotReturn(false), IsReturnValueUsed(true), IsPatchPoint(false) {}
  99. CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy,
  100. const Value *Target, ArgListTy &&ArgsList,
  101. const CallBase &Call) {
  102. RetTy = ResultTy;
  103. Callee = Target;
  104. IsInReg = Call.hasRetAttr(Attribute::InReg);
  105. DoesNotReturn = Call.doesNotReturn();
  106. IsVarArg = FuncTy->isVarArg();
  107. IsReturnValueUsed = !Call.use_empty();
  108. RetSExt = Call.hasRetAttr(Attribute::SExt);
  109. RetZExt = Call.hasRetAttr(Attribute::ZExt);
  110. CallConv = Call.getCallingConv();
  111. Args = std::move(ArgsList);
  112. NumFixedArgs = FuncTy->getNumParams();
  113. CB = &Call;
  114. return *this;
  115. }
  116. CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy,
  117. MCSymbol *Target, ArgListTy &&ArgsList,
  118. const CallBase &Call,
  119. unsigned FixedArgs = ~0U) {
  120. RetTy = ResultTy;
  121. Callee = Call.getCalledOperand();
  122. Symbol = Target;
  123. IsInReg = Call.hasRetAttr(Attribute::InReg);
  124. DoesNotReturn = Call.doesNotReturn();
  125. IsVarArg = FuncTy->isVarArg();
  126. IsReturnValueUsed = !Call.use_empty();
  127. RetSExt = Call.hasRetAttr(Attribute::SExt);
  128. RetZExt = Call.hasRetAttr(Attribute::ZExt);
  129. CallConv = Call.getCallingConv();
  130. Args = std::move(ArgsList);
  131. NumFixedArgs = (FixedArgs == ~0U) ? FuncTy->getNumParams() : FixedArgs;
  132. CB = &Call;
  133. return *this;
  134. }
  135. CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy,
  136. const Value *Target, ArgListTy &&ArgsList,
  137. unsigned FixedArgs = ~0U) {
  138. RetTy = ResultTy;
  139. Callee = Target;
  140. CallConv = CC;
  141. Args = std::move(ArgsList);
  142. NumFixedArgs = (FixedArgs == ~0U) ? Args.size() : FixedArgs;
  143. return *this;
  144. }
  145. CallLoweringInfo &setCallee(const DataLayout &DL, MCContext &Ctx,
  146. CallingConv::ID CC, Type *ResultTy,
  147. StringRef Target, ArgListTy &&ArgsList,
  148. unsigned FixedArgs = ~0U);
  149. CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy,
  150. MCSymbol *Target, ArgListTy &&ArgsList,
  151. unsigned FixedArgs = ~0U) {
  152. RetTy = ResultTy;
  153. Symbol = Target;
  154. CallConv = CC;
  155. Args = std::move(ArgsList);
  156. NumFixedArgs = (FixedArgs == ~0U) ? Args.size() : FixedArgs;
  157. return *this;
  158. }
  159. CallLoweringInfo &setTailCall(bool Value = true) {
  160. IsTailCall = Value;
  161. return *this;
  162. }
  163. CallLoweringInfo &setIsPatchPoint(bool Value = true) {
  164. IsPatchPoint = Value;
  165. return *this;
  166. }
  167. ArgListTy &getArgs() { return Args; }
  168. void clearOuts() {
  169. OutVals.clear();
  170. OutFlags.clear();
  171. OutRegs.clear();
  172. }
  173. void clearIns() {
  174. Ins.clear();
  175. InRegs.clear();
  176. }
  177. };
  178. protected:
  179. DenseMap<const Value *, Register> LocalValueMap;
  180. FunctionLoweringInfo &FuncInfo;
  181. MachineFunction *MF;
  182. MachineRegisterInfo &MRI;
  183. MachineFrameInfo &MFI;
  184. MachineConstantPool &MCP;
  185. MIMetadata MIMD;
  186. const TargetMachine &TM;
  187. const DataLayout &DL;
  188. const TargetInstrInfo &TII;
  189. const TargetLowering &TLI;
  190. const TargetRegisterInfo &TRI;
  191. const TargetLibraryInfo *LibInfo;
  192. bool SkipTargetIndependentISel;
  193. /// The position of the last instruction for materializing constants
  194. /// for use in the current block. It resets to EmitStartPt when it makes sense
  195. /// (for example, it's usually profitable to avoid function calls between the
  196. /// definition and the use)
  197. MachineInstr *LastLocalValue = nullptr;
  198. /// The top most instruction in the current block that is allowed for
  199. /// emitting local variables. LastLocalValue resets to EmitStartPt when it
  200. /// makes sense (for example, on function calls)
  201. MachineInstr *EmitStartPt = nullptr;
  202. public:
  203. virtual ~FastISel();
  204. /// Return the position of the last instruction emitted for
  205. /// materializing constants for use in the current block.
  206. MachineInstr *getLastLocalValue() { return LastLocalValue; }
  207. /// Update the position of the last instruction emitted for
  208. /// materializing constants for use in the current block.
  209. void setLastLocalValue(MachineInstr *I) {
  210. EmitStartPt = I;
  211. LastLocalValue = I;
  212. }
  213. /// Set the current block to which generated machine instructions will
  214. /// be appended.
  215. void startNewBlock();
  216. /// Flush the local value map.
  217. void finishBasicBlock();
  218. /// Return current debug location information.
  219. DebugLoc getCurDebugLoc() const { return MIMD.getDL(); }
  220. /// Do "fast" instruction selection for function arguments and append
  221. /// the machine instructions to the current block. Returns true when
  222. /// successful.
  223. bool lowerArguments();
  224. /// Do "fast" instruction selection for the given LLVM IR instruction
  225. /// and append the generated machine instructions to the current block.
  226. /// Returns true if selection was successful.
  227. bool selectInstruction(const Instruction *I);
  228. /// Do "fast" instruction selection for the given LLVM IR operator
  229. /// (Instruction or ConstantExpr), and append generated machine instructions
  230. /// to the current block. Return true if selection was successful.
  231. bool selectOperator(const User *I, unsigned Opcode);
  232. /// Create a virtual register and arrange for it to be assigned the
  233. /// value for the given LLVM value.
  234. Register getRegForValue(const Value *V);
  235. /// Look up the value to see if its value is already cached in a
  236. /// register. It may be defined by instructions across blocks or defined
  237. /// locally.
  238. Register lookUpRegForValue(const Value *V);
  239. /// This is a wrapper around getRegForValue that also takes care of
  240. /// truncating or sign-extending the given getelementptr index value.
  241. Register getRegForGEPIndex(const Value *Idx);
  242. /// We're checking to see if we can fold \p LI into \p FoldInst. Note
  243. /// that we could have a sequence where multiple LLVM IR instructions are
  244. /// folded into the same machineinstr. For example we could have:
  245. ///
  246. /// A: x = load i32 *P
  247. /// B: y = icmp A, 42
  248. /// C: br y, ...
  249. ///
  250. /// In this scenario, \p LI is "A", and \p FoldInst is "C". We know about "B"
  251. /// (and any other folded instructions) because it is between A and C.
  252. ///
  253. /// If we succeed folding, return true.
  254. bool tryToFoldLoad(const LoadInst *LI, const Instruction *FoldInst);
  255. /// The specified machine instr operand is a vreg, and that vreg is
  256. /// being provided by the specified load instruction. If possible, try to
  257. /// fold the load as an operand to the instruction, returning true if
  258. /// possible.
  259. ///
  260. /// This method should be implemented by targets.
  261. virtual bool tryToFoldLoadIntoMI(MachineInstr * /*MI*/, unsigned /*OpNo*/,
  262. const LoadInst * /*LI*/) {
  263. return false;
  264. }
  265. /// Reset InsertPt to prepare for inserting instructions into the
  266. /// current block.
  267. void recomputeInsertPt();
  268. /// Remove all dead instructions between the I and E.
  269. void removeDeadCode(MachineBasicBlock::iterator I,
  270. MachineBasicBlock::iterator E);
  271. using SavePoint = MachineBasicBlock::iterator;
  272. /// Prepare InsertPt to begin inserting instructions into the local
  273. /// value area and return the old insert position.
  274. SavePoint enterLocalValueArea();
  275. /// Reset InsertPt to the given old insert position.
  276. void leaveLocalValueArea(SavePoint Old);
  277. protected:
  278. explicit FastISel(FunctionLoweringInfo &FuncInfo,
  279. const TargetLibraryInfo *LibInfo,
  280. bool SkipTargetIndependentISel = false);
  281. /// This method is called by target-independent code when the normal
  282. /// FastISel process fails to select an instruction. This gives targets a
  283. /// chance to emit code for anything that doesn't fit into FastISel's
  284. /// framework. It returns true if it was successful.
  285. virtual bool fastSelectInstruction(const Instruction *I) = 0;
  286. /// This method is called by target-independent code to do target-
  287. /// specific argument lowering. It returns true if it was successful.
  288. virtual bool fastLowerArguments();
  289. /// This method is called by target-independent code to do target-
  290. /// specific call lowering. It returns true if it was successful.
  291. virtual bool fastLowerCall(CallLoweringInfo &CLI);
  292. /// This method is called by target-independent code to do target-
  293. /// specific intrinsic lowering. It returns true if it was successful.
  294. virtual bool fastLowerIntrinsicCall(const IntrinsicInst *II);
  295. /// This method is called by target-independent code to request that an
  296. /// instruction with the given type and opcode be emitted.
  297. virtual unsigned fastEmit_(MVT VT, MVT RetVT, unsigned Opcode);
  298. /// This method is called by target-independent code to request that an
  299. /// instruction with the given type, opcode, and register operand be emitted.
  300. virtual unsigned fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0);
  301. /// This method is called by target-independent code to request that an
  302. /// instruction with the given type, opcode, and register operands be emitted.
  303. virtual unsigned fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0,
  304. unsigned Op1);
  305. /// This method is called by target-independent code to request that an
  306. /// instruction with the given type, opcode, and register and immediate
  307. /// operands be emitted.
  308. virtual unsigned fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0,
  309. uint64_t Imm);
  310. /// This method is a wrapper of fastEmit_ri.
  311. ///
  312. /// It first tries to emit an instruction with an immediate operand using
  313. /// fastEmit_ri. If that fails, it materializes the immediate into a register
  314. /// and try fastEmit_rr instead.
  315. Register fastEmit_ri_(MVT VT, unsigned Opcode, unsigned Op0, uint64_t Imm,
  316. MVT ImmType);
  317. /// This method is called by target-independent code to request that an
  318. /// instruction with the given type, opcode, and immediate operand be emitted.
  319. virtual unsigned fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t Imm);
  320. /// This method is called by target-independent code to request that an
  321. /// instruction with the given type, opcode, and floating-point immediate
  322. /// operand be emitted.
  323. virtual unsigned fastEmit_f(MVT VT, MVT RetVT, unsigned Opcode,
  324. const ConstantFP *FPImm);
  325. /// Emit a MachineInstr with no operands and a result register in the
  326. /// given register class.
  327. Register fastEmitInst_(unsigned MachineInstOpcode,
  328. const TargetRegisterClass *RC);
  329. /// Emit a MachineInstr with one register operand and a result register
  330. /// in the given register class.
  331. Register fastEmitInst_r(unsigned MachineInstOpcode,
  332. const TargetRegisterClass *RC, unsigned Op0);
  333. /// Emit a MachineInstr with two register operands and a result
  334. /// register in the given register class.
  335. Register fastEmitInst_rr(unsigned MachineInstOpcode,
  336. const TargetRegisterClass *RC, unsigned Op0,
  337. unsigned Op1);
  338. /// Emit a MachineInstr with three register operands and a result
  339. /// register in the given register class.
  340. Register fastEmitInst_rrr(unsigned MachineInstOpcode,
  341. const TargetRegisterClass *RC, unsigned Op0,
  342. unsigned Op1, unsigned Op2);
  343. /// Emit a MachineInstr with a register operand, an immediate, and a
  344. /// result register in the given register class.
  345. Register fastEmitInst_ri(unsigned MachineInstOpcode,
  346. const TargetRegisterClass *RC, unsigned Op0,
  347. uint64_t Imm);
  348. /// Emit a MachineInstr with one register operand and two immediate
  349. /// operands.
  350. Register fastEmitInst_rii(unsigned MachineInstOpcode,
  351. const TargetRegisterClass *RC, unsigned Op0,
  352. uint64_t Imm1, uint64_t Imm2);
  353. /// Emit a MachineInstr with a floating point immediate, and a result
  354. /// register in the given register class.
  355. Register fastEmitInst_f(unsigned MachineInstOpcode,
  356. const TargetRegisterClass *RC,
  357. const ConstantFP *FPImm);
  358. /// Emit a MachineInstr with two register operands, an immediate, and a
  359. /// result register in the given register class.
  360. Register fastEmitInst_rri(unsigned MachineInstOpcode,
  361. const TargetRegisterClass *RC, unsigned Op0,
  362. unsigned Op1, uint64_t Imm);
  363. /// Emit a MachineInstr with a single immediate operand, and a result
  364. /// register in the given register class.
  365. Register fastEmitInst_i(unsigned MachineInstOpcode,
  366. const TargetRegisterClass *RC, uint64_t Imm);
  367. /// Emit a MachineInstr for an extract_subreg from a specified index of
  368. /// a superregister to a specified type.
  369. Register fastEmitInst_extractsubreg(MVT RetVT, unsigned Op0, uint32_t Idx);
  370. /// Emit MachineInstrs to compute the value of Op with all but the
  371. /// least significant bit set to zero.
  372. Register fastEmitZExtFromI1(MVT VT, unsigned Op0);
  373. /// Emit an unconditional branch to the given block, unless it is the
  374. /// immediate (fall-through) successor, and update the CFG.
  375. void fastEmitBranch(MachineBasicBlock *MSucc, const DebugLoc &DbgLoc);
  376. /// Emit an unconditional branch to \p FalseMBB, obtains the branch weight
  377. /// and adds TrueMBB and FalseMBB to the successor list.
  378. void finishCondBranch(const BasicBlock *BranchBB, MachineBasicBlock *TrueMBB,
  379. MachineBasicBlock *FalseMBB);
  380. /// Update the value map to include the new mapping for this
  381. /// instruction, or insert an extra copy to get the result in a previous
  382. /// determined register.
  383. ///
  384. /// NOTE: This is only necessary because we might select a block that uses a
  385. /// value before we select the block that defines the value. It might be
  386. /// possible to fix this by selecting blocks in reverse postorder.
  387. void updateValueMap(const Value *I, Register Reg, unsigned NumRegs = 1);
  388. Register createResultReg(const TargetRegisterClass *RC);
  389. /// Try to constrain Op so that it is usable by argument OpNum of the
  390. /// provided MCInstrDesc. If this fails, create a new virtual register in the
  391. /// correct class and COPY the value there.
  392. Register constrainOperandRegClass(const MCInstrDesc &II, Register Op,
  393. unsigned OpNum);
  394. /// Emit a constant in a register using target-specific logic, such as
  395. /// constant pool loads.
  396. virtual unsigned fastMaterializeConstant(const Constant *C) { return 0; }
  397. /// Emit an alloca address in a register using target-specific logic.
  398. virtual unsigned fastMaterializeAlloca(const AllocaInst *C) { return 0; }
  399. /// Emit the floating-point constant +0.0 in a register using target-
  400. /// specific logic.
  401. virtual unsigned fastMaterializeFloatZero(const ConstantFP *CF) {
  402. return 0;
  403. }
  404. /// Check if \c Add is an add that can be safely folded into \c GEP.
  405. ///
  406. /// \c Add can be folded into \c GEP if:
  407. /// - \c Add is an add,
  408. /// - \c Add's size matches \c GEP's,
  409. /// - \c Add is in the same basic block as \c GEP, and
  410. /// - \c Add has a constant operand.
  411. bool canFoldAddIntoGEP(const User *GEP, const Value *Add);
  412. /// Create a machine mem operand from the given instruction.
  413. MachineMemOperand *createMachineMemOperandFor(const Instruction *I) const;
  414. CmpInst::Predicate optimizeCmpPredicate(const CmpInst *CI) const;
  415. bool lowerCallTo(const CallInst *CI, MCSymbol *Symbol, unsigned NumArgs);
  416. bool lowerCallTo(const CallInst *CI, const char *SymName,
  417. unsigned NumArgs);
  418. bool lowerCallTo(CallLoweringInfo &CLI);
  419. bool lowerCall(const CallInst *I);
  420. /// Select and emit code for a binary operator instruction, which has
  421. /// an opcode which directly corresponds to the given ISD opcode.
  422. bool selectBinaryOp(const User *I, unsigned ISDOpcode);
  423. bool selectFNeg(const User *I, const Value *In);
  424. bool selectGetElementPtr(const User *I);
  425. bool selectStackmap(const CallInst *I);
  426. bool selectPatchpoint(const CallInst *I);
  427. bool selectCall(const User *I);
  428. bool selectIntrinsicCall(const IntrinsicInst *II);
  429. bool selectBitCast(const User *I);
  430. bool selectFreeze(const User *I);
  431. bool selectCast(const User *I, unsigned Opcode);
  432. bool selectExtractValue(const User *U);
  433. bool selectXRayCustomEvent(const CallInst *II);
  434. bool selectXRayTypedEvent(const CallInst *II);
  435. bool shouldOptForSize(const MachineFunction *MF) const {
  436. // TODO: Implement PGSO.
  437. return MF->getFunction().hasOptSize();
  438. }
  439. private:
  440. /// Handle PHI nodes in successor blocks.
  441. ///
  442. /// Emit code to ensure constants are copied into registers when needed.
  443. /// Remember the virtual registers that need to be added to the Machine PHI
  444. /// nodes as input. We cannot just directly add them, because expansion might
  445. /// result in multiple MBB's for one BB. As such, the start of the BB might
  446. /// correspond to a different MBB than the end.
  447. bool handlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB);
  448. /// Helper for materializeRegForValue to materialize a constant in a
  449. /// target-independent way.
  450. Register materializeConstant(const Value *V, MVT VT);
  451. /// Helper for getRegForVale. This function is called when the value
  452. /// isn't already available in a register and must be materialized with new
  453. /// instructions.
  454. Register materializeRegForValue(const Value *V, MVT VT);
  455. /// Clears LocalValueMap and moves the area for the new local variables
  456. /// to the beginning of the block. It helps to avoid spilling cached variables
  457. /// across heavy instructions like calls.
  458. void flushLocalValueMap();
  459. /// Removes dead local value instructions after SavedLastLocalvalue.
  460. void removeDeadLocalValueCode(MachineInstr *SavedLastLocalValue);
  461. /// Insertion point before trying to select the current instruction.
  462. MachineBasicBlock::iterator SavedInsertPt;
  463. /// Add a stackmap or patchpoint intrinsic call's live variable
  464. /// operands to a stackmap or patchpoint machine instruction.
  465. bool addStackMapLiveVars(SmallVectorImpl<MachineOperand> &Ops,
  466. const CallInst *CI, unsigned StartIdx);
  467. bool lowerCallOperands(const CallInst *CI, unsigned ArgIdx, unsigned NumArgs,
  468. const Value *Callee, bool ForceRetVoidTy,
  469. CallLoweringInfo &CLI);
  470. };
  471. } // end namespace llvm
  472. #endif // LLVM_CODEGEN_FASTISEL_H
  473. #ifdef __GNUC__
  474. #pragma GCC diagnostic pop
  475. #endif