summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MacroFusion.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-01 13:22:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-01 13:22:02 +0000
commit9df3605dea17e84f8183581f6103bd0c79e2a606 (patch)
tree70a2f36ce9eb9bb213603cd7f2f120af53fc176f /include/llvm/CodeGen/MacroFusion.h
parent08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (diff)
Diffstat (limited to 'include/llvm/CodeGen/MacroFusion.h')
-rw-r--r--include/llvm/CodeGen/MacroFusion.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/include/llvm/CodeGen/MacroFusion.h b/include/llvm/CodeGen/MacroFusion.h
index 473784bc58412..dc105fdc68fd8 100644
--- a/include/llvm/CodeGen/MacroFusion.h
+++ b/include/llvm/CodeGen/MacroFusion.h
@@ -1,4 +1,4 @@
-//===- MacroFusion.h - Macro Fusion ------------------------===//
+//===- MacroFusion.h - Macro Fusion -----------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -12,19 +12,26 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_CODEGEN_MACROFUSION_H
+#define LLVM_CODEGEN_MACROFUSION_H
+
#include <functional>
-#include "llvm/Target/TargetInstrInfo.h"
-#include "llvm/CodeGen/MachineScheduler.h"
+#include <memory>
namespace llvm {
+class MachineInstr;
+class ScheduleDAGMutation;
+class TargetInstrInfo;
+class TargetSubtargetInfo;
+
/// \brief Check if the instr pair, FirstMI and SecondMI, should be fused
/// together. Given SecondMI, when FirstMI is unspecified, then check if
/// SecondMI may be part of a fused pair at all.
-typedef std::function<bool(const TargetInstrInfo &TII,
- const TargetSubtargetInfo &TSI,
- const MachineInstr *FirstMI,
- const MachineInstr &SecondMI)> ShouldSchedulePredTy;
+using ShouldSchedulePredTy = std::function<bool(const TargetInstrInfo &TII,
+ const TargetSubtargetInfo &TSI,
+ const MachineInstr *FirstMI,
+ const MachineInstr &SecondMI)>;
/// \brief Create a DAG scheduling mutation to pair instructions back to back
/// for instructions that benefit according to the target-specific
@@ -39,3 +46,5 @@ std::unique_ptr<ScheduleDAGMutation>
createBranchMacroFusionDAGMutation(ShouldSchedulePredTy shouldScheduleAdjacent);
} // end namespace llvm
+
+#endif // LLVM_CODEGEN_MACROFUSION_H