blob: ca4b0f90c82267f61e20f4eb8a8786e1078f33f0 [file] [log] [blame]
Chris Dewhurst4f7cac32016-05-23 10:56:36 +00001//===------- LeonPasses.h - Define passes specific to LEON ----------------===//
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//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_SPARC_LEON_PASSES_H
14#define LLVM_LIB_TARGET_SPARC_LEON_PASSES_H
15
16#include "llvm/CodeGen/Passes.h"
17#include "llvm/CodeGen/MachineFunctionPass.h"
18#include "llvm/CodeGen/MachineBasicBlock.h"
19
20#include "Sparc.h"
21#include "SparcSubtarget.h"
22
Benjamin Kramer797fb962016-05-27 10:06:27 +000023namespace llvm {
24class LLVM_LIBRARY_VISIBILITY LEONMachineFunctionPass
25 : public MachineFunctionPass {
Chris Dewhurst4f7cac32016-05-23 10:56:36 +000026protected:
27 const SparcSubtarget *Subtarget;
28
29protected:
30 LEONMachineFunctionPass(TargetMachine &tm, char& ID);
31 LEONMachineFunctionPass(char& ID);
32};
33
Benjamin Kramer797fb962016-05-27 10:06:27 +000034class LLVM_LIBRARY_VISIBILITY InsertNOPLoad : public LEONMachineFunctionPass {
Chris Dewhurst4f7cac32016-05-23 10:56:36 +000035public:
36 static char ID;
37
38 InsertNOPLoad(TargetMachine &tm);
39 bool runOnMachineFunction(MachineFunction& MF) override;
40
41 const char *getPassName() const override {
42 return "InsertNOPLoad: Erratum Fix LBR35: insert a NOP instruction after every single-cycle load instruction when the next instruction is another load/store instruction";
43 }
44};
Benjamin Kramer797fb962016-05-27 10:06:27 +000045} // namespace llvm
Chris Dewhurst4f7cac32016-05-23 10:56:36 +000046
47#endif