llir-opt  0.0.1
Low-Level Post-Link Optimiser for OCaml and C
isel.h
1 // This file if part of the llir-opt project.
2 // Licensing information can be found in the LICENSE file.
3 // (C) 2018 Nandor Licker. All rights reserved.
4 
5 #pragma once
6 
7 #include <llvm/IR/CallingConv.h>
8 #include <llvm/CodeGen/MachineRegisterInfo.h>
9 #include <llvm/CodeGen/SelectionDAG.h>
10 #include <llvm/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h>
11 #include <llvm/CodeGen/SelectionDAGNodes.h>
12 
13 #include "core/analysis/live_variables.h"
14 #include "core/insts.h"
15 #include "core/type.h"
16 #include "emitter/isel_mapping.h"
17 #include "emitter/call_lowering.h"
18 
19 class Target;
20 
21 
22 
26 class ISel : public llvm::ModulePass, public ISelMapping {
27 protected:
28  using MVT = llvm::MVT;
29  using EVT = llvm::EVT;
30  using SDNode = llvm::SDNode;
31  using SDValue = llvm::SDValue;
32  using SDVTList = llvm::SDVTList;
33  using SelectionDAG = llvm::SelectionDAG;
34  using GlobalValue = llvm::GlobalValue;
35 
36 protected:
38  ISel(
39  char &ID,
40  const Target &target,
41  const Prog &prog,
42  llvm::TargetLibraryInfo &libInfo,
43  llvm::CodeGenOpt::Level ol
44  );
45 
46 private:
48  llvm::StringRef getPassName() const override;
50  void getAnalysisUsage(llvm::AnalysisUsage &AU) const override;
52  bool doInitialization(llvm::Module &M) override;
54  bool runOnModule(llvm::Module &M) override;
55 
56 protected:
58  void Lower(const Inst *inst);
59 
60 protected:
62  virtual void Lower(llvm::MachineFunction &mf) = 0;
63 
65  virtual SDValue GetRegArch(Register reg) = 0;
66 
68  virtual void LowerSyscall(const SyscallInst *inst) = 0;
70  virtual void LowerClone(const CloneInst *inst) = 0;
72  virtual void LowerReturn(const ReturnInst *inst) = 0;
74  virtual void LowerRaise(const RaiseInst *inst) = 0;
76  virtual void LowerSpawn(const SpawnInst *inst) = 0;
78  virtual void LowerLandingPad(const LandingPadInst *inst) = 0;
80  virtual void LowerSet(const SetInst *inst) = 0;
82  virtual void LowerArch(const Inst *inst) = 0;
83 
85  virtual void LowerArguments(bool hasVAStart) = 0;
86 
88  virtual llvm::SelectionDAG &GetDAG() const = 0;
89 
91  virtual llvm::Register GetStackRegister() const = 0;
92 
94  virtual void PreprocessISelDAG() = 0;
96  virtual void PostprocessISelDAG() = 0;
98  virtual void Select(SDNode *node) = 0;
99 
101  virtual bool Finalize(llvm::MachineFunction &MF) { return true; }
102 
103 protected:
105  SDValue LoadReg(Register reg);
107  llvm::SDValue LowerGlobal(const Global &val, Type type);
109  llvm::SDValue LowerGlobal(const Global &val, int64_t offset, Type type);
111  void LowerArgs(const CallLowering &lowering);
113  std::pair<llvm::SDValue, llvm::SDValue>
114  LowerRets(
115  llvm::SDValue chain,
116  const CallLowering &lowering,
117  const ReturnInst *ret,
118  llvm::SmallVectorImpl<SDValue> &ops
119  );
121  std::pair<llvm::SDValue, llvm::SDValue>
122  LowerRaises(
123  llvm::SDValue chain,
124  const CallLowering &lowering,
125  const RaiseInst *ret,
126  llvm::SmallVectorImpl<llvm::Register> &regs,
127  llvm::SDValue glue
128  );
130  void LowerPad(
131  const CallLowering &lowering,
132  const LandingPadInst *inst
133  );
134 
135  using RegParts = llvm::SmallVector<std::pair<llvm::Register, llvm::MVT>, 2>;
136  using ExportList = std::vector<std::pair<RegParts, SDValue>>;
137 
139  SDValue GetPrimitiveExportRoot();
141  SDValue GetValueExportRoot();
143  SDValue GetExportRoot();
145  SDValue GetExportRoot(const ExportList &exports);
147  bool HasPendingExports();
148 
150  RegParts ExportValue(SDValue value);
151 
153  RegParts AssignVReg(ConstRef<Inst> inst);
154 
156  SDValue LowerInlineAsm(
157  unsigned opcode,
158  SDValue chain,
159  const char *code,
160  unsigned flags,
161  llvm::ArrayRef<llvm::Register> inputs,
162  llvm::ArrayRef<llvm::Register> clobbers,
163  llvm::ArrayRef<llvm::Register> outputs,
164  SDValue glue = SDValue()
165  );
166 
168  SDValue LowerImm(const APInt &val, Type type);
170  SDValue LowerImm(const APFloat &val, Type type);
172  SDValue LowerConstant(ConstRef<Inst> inst);
174  SDValue LowerExpr(const Expr &expr, Type type);
175 
177  SDValue GetValue(ConstRef<Inst> inst);
179  void Export(ConstRef<Inst> inst, llvm::SDValue val);
180 
182  llvm::ISD::CondCode GetCond(Cond cc);
183 
185  using FrameExports = std::vector<std::pair<ConstRef<Inst>, llvm::SDValue>>;
187  FrameExports GetFrameExport(const Inst *frame);
189  llvm::SDValue LowerGCFrame(
190  llvm::SDValue chain,
191  llvm::SDValue glue,
192  const CallSite *inst
193  );
197  bool IsExported(ConstRef<Inst> inst);
199  MVT GetPointerType() const;
200 
201 protected:
203  virtual void PrepareFunction(const Func &func, llvm::MachineFunction &MF) {}
205  void HandleSuccessorPHI(const Block *block);
207  void CodeGenAndEmitDAG();
209  void DoInstructionSelection();
210 
211 protected:
213  [[noreturn]] void Error(const Inst *i, const std::string_view &message);
215  [[noreturn]] void Error(const Func *f, const std::string_view &message);
216 
217 protected:
219  void LowerVAStart(const VaStartInst *inst);
221  void LowerCall(const CallInst *inst);
223  void LowerTailCall(const TailCallInst *inst);
225  void LowerInvoke(const InvokeInst *inst);
227  void LowerFrameCall(const FrameCallInst *inst);
229  void LowerBinary(const Inst *inst, unsigned op);
231  void LowerBinary(const Inst *inst, unsigned sop, unsigned fop);
233  void LowerShift(const Inst *inst, unsigned op);
235  void LowerUnary(const UnaryInst *inst, unsigned opcode);
237  void LowerJUMP_COND(const JumpCondInst *inst);
239  void LowerJUMP(const JumpInst *inst);
241  void LowerSwitch(const SwitchInst *inst);
243  void LowerLD(const LoadInst *inst);
245  void LowerST(const StoreInst *inst);
247  void LowerFrame(const FrameInst *inst);
249  void LowerCmp(const CmpInst *inst);
251  void LowerTrap(const TrapInst *inst);
253  void LowerDebugTrap(const DebugTrapInst *inst);
255  void LowerMov(const MovInst *inst);
257  void LowerSExt(const SExtInst *inst);
259  void LowerZExt(const ZExtInst *inst);
261  void LowerFExt(const FExtInst *inst);
263  void LowerXExt(const XExtInst *inst);
265  void LowerTrunc(const TruncInst *inst);
267  void LowerAlloca(const AllocaInst *inst);
269  void LowerSelect(const SelectInst *inst);
271  void LowerUndef(const UndefInst *inst);
273  void LowerALUO(const BinaryInst *inst, unsigned op);
275  void LowerGet(const GetInst *inst);
277  void LowerBitCast(const BitCastInst *inst);
278 
279 protected:
281  virtual void LowerCallSite(llvm::SDValue chain, const CallSite *call) = 0;
283  std::pair<bool, llvm::CallingConv::ID> GetCallingConv(
284  const Func *caller,
285  const CallSite *call
286  );
288  SDValue LowerCallArguments(
289  SDValue chain,
290  const CallSite *call,
291  CallLowering &ci,
292  llvm::SmallVectorImpl<std::pair<unsigned, SDValue>> &regs
293  );
294 
296  std::pair<SDValue, SDValue> LowerReturns(
297  SDValue chain,
298  SDValue inFlag,
299  const CallSite *call,
300  llvm::SmallVectorImpl<CallLowering::RetLoc> &returns,
301  llvm::SmallVectorImpl<SDValue> &regs,
302  llvm::SmallVectorImpl<std::pair<ConstRef<Inst>, SDValue>> &values
303  );
304 
305 protected:
307  const Target &target_;
309  const Prog &prog_;
311  llvm::TargetLibraryInfo &libInfo_;
312 
314  llvm::DebugLoc DL_;
316  llvm::SDLoc SDL_;
317 
319  llvm::Module *M_;
321  llvm::Type *voidTy_;
323  llvm::Type *i8PtrTy_;
325  llvm::FunctionType *funcTy_;
327  llvm::CodeGenOpt::Level ol_;
328 
330  const Func *func_;
332  llvm::Function *F_;
334  llvm::MachineBasicBlock *MBB_;
336  llvm::MachineBasicBlock::iterator insert_;
338  std::unique_ptr<LiveVariables> lva_;
340  std::unordered_map<ConstRef<Inst>, llvm::SDValue> values_;
342  std::unordered_map<ConstRef<Inst>, RegParts> regs_;
344  llvm::DenseMap<unsigned, unsigned> stackIndices_;
347 
349  std::vector<std::pair<RegParts, llvm::SDValue>> pendingPrimValues_;
351  std::unordered_map<ConstRef<Inst>, RegParts> pendingPrimInsts_;
353  std::unordered_map<ConstRef<Inst>, RegParts> pendingValueInsts_;
354 };
ISel::pendingValueInsts_
std::unordered_map< ConstRef< Inst >, RegParts > pendingValueInsts_
Pending value-producing instructions to be exported.
Definition: isel.h:353
ISel::LowerArch
virtual void LowerArch(const Inst *inst)=0
Lowers a target-specific instruction.
ISel::target_
const Target & target_
Reference to the target.
Definition: isel.h:307
ISel::LowerUnary
void LowerUnary(const UnaryInst *inst, unsigned opcode)
Lowers a unary instruction.
Definition: isel.cpp:2143
ISel::LowerBitCast
void LowerBitCast(const BitCastInst *inst)
Lowers a bit cast instruction.
ISel::IsExported
bool IsExported(ConstRef< Inst > inst)
Check if the value is exported from its defining block.
Definition: isel.cpp:1588
Inst
Definition: inst.h:53
ISel::LowerALUO
void LowerALUO(const BinaryInst *inst, unsigned op)
Lowers an overflow check instruction.
Definition: isel.cpp:2615
ISel::LowerClone
virtual void LowerClone(const CloneInst *inst)=0
Lowers a process clone instruction.
Func
Definition: func.h:30
ISel::pendingPrimInsts_
std::unordered_map< ConstRef< Inst >, RegParts > pendingPrimInsts_
Pending primitive instructions to be exported.
Definition: isel.h:351
ISel::LowerUndef
void LowerUndef(const UndefInst *inst)
Lowers an undefined instruction.
Definition: isel.cpp:2609
ISel::LowerGlobal
llvm::SDValue LowerGlobal(const Global &val, Type type)
Lowers an offset reference to a global.
Definition: isel.cpp:771
ISel::LowerLandingPad
virtual void LowerLandingPad(const LandingPadInst *inst)=0
Lowers a landing pad.
ISel::LowerFrameCall
void LowerFrameCall(const FrameCallInst *inst)
Lowers a frame call instruction.
Definition: isel.cpp:2055
ISel::LowerShift
void LowerShift(const Inst *inst, unsigned op)
Lowers a shift instruction.
Definition: isel.cpp:2097
ConstRef< Inst >
ISel::LowerGCFrame
llvm::SDValue LowerGCFrame(llvm::SDValue chain, llvm::SDValue glue, const CallSite *inst)
Lower a GC frame.
Definition: isel.cpp:1521
ISel::GetRegArch
virtual SDValue GetRegArch(Register reg)=0
Reads the value from an architecture-specific register.
ISel::LowerExpr
SDValue LowerExpr(const Expr &expr, Type type)
Lowers an expression value.
Definition: isel.cpp:1444
ISel::GetPointerType
MVT GetPointerType() const
Return the pointer type.
Definition: isel.cpp:1634
ISel::DoInstructionSelection
void DoInstructionSelection()
Creates a MachineBasicBlock with MachineInstrs.
Definition: isel.cpp:1880
ISel::LowerFExt
void LowerFExt(const FExtInst *inst)
Lowers a float extend instruction.
Definition: isel.cpp:2488
ISel::GetCond
llvm::ISD::CondCode GetCond(Cond cc)
Converts a condition code.
Definition: isel.cpp:1456
ISel::lva_
std::unique_ptr< LiveVariables > lva_
Per-function live variable info.
Definition: isel.h:338
ISel::voidTy_
llvm::Type * voidTy_
Void type.
Definition: isel.h:321
ISel::MBB_
llvm::MachineBasicBlock * MBB_
Current basic block.
Definition: isel.h:334
ISel::LowerDebugTrap
void LowerDebugTrap(const DebugTrapInst *inst)
Lowers a debug trap instruction.
Definition: isel.cpp:2378
ISel::Lower
void Lower(const Inst *inst)
Lowers an instruction.
Definition: isel.cpp:554
ISelMapping
Definition: isel_mapping.h:22
CallLowering
Definition: call_lowering.h:21
ISel::LowerST
void LowerST(const StoreInst *inst)
Lowers a store.
Definition: isel.cpp:2329
ISel::LowerReturn
virtual void LowerReturn(const ReturnInst *inst)=0
Lowers a return.
ISel::LowerFrame
void LowerFrame(const FrameInst *inst)
Lowers a frame instruction.
Definition: isel.cpp:2346
ISel::SDL_
llvm::SDLoc SDL_
Dummy SelectionDAG debug location.
Definition: isel.h:316
ISel::LowerSyscall
virtual void LowerSyscall(const SyscallInst *inst)=0
Lowers a system call instruction.
Target
Definition: target.h:24
Expr
Definition: expr.h:19
ISel::LowerTrunc
void LowerTrunc(const TruncInst *inst)
Lowers a truncate instruction.
Definition: isel.cpp:2508
ISel::prog_
const Prog & prog_
Program to lower.
Definition: isel.h:309
ISel::LowerTailCall
void LowerTailCall(const TailCallInst *inst)
Lowers a tail call instruction.
Definition: isel.cpp:2002
ISel::values_
std::unordered_map< ConstRef< Inst >, llvm::SDValue > values_
Mapping from nodes to values.
Definition: isel.h:340
ISel::ISel
ISel(char &ID, const Target &target, const Prog &prog, llvm::TargetLibraryInfo &libInfo, llvm::CodeGenOpt::Level ol)
Initialises the instruction selector.
Definition: isel.cpp:94
ISel::GetStackRegister
virtual llvm::Register GetStackRegister() const =0
Returns the stack pointer.
ISel::LowerRets
std::pair< llvm::SDValue, llvm::SDValue > LowerRets(llvm::SDValue chain, const CallLowering &lowering, const ReturnInst *ret, llvm::SmallVectorImpl< SDValue > &ops)
Lower all return values.
Definition: isel.cpp:909
ISel::regs_
std::unordered_map< ConstRef< Inst >, RegParts > regs_
Mapping from nodes to registers.
Definition: isel.h:342
ID
Definition: id.h:19
ISel::LowerSpawn
virtual void LowerSpawn(const SpawnInst *inst)=0
Lowers a spawn instruction.
ISel::M_
llvm::Module * M_
Current module.
Definition: isel.h:319
ISel::PrepareFunction
virtual void PrepareFunction(const Func &func, llvm::MachineFunction &MF)
Prepare a function.
Definition: isel.h:203
ISel
Definition: isel.h:26
ISel::Finalize
virtual bool Finalize(llvm::MachineFunction &MF)
Finalize the lowering.
Definition: isel.h:101
ISel::LowerMov
void LowerMov(const MovInst *inst)
Lowers a mov instruction.
Definition: isel.cpp:2385
ISel::LowerTrap
void LowerTrap(const TrapInst *inst)
Lowers a trap instruction.
Definition: isel.cpp:2371
ISel::insert_
llvm::MachineBasicBlock::iterator insert_
Current insertion point.
Definition: isel.h:336
ISel::LowerInvoke
void LowerInvoke(const InvokeInst *inst)
Lowers an invoke instruction.
Definition: isel.cpp:2008
ISel::LowerRaises
std::pair< llvm::SDValue, llvm::SDValue > LowerRaises(llvm::SDValue chain, const CallLowering &lowering, const RaiseInst *ret, llvm::SmallVectorImpl< llvm::Register > &regs, llvm::SDValue glue)
Lower all return values.
Definition: isel.cpp:954
ISel::LowerSwitch
void LowerSwitch(const SwitchInst *inst)
Lowers a switch.
Definition: isel.cpp:2243
ISel::LowerRaise
virtual void LowerRaise(const RaiseInst *inst)=0
Lowers an indirect jump.
ISel::LowerSelect
void LowerSelect(const SelectInst *inst)
Lowers a select instruction.
Definition: isel.cpp:2576
ISel::LowerReturns
std::pair< SDValue, SDValue > LowerReturns(SDValue chain, SDValue inFlag, const CallSite *call, llvm::SmallVectorImpl< CallLowering::RetLoc > &returns, llvm::SmallVectorImpl< SDValue > &regs, llvm::SmallVectorImpl< std::pair< ConstRef< Inst >, SDValue >> &values)
Lower values returned from a call.
Definition: isel.cpp:2820
ISel::LowerCmp
void LowerCmp(const CmpInst *inst)
Lowers a comparison instruction.
Definition: isel.cpp:2352
MovInst
Definition: mov.h:17
ISel::Export
void Export(ConstRef< Inst > inst, llvm::SDValue val)
Exports a value.
Definition: isel.cpp:757
ISel::funcTy_
llvm::FunctionType * funcTy_
Dummy function type.
Definition: isel.h:325
ISel::LowerCall
void LowerCall(const CallInst *inst)
Lowers a call instructions.
Definition: isel.cpp:1972
ISel::GetDAG
virtual llvm::SelectionDAG & GetDAG() const =0
Returns a reference to the current DAG.
ISel::LowerXExt
void LowerXExt(const XExtInst *inst)
Lowers a any extend instruction.
Definition: isel.cpp:2469
ISel::LowerGet
void LowerGet(const GetInst *inst)
Lowers a fixed register get instruction.
Definition: isel.cpp:2632
ISel::Select
virtual void Select(SDNode *node)=0
Target-specific instruction selection.
ISel::GetCallingConv
std::pair< bool, llvm::CallingConv::ID > GetCallingConv(const Func *caller, const CallSite *call)
Find the calling convention of a call.
Definition: isel.cpp:1643
ISel::LoadReg
SDValue LoadReg(Register reg)
Lovers a register value.
ISel::i8PtrTy_
llvm::Type * i8PtrTy_
Void pointer type.
Definition: isel.h:323
ISel::Error
void Error(const Inst *i, const std::string_view &message)
Report an error at an instruction.
Definition: isel.cpp:1935
ISel::LowerImm
SDValue LowerImm(const APInt &val, Type type)
Lowers an immediate to a SDValue.
Definition: isel.cpp:1314
ISel::PreprocessISelDAG
virtual void PreprocessISelDAG()=0
Target-specific preprocessing step.
ISel::DL_
llvm::DebugLoc DL_
Dummy debug location.
Definition: isel.h:314
ISel::LowerAlloca
void LowerAlloca(const AllocaInst *inst)
Lowers an alloca instruction.
Definition: isel.cpp:2547
ISel::ExportValue
RegParts ExportValue(SDValue value)
Copies a value to a vreg to be exported later.
Definition: isel.cpp:1207
ISel::LowerZExt
void LowerZExt(const ZExtInst *inst)
Lowers a zero extend instruction.
Definition: isel.cpp:2442
Prog
Definition: prog.h:33
ISel::LowerJUMP_COND
void LowerJUMP_COND(const JumpCondInst *inst)
Lowers a conditional jump true instruction.
Definition: isel.cpp:2154
ISel::LowerArguments
virtual void LowerArguments(bool hasVAStart)=0
Lowers variable argument list frame setup.
ISel::LowerSet
virtual void LowerSet(const SetInst *inst)=0
Lowers a fixed register set instruction.
ISel::LowerConstant
SDValue LowerConstant(ConstRef< Inst > inst)
Returns a constant if the instruction introduces one.
Definition: isel.cpp:1380
ISel::LowerJUMP
void LowerJUMP(const JumpInst *inst)
Lowers a jump instruction.
Definition: isel.cpp:2223
ISel::AssignVReg
RegParts AssignVReg(ConstRef< Inst > inst)
Creates a register for an instruction's result.
Definition: isel.cpp:1182
ISel::LowerSExt
void LowerSExt(const SExtInst *inst)
Lowers a sign extend instruction.
Definition: isel.cpp:2414
ISel::PostprocessISelDAG
virtual void PostprocessISelDAG()=0
Target-specific post-processing step.
ISel::ol_
llvm::CodeGenOpt::Level ol_
Chosen optimisation level.
Definition: isel.h:327
ISel::GetMoveArg
ConstRef< Value > GetMoveArg(ConstRef< MovInst > inst)
Follow move arguments to a non-move instruction.
Definition: isel.cpp:1579
ISel::GetExportRoot
SDValue GetExportRoot()
Flushes all pending exports.
Definition: isel.cpp:1086
ISel::stackIndices_
llvm::DenseMap< unsigned, unsigned > stackIndices_
Mapping from stack_object indices to llvm stack objects.
Definition: isel.h:344
Block
Definition: block.h:29
ISel::LowerArgs
void LowerArgs(const CallLowering &lowering)
Lowers all arguments.
Definition: isel.cpp:823
ISel::LowerCallArguments
SDValue LowerCallArguments(SDValue chain, const CallSite *call, CallLowering &ci, llvm::SmallVectorImpl< std::pair< unsigned, SDValue >> &regs)
Lower the arguments to a call.
Definition: isel.cpp:2700
ISel::LowerPad
void LowerPad(const CallLowering &lowering, const LandingPadInst *inst)
Lowers a landing pad.
Definition: isel.cpp:998
ISel::pendingPrimValues_
std::vector< std::pair< RegParts, llvm::SDValue > > pendingPrimValues_
Pending primitives to be exported.
Definition: isel.h:349
ISel::HasPendingExports
bool HasPendingExports()
Checks if there are any pending exports.
Definition: isel.cpp:1167
ISel::GetFrameExport
FrameExports GetFrameExport(const Inst *frame)
Get the relevant vars for a GC frame.
Definition: isel.cpp:1484
ISel::LowerCallSite
virtual void LowerCallSite(llvm::SDValue chain, const CallSite *call)=0
Lowers a call instruction.
ISel::GetValueExportRoot
SDValue GetValueExportRoot()
Flushes pending exports which are OCaml values.
Definition: isel.cpp:1073
ISel::GetPrimitiveExportRoot
SDValue GetPrimitiveExportRoot()
Flushes pending exports that are not OCaml values.
Definition: isel.cpp:1056
ISel::LowerVAStart
void LowerVAStart(const VaStartInst *inst)
Lowers a vararg frame setup instruction.
Definition: isel.cpp:1954
ISel::libInfo_
llvm::TargetLibraryInfo & libInfo_
Target library info.
Definition: isel.h:311
ISel::LowerBinary
void LowerBinary(const Inst *inst, unsigned op)
Lowers a binary instruction.
Definition: isel.cpp:2085
ISel::LowerInlineAsm
SDValue LowerInlineAsm(unsigned opcode, SDValue chain, const char *code, unsigned flags, llvm::ArrayRef< llvm::Register > inputs, llvm::ArrayRef< llvm::Register > clobbers, llvm::ArrayRef< llvm::Register > outputs, SDValue glue=SDValue())
Lower an inline asm sequence.
Definition: isel.cpp:1229
ISel::frameIndex_
int frameIndex_
Frame start index, if necessary.
Definition: isel.h:346
ISel::FrameExports
std::vector< std::pair< ConstRef< Inst >, llvm::SDValue > > FrameExports
Vector of exported values from the frame.
Definition: isel.h:185
Global
Definition: global.h:23
ISel::HandleSuccessorPHI
void HandleSuccessorPHI(const Block *block)
Handle PHI nodes in successor blocks.
Definition: isel.cpp:1686
ISel::func_
const Func * func_
Current function.
Definition: isel.h:330
ISel::F_
llvm::Function * F_
Current LLVM function.
Definition: isel.h:332
ISel::GetValue
SDValue GetValue(ConstRef< Inst > inst)
Looks up an existing value.
Definition: isel.cpp:709
ISel::LowerLD
void LowerLD(const LoadInst *inst)
Lowers a load.
Definition: isel.cpp:2306
ISel::CodeGenAndEmitDAG
void CodeGenAndEmitDAG()
Prepares the dag for instruction selection.
Definition: isel.cpp:1802