FastISel.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579
  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/TargetLowering.h"
  25. #include "llvm/IR/Attributes.h"
  26. #include "llvm/IR/CallingConv.h"
  27. #include "llvm/IR/DebugLoc.h"
  28. #include "llvm/IR/DerivedTypes.h"
  29. #include "llvm/IR/InstrTypes.h"
  30. #include "llvm/IR/IntrinsicInst.h"
  31. #include "llvm/Support/MachineValueType.h"
  32. #include <algorithm>
  33. #include <cstdint>
  34. #include <utility>
  35. namespace llvm {
  36. class AllocaInst;
  37. class BasicBlock;
  38. class CallInst;
  39. class Constant;
  40. class ConstantFP;
  41. class DataLayout;
  42. class FunctionLoweringInfo;
  43. class LoadInst;
  44. class MachineConstantPool;
  45. class MachineFrameInfo;
  46. class MachineFunction;
  47. class MachineInstr;
  48. class MachineMemOperand;
  49. class MachineOperand;
  50. class MachineRegisterInfo;
  51. class MCContext;
  52. class MCInstrDesc;
  53. class MCSymbol;
  54. class TargetInstrInfo;
  55. class TargetLibraryInfo;
  56. class TargetMachine;
  57. class TargetRegisterClass;
  58. class TargetRegisterInfo;
  59. class Type;
  60. class User;
  61. class Value;
  62. /// This is a fast-path instruction selection class that generates poor
  63. /// code and doesn't support illegal types or non-trivial lowering, but runs
  64. /// quickly.
  65. class FastISel {
  66. public:
  67. using ArgListEntry = TargetLoweringBase::ArgListEntry;
  68. using ArgListTy = TargetLoweringBase::ArgListTy;
  69. struct CallLoweringInfo {
  70. Type *RetTy = nullptr;
  71. bool RetSExt : 1;
  72. bool RetZExt : 1;
  73. bool IsVarArg : 1;
  74. bool IsInReg : 1;
  75. bool DoesNotReturn : 1;
  76. bool IsReturnValueUsed : 1;
  77. bool IsPatchPoint : 1;
  78. // IsTailCall Should be modified by implementations of FastLowerCall
  79. // that perform tail call conversions.
  80. bool IsTailCall = false;
  81. unsigned NumFixedArgs = -1;
  82. CallingConv::ID CallConv = CallingConv::C;
  83. const Value *Callee = nullptr;
  84. MCSymbol *Symbol = nullptr;
  85. ArgListTy Args;
  86. const CallBase *CB = nullptr;
  87. MachineInstr *Call = nullptr;
  88. Register ResultReg;
  89. unsigned NumResultRegs = 0;
  90. SmallVector<Value *, 16> OutVals;
  91. SmallVector<ISD::ArgFlagsTy, 16> OutFlags;
  92. SmallVector<Register, 16> OutRegs;
  93. SmallVector<ISD::InputArg, 4> Ins;
  94. SmallVector<Register, 4> InRegs;
  95. CallLoweringInfo()
  96. : RetSExt(false), RetZExt(false), IsVarArg(false), IsInReg(false),
  97. DoesNotReturn(false), IsReturnValueUsed(true), IsPatchPoint(false) {}
  98. CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy,
  99. const Value *Target, ArgListTy &&ArgsList,
  100. const CallBase &Call) {
  101. RetTy = ResultTy;
  102. Callee = Target;
  103. IsInReg = Call.hasRetAttr(Attribute::InReg);
  104. DoesNotReturn = Call.doesNotReturn();
  105. IsVarArg = FuncTy->isVarArg();
  106. IsReturnValueUsed = !Call.use_empty();
  107. RetSExt = Call.hasRetAttr(Attribute::SExt);
  108. RetZExt = Call.hasRetAttr(Attribute::ZExt);
  109. CallConv = Call.getCallingConv();
  110. Args = std::move(ArgsList);
  111. NumFixedArgs = FuncTy->getNumParams();
  112. CB = &Call;
  113. return *this;
  114. }
  115. CallLoweringInfo &setCallee(Type *ResultTy, FunctionType *FuncTy,
  116. MCSymbol *Target, ArgListTy &&ArgsList,
  117. const CallBase &Call,
  118. unsigned FixedArgs = ~0U) {
  119. RetTy = ResultTy;
  120. Callee = Call.getCalledOperand();
  121. Symbol = Target;
  122. IsInReg = Call.hasRetAttr(Attribute::InReg);
  123. DoesNotReturn = Call.doesNotReturn();
  124. IsVarArg = FuncTy->isVarArg();
  125. IsReturnValueUsed = !Call.use_empty();
  126. RetSExt = Call.hasRetAttr(Attribute::SExt);
  127. RetZExt = Call.hasRetAttr(Attribute::ZExt);
  128. CallConv = Call.getCallingConv();
  129. Args = std::move(ArgsList);
  130. NumFixedArgs = (FixedArgs == ~0U) ? FuncTy->getNumParams() : FixedArgs;
  131. CB = &Call;
  132. return *this;
  133. }
  134. CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy,
  135. const Value *Target, ArgListTy &&ArgsList,
  136. unsigned FixedArgs = ~0U) {
  137. RetTy = ResultTy;
  138. Callee = Target;
  139. CallConv = CC;
  140. Args = std::move(ArgsList);
  141. NumFixedArgs = (FixedArgs == ~0U) ? Args.size() : FixedArgs;
  142. return *this;
  143. }
  144. CallLoweringInfo &setCallee(const DataLayout &DL, MCContext &Ctx,
  145. CallingConv::ID CC, Type *ResultTy,
  146. StringRef Target, ArgListTy &&ArgsList,
  147. unsigned FixedArgs = ~0U);
  148. CallLoweringInfo &setCallee(CallingConv::ID CC, Type *ResultTy,
  149. MCSymbol *Target, ArgListTy &&ArgsList,
  150. unsigned FixedArgs = ~0U) {
  151. RetTy = ResultTy;
  152. Symbol = Target;
  153. CallConv = CC;
  154. Args = std::move(ArgsList);
  155. NumFixedArgs = (FixedArgs == ~0U) ? Args.size() : FixedArgs;
  156. return *this;
  157. }
  158. CallLoweringInfo &setTailCall(bool Value = true) {
  159. IsTailCall = Value;
  160. return *this;
  161. }
  162. CallLoweringInfo &setIsPatchPoint(bool Value = true) {
  163. IsPatchPoint = Value;
  164. return *this;
  165. }
  166. ArgListTy &getArgs() { return Args; }
  167. void clearOuts() {
  168. OutVals.clear();
  169. OutFlags.clear();
  170. OutRegs.clear();
  171. }
  172. void clearIns() {
  173. Ins.clear();
  174. InRegs.clear();
  175. }
  176. };
  177. protected:
  178. DenseMap<const Value *, Register> LocalValueMap;
  179. FunctionLoweringInfo &FuncInfo;
  180. MachineFunction *MF;
  181. MachineRegisterInfo &MRI;
  182. MachineFrameInfo &MFI;
  183. MachineConstantPool &MCP;
  184. DebugLoc DbgLoc;
  185. const TargetMachine &TM;
  186. const DataLayout &DL;
  187. const TargetInstrInfo &TII;
  188. const TargetLowering &TLI;
  189. const TargetRegisterInfo &TRI;
  190. const TargetLibraryInfo *LibInfo;
  191. bool SkipTargetIndependentISel;
  192. bool UseInstrRefDebugInfo = false;
  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 DbgLoc; }
  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. /// Signal whether instruction referencing variable locations are desired for
  278. /// this function's debug-info.
  279. void useInstrRefDebugInfo(bool Flag) {
  280. UseInstrRefDebugInfo = Flag;
  281. }
  282. protected:
  283. explicit FastISel(FunctionLoweringInfo &FuncInfo,
  284. const TargetLibraryInfo *LibInfo,
  285. bool SkipTargetIndependentISel = false);
  286. /// This method is called by target-independent code when the normal
  287. /// FastISel process fails to select an instruction. This gives targets a
  288. /// chance to emit code for anything that doesn't fit into FastISel's
  289. /// framework. It returns true if it was successful.
  290. virtual bool fastSelectInstruction(const Instruction *I) = 0;
  291. /// This method is called by target-independent code to do target-
  292. /// specific argument lowering. It returns true if it was successful.
  293. virtual bool fastLowerArguments();
  294. /// This method is called by target-independent code to do target-
  295. /// specific call lowering. It returns true if it was successful.
  296. virtual bool fastLowerCall(CallLoweringInfo &CLI);
  297. /// This method is called by target-independent code to do target-
  298. /// specific intrinsic lowering. It returns true if it was successful.
  299. virtual bool fastLowerIntrinsicCall(const IntrinsicInst *II);
  300. /// This method is called by target-independent code to request that an
  301. /// instruction with the given type and opcode be emitted.
  302. virtual unsigned fastEmit_(MVT VT, MVT RetVT, unsigned Opcode);
  303. /// This method is called by target-independent code to request that an
  304. /// instruction with the given type, opcode, and register operand be emitted.
  305. virtual unsigned fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0);
  306. /// This method is called by target-independent code to request that an
  307. /// instruction with the given type, opcode, and register operands be emitted.
  308. virtual unsigned fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0,
  309. unsigned Op1);
  310. /// This method is called by target-independent code to request that an
  311. /// instruction with the given type, opcode, and register and immediate
  312. /// operands be emitted.
  313. virtual unsigned fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0,
  314. uint64_t Imm);
  315. /// This method is a wrapper of fastEmit_ri.
  316. ///
  317. /// It first tries to emit an instruction with an immediate operand using
  318. /// fastEmit_ri. If that fails, it materializes the immediate into a register
  319. /// and try fastEmit_rr instead.
  320. Register fastEmit_ri_(MVT VT, unsigned Opcode, unsigned Op0, uint64_t Imm,
  321. MVT ImmType);
  322. /// This method is called by target-independent code to request that an
  323. /// instruction with the given type, opcode, and immediate operand be emitted.
  324. virtual unsigned fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t Imm);
  325. /// This method is called by target-independent code to request that an
  326. /// instruction with the given type, opcode, and floating-point immediate
  327. /// operand be emitted.
  328. virtual unsigned fastEmit_f(MVT VT, MVT RetVT, unsigned Opcode,
  329. const ConstantFP *FPImm);
  330. /// Emit a MachineInstr with no operands and a result register in the
  331. /// given register class.
  332. Register fastEmitInst_(unsigned MachineInstOpcode,
  333. const TargetRegisterClass *RC);
  334. /// Emit a MachineInstr with one register operand and a result register
  335. /// in the given register class.
  336. Register fastEmitInst_r(unsigned MachineInstOpcode,
  337. const TargetRegisterClass *RC, unsigned Op0);
  338. /// Emit a MachineInstr with two register operands and a result
  339. /// register in the given register class.
  340. Register fastEmitInst_rr(unsigned MachineInstOpcode,
  341. const TargetRegisterClass *RC, unsigned Op0,
  342. unsigned Op1);
  343. /// Emit a MachineInstr with three register operands and a result
  344. /// register in the given register class.
  345. Register fastEmitInst_rrr(unsigned MachineInstOpcode,
  346. const TargetRegisterClass *RC, unsigned Op0,
  347. unsigned Op1, unsigned Op2);
  348. /// Emit a MachineInstr with a register operand, an immediate, and a
  349. /// result register in the given register class.
  350. Register fastEmitInst_ri(unsigned MachineInstOpcode,
  351. const TargetRegisterClass *RC, unsigned Op0,
  352. uint64_t Imm);
  353. /// Emit a MachineInstr with one register operand and two immediate
  354. /// operands.
  355. Register fastEmitInst_rii(unsigned MachineInstOpcode,
  356. const TargetRegisterClass *RC, unsigned Op0,
  357. uint64_t Imm1, uint64_t Imm2);
  358. /// Emit a MachineInstr with a floating point immediate, and a result
  359. /// register in the given register class.
  360. Register fastEmitInst_f(unsigned MachineInstOpcode,
  361. const TargetRegisterClass *RC,
  362. const ConstantFP *FPImm);
  363. /// Emit a MachineInstr with two register operands, an immediate, and a
  364. /// result register in the given register class.
  365. Register fastEmitInst_rri(unsigned MachineInstOpcode,
  366. const TargetRegisterClass *RC, unsigned Op0,
  367. unsigned Op1, uint64_t Imm);
  368. /// Emit a MachineInstr with a single immediate operand, and a result
  369. /// register in the given register class.
  370. Register fastEmitInst_i(unsigned MachineInstOpcode,
  371. const TargetRegisterClass *RC, uint64_t Imm);
  372. /// Emit a MachineInstr for an extract_subreg from a specified index of
  373. /// a superregister to a specified type.
  374. Register fastEmitInst_extractsubreg(MVT RetVT, unsigned Op0, uint32_t Idx);
  375. /// Emit MachineInstrs to compute the value of Op with all but the
  376. /// least significant bit set to zero.
  377. Register fastEmitZExtFromI1(MVT VT, unsigned Op0);
  378. /// Emit an unconditional branch to the given block, unless it is the
  379. /// immediate (fall-through) successor, and update the CFG.
  380. void fastEmitBranch(MachineBasicBlock *MSucc, const DebugLoc &DbgLoc);
  381. /// Emit an unconditional branch to \p FalseMBB, obtains the branch weight
  382. /// and adds TrueMBB and FalseMBB to the successor list.
  383. void finishCondBranch(const BasicBlock *BranchBB, MachineBasicBlock *TrueMBB,
  384. MachineBasicBlock *FalseMBB);
  385. /// Update the value map to include the new mapping for this
  386. /// instruction, or insert an extra copy to get the result in a previous
  387. /// determined register.
  388. ///
  389. /// NOTE: This is only necessary because we might select a block that uses a
  390. /// value before we select the block that defines the value. It might be
  391. /// possible to fix this by selecting blocks in reverse postorder.
  392. void updateValueMap(const Value *I, Register Reg, unsigned NumRegs = 1);
  393. Register createResultReg(const TargetRegisterClass *RC);
  394. /// Try to constrain Op so that it is usable by argument OpNum of the
  395. /// provided MCInstrDesc. If this fails, create a new virtual register in the
  396. /// correct class and COPY the value there.
  397. Register constrainOperandRegClass(const MCInstrDesc &II, Register Op,
  398. unsigned OpNum);
  399. /// Emit a constant in a register using target-specific logic, such as
  400. /// constant pool loads.
  401. virtual unsigned fastMaterializeConstant(const Constant *C) { return 0; }
  402. /// Emit an alloca address in a register using target-specific logic.
  403. virtual unsigned fastMaterializeAlloca(const AllocaInst *C) { return 0; }
  404. /// Emit the floating-point constant +0.0 in a register using target-
  405. /// specific logic.
  406. virtual unsigned fastMaterializeFloatZero(const ConstantFP *CF) {
  407. return 0;
  408. }
  409. /// Check if \c Add is an add that can be safely folded into \c GEP.
  410. ///
  411. /// \c Add can be folded into \c GEP if:
  412. /// - \c Add is an add,
  413. /// - \c Add's size matches \c GEP's,
  414. /// - \c Add is in the same basic block as \c GEP, and
  415. /// - \c Add has a constant operand.
  416. bool canFoldAddIntoGEP(const User *GEP, const Value *Add);
  417. /// Create a machine mem operand from the given instruction.
  418. MachineMemOperand *createMachineMemOperandFor(const Instruction *I) const;
  419. CmpInst::Predicate optimizeCmpPredicate(const CmpInst *CI) const;
  420. bool lowerCallTo(const CallInst *CI, MCSymbol *Symbol, unsigned NumArgs);
  421. bool lowerCallTo(const CallInst *CI, const char *SymName,
  422. unsigned NumArgs);
  423. bool lowerCallTo(CallLoweringInfo &CLI);
  424. bool lowerCall(const CallInst *I);
  425. /// Select and emit code for a binary operator instruction, which has
  426. /// an opcode which directly corresponds to the given ISD opcode.
  427. bool selectBinaryOp(const User *I, unsigned ISDOpcode);
  428. bool selectFNeg(const User *I, const Value *In);
  429. bool selectGetElementPtr(const User *I);
  430. bool selectStackmap(const CallInst *I);
  431. bool selectPatchpoint(const CallInst *I);
  432. bool selectCall(const User *I);
  433. bool selectIntrinsicCall(const IntrinsicInst *II);
  434. bool selectBitCast(const User *I);
  435. bool selectFreeze(const User *I);
  436. bool selectCast(const User *I, unsigned Opcode);
  437. bool selectExtractValue(const User *U);
  438. bool selectXRayCustomEvent(const CallInst *II);
  439. bool selectXRayTypedEvent(const CallInst *II);
  440. bool shouldOptForSize(const MachineFunction *MF) const {
  441. // TODO: Implement PGSO.
  442. return MF->getFunction().hasOptSize();
  443. }
  444. private:
  445. /// Handle PHI nodes in successor blocks.
  446. ///
  447. /// Emit code to ensure constants are copied into registers when needed.
  448. /// Remember the virtual registers that need to be added to the Machine PHI
  449. /// nodes as input. We cannot just directly add them, because expansion might
  450. /// result in multiple MBB's for one BB. As such, the start of the BB might
  451. /// correspond to a different MBB than the end.
  452. bool handlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB);
  453. /// Helper for materializeRegForValue to materialize a constant in a
  454. /// target-independent way.
  455. Register materializeConstant(const Value *V, MVT VT);
  456. /// Helper for getRegForVale. This function is called when the value
  457. /// isn't already available in a register and must be materialized with new
  458. /// instructions.
  459. Register materializeRegForValue(const Value *V, MVT VT);
  460. /// Clears LocalValueMap and moves the area for the new local variables
  461. /// to the beginning of the block. It helps to avoid spilling cached variables
  462. /// across heavy instructions like calls.
  463. void flushLocalValueMap();
  464. /// Removes dead local value instructions after SavedLastLocalvalue.
  465. void removeDeadLocalValueCode(MachineInstr *SavedLastLocalValue);
  466. /// Insertion point before trying to select the current instruction.
  467. MachineBasicBlock::iterator SavedInsertPt;
  468. /// Add a stackmap or patchpoint intrinsic call's live variable
  469. /// operands to a stackmap or patchpoint machine instruction.
  470. bool addStackMapLiveVars(SmallVectorImpl<MachineOperand> &Ops,
  471. const CallInst *CI, unsigned StartIdx);
  472. bool lowerCallOperands(const CallInst *CI, unsigned ArgIdx, unsigned NumArgs,
  473. const Value *Callee, bool ForceRetVoidTy,
  474. CallLoweringInfo &CLI);
  475. };
  476. } // end namespace llvm
  477. #endif // LLVM_CODEGEN_FASTISEL_H
  478. #ifdef __GNUC__
  479. #pragma GCC diagnostic pop
  480. #endif