1 //===- MIParser.h - Machine Instructions Parser ---------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the function that parses the machine instructions.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_CODEGEN_MIRPARSER_MIPARSER_H
15 #define LLVM_LIB_CODEGEN_MIRPARSER_MIPARSER_H
17 #include "llvm/ADT/DenseMap.h"
18 #include "llvm/ADT/StringRef.h"
22 class MachineBasicBlock;
24 class MachineFunction;
29 struct PerFunctionMIParsingState {
30 DenseMap<unsigned, MachineBasicBlock *> MBBSlots;
33 bool parseMachineInstr(MachineInstr *&MI, SourceMgr &SM, MachineFunction &MF,
34 StringRef Src, const PerFunctionMIParsingState &PFS,
35 const SlotMapping &IRSlots, SMDiagnostic &Error);
37 bool parseMBBReference(MachineBasicBlock *&MBB, SourceMgr &SM,
38 MachineFunction &MF, StringRef Src,
39 const PerFunctionMIParsingState &PFS,
40 const SlotMapping &IRSlots, SMDiagnostic &Error);
42 } // end namespace llvm