LLVM  3.7.0
MIParser.h
Go to the documentation of this file.
1 //===- MIParser.h - Machine Instructions Parser ---------------------------===//
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 // This file declares the function that parses the machine instructions.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_CODEGEN_MIRPARSER_MIPARSER_H
15 #define LLVM_LIB_CODEGEN_MIRPARSER_MIPARSER_H
16 
17 #include "llvm/ADT/DenseMap.h"
18 #include "llvm/ADT/StringRef.h"
19 
20 namespace llvm {
21 
22 class MachineBasicBlock;
23 class MachineInstr;
24 class MachineFunction;
25 struct SlotMapping;
26 class SMDiagnostic;
27 class SourceMgr;
28 
32 };
33 
35  StringRef Src, const PerFunctionMIParsingState &PFS,
36  const SlotMapping &IRSlots, SMDiagnostic &Error);
37 
39  MachineFunction &MF, StringRef Src,
40  const PerFunctionMIParsingState &PFS,
41  const SlotMapping &IRSlots, SMDiagnostic &Error);
42 
43 bool parseNamedRegisterReference(unsigned &Reg, SourceMgr &SM,
44  MachineFunction &MF, StringRef Src,
45  const PerFunctionMIParsingState &PFS,
46  const SlotMapping &IRSlots,
48 
49 } // end namespace llvm
50 
51 #endif
bool parseMachineInstr(MachineInstr *&MI, SourceMgr &SM, MachineFunction &MF, StringRef Src, const PerFunctionMIParsingState &PFS, const SlotMapping &IRSlots, SMDiagnostic &Error)
Definition: MIParser.cpp:586
Reg
All possible values of the reg field in the ModR/M byte.
DenseMap< unsigned, unsigned > VirtualRegisterSlots
Definition: MIParser.h:31
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling...
Definition: SourceMgr.h:35
bool parseMBBReference(MachineBasicBlock *&MBB, SourceMgr &SM, MachineFunction &MF, StringRef Src, const PerFunctionMIParsingState &PFS, const SlotMapping &IRSlots, SMDiagnostic &Error)
Definition: MIParser.cpp:593
bool parseNamedRegisterReference(unsigned &Reg, SourceMgr &SM, MachineFunction &MF, StringRef Src, const PerFunctionMIParsingState &PFS, const SlotMapping &IRSlots, SMDiagnostic &Error)
Definition: MIParser.cpp:600
This struct contains the mapping from the slot numbers to unnamed metadata nodes and global values...
Definition: SlotMapping.h:27
Representation of each machine instruction.
Definition: MachineInstr.h:51
DenseMap< unsigned, MachineBasicBlock * > MBBSlots
Definition: MIParser.h:30
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
Definition: SourceMgr.h:233