summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AVR/AVRMCInstLower.h
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2016-10-07 06:13:09 +0000
committerDylan McKay <dylanmckay34@gmail.com>2016-10-07 06:13:09 +0000
commite5d89e8001568946bff29ee090e18e7805959a1d (patch)
tree7ff47155c17d8fb52d5772a5fe6a76f4859d8a3d /llvm/lib/Target/AVR/AVRMCInstLower.h
parent93401f4b5ec75b6e70ec53bc0716a7b1e29880d9 (diff)
downloadbcm5719-llvm-e5d89e8001568946bff29ee090e18e7805959a1d.tar.gz
bcm5719-llvm-e5d89e8001568946bff29ee090e18e7805959a1d.zip
[AVR] Add the AVRMCInstLower class
Summary: This class deals with the lowering of CodeGen `MachineInstr` objects to MC `MCInst` objects. Reviewers: kparzysz, arsenm Subscribers: wdng, beanz, japaric, mgorny Differential Revision: https://reviews.llvm.org/D25269 llvm-svn: 283522
Diffstat (limited to 'llvm/lib/Target/AVR/AVRMCInstLower.h')
-rw-r--r--llvm/lib/Target/AVR/AVRMCInstLower.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/llvm/lib/Target/AVR/AVRMCInstLower.h b/llvm/lib/Target/AVR/AVRMCInstLower.h
new file mode 100644
index 00000000000..2e2d1014485
--- /dev/null
+++ b/llvm/lib/Target/AVR/AVRMCInstLower.h
@@ -0,0 +1,43 @@
+//===-- AVRMCInstLower.h - Lower MachineInstr to MCInst ---------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_AVR_MCINST_LOWER_H
+#define LLVM_AVR_MCINST_LOWER_H
+
+#include "llvm/Support/Compiler.h"
+
+namespace llvm {
+
+class AsmPrinter;
+class MachineInstr;
+class MachineOperand;
+class MCContext;
+class MCInst;
+class MCOperand;
+class MCSymbol;
+
+/// Lowers `MachineInstr` objects into `MCInst` objects.
+class AVRMCInstLower {
+public:
+ AVRMCInstLower(MCContext &Ctx, AsmPrinter &Printer)
+ : Ctx(Ctx), Printer(Printer) {}
+
+ /// Lowers a `MachineInstr` into a `MCInst`.
+ void lowerInstruction(const MachineInstr &MI, MCInst &OutMI) const;
+ MCOperand lowerSymbolOperand(const MachineOperand &MO, MCSymbol *Sym) const;
+
+private:
+ MCContext &Ctx;
+ AsmPrinter &Printer;
+};
+
+} // end namespace llvm
+
+#endif // LLVM_AVR_MCINST_LOWER_H
+
OpenPOWER on IntegriCloud