LLVM  8.0.0svn
Mips16ISelDAGToDAG.h
Go to the documentation of this file.
1 //===---- Mips16ISelDAGToDAG.h - A Dag to Dag Inst Selector for Mips ------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Subclass of MipsDAGToDAGISel specialized for mips16.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_MIPS_MIPS16ISELDAGTODAG_H
15 #define LLVM_LIB_TARGET_MIPS_MIPS16ISELDAGTODAG_H
16 
17 #include "MipsISelDAGToDAG.h"
18 
19 namespace llvm {
20 
22 public:
24  : MipsDAGToDAGISel(TM, OL) {}
25 
26 private:
27  std::pair<SDNode *, SDNode *> selectMULT(SDNode *N, unsigned Opc,
28  const SDLoc &DL, EVT Ty, bool HasLo,
29  bool HasHi);
30 
31  bool runOnMachineFunction(MachineFunction &MF) override;
32 
33  bool selectAddr(bool SPAllowed, SDValue Addr, SDValue &Base,
34  SDValue &Offset);
35  bool selectAddr16(SDValue Addr, SDValue &Base,
36  SDValue &Offset) override;
37  bool selectAddr16SP(SDValue Addr, SDValue &Base,
38  SDValue &Offset) override;
39 
40  bool trySelect(SDNode *Node) override;
41 
42  void processFunctionAfterISel(MachineFunction &MF) override;
43 
44  // Insert instructions to initialize the global base register in the
45  // first MBB of the function.
46  void initGlobalBaseReg(MachineFunction &MF);
47 
48  void initMips16SPAliasReg(MachineFunction &MF);
49 };
50 
53 }
54 
55 #endif
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
MachineFunction * MF
CodeGenOpt::Level OptLevel
FunctionPass class - This class is used to implement most global optimizations.
Definition: Pass.h:285
FunctionPass * createMips16ISelDag(MipsTargetMachine &TM, CodeGenOpt::Level OptLevel)
Extended Value Type.
Definition: ValueTypes.h:34
Mips16DAGToDAGISel(MipsTargetMachine &TM, CodeGenOpt::Level OL)
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Represents one node in the SelectionDAG.
#define N
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...