2015-06-22 17:02:30 +00:00
|
|
|
//===- MIParser.h - Machine Instructions Parser ---------------------------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file declares the function that parses the machine instructions.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_LIB_CODEGEN_MIRPARSER_MIPARSER_H
|
|
|
|
#define LLVM_LIB_CODEGEN_MIRPARSER_MIPARSER_H
|
|
|
|
|
2015-06-26 16:46:11 +00:00
|
|
|
#include "llvm/ADT/DenseMap.h"
|
2015-06-22 17:02:30 +00:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2015-06-26 16:46:11 +00:00
|
|
|
class MachineBasicBlock;
|
2015-06-22 17:02:30 +00:00
|
|
|
class MachineInstr;
|
|
|
|
class MachineFunction;
|
2015-06-26 22:56:48 +00:00
|
|
|
struct SlotMapping;
|
2015-06-22 17:02:30 +00:00
|
|
|
class SMDiagnostic;
|
|
|
|
class SourceMgr;
|
|
|
|
|
2015-07-07 17:46:43 +00:00
|
|
|
struct PerFunctionMIParsingState {
|
|
|
|
DenseMap<unsigned, MachineBasicBlock *> MBBSlots;
|
2015-07-10 22:51:20 +00:00
|
|
|
DenseMap<unsigned, unsigned> VirtualRegisterSlots;
|
2015-07-07 17:46:43 +00:00
|
|
|
};
|
|
|
|
|
2015-06-30 17:47:50 +00:00
|
|
|
bool parseMachineInstr(MachineInstr *&MI, SourceMgr &SM, MachineFunction &MF,
|
2015-07-07 17:46:43 +00:00
|
|
|
StringRef Src, const PerFunctionMIParsingState &PFS,
|
2015-06-30 17:47:50 +00:00
|
|
|
const SlotMapping &IRSlots, SMDiagnostic &Error);
|
2015-06-22 17:02:30 +00:00
|
|
|
|
2015-06-30 18:16:42 +00:00
|
|
|
bool parseMBBReference(MachineBasicBlock *&MBB, SourceMgr &SM,
|
|
|
|
MachineFunction &MF, StringRef Src,
|
2015-07-07 17:46:43 +00:00
|
|
|
const PerFunctionMIParsingState &PFS,
|
2015-06-30 18:16:42 +00:00
|
|
|
const SlotMapping &IRSlots, SMDiagnostic &Error);
|
|
|
|
|
2015-07-14 21:24:41 +00:00
|
|
|
bool parseNamedRegisterReference(unsigned &Reg, SourceMgr &SM,
|
|
|
|
MachineFunction &MF, StringRef Src,
|
|
|
|
const PerFunctionMIParsingState &PFS,
|
|
|
|
const SlotMapping &IRSlots,
|
|
|
|
SMDiagnostic &Error);
|
|
|
|
|
2015-06-22 17:02:30 +00:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|