blob: 77183ece7b9f33a094f8fccdd396c4e517ff0a6f [file] [log] [blame]
Reed Kotlerfe94cc32013-04-10 16:58:04 +00001//===---- MipsOs16.h for Mips Option -Os16 --------===//
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// This file defines an optimization phase for the MIPS target.
11//
12//===----------------------------------------------------------------------===//
13
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000014#ifndef LLVM_LIB_TARGET_MIPS_MIPSOS16_H
15#define LLVM_LIB_TARGET_MIPS_MIPSOS16_H
16
Reed Kotlerfe94cc32013-04-10 16:58:04 +000017#include "MCTargetDesc/MipsMCTargetDesc.h"
18#include "MipsTargetMachine.h"
19#include "llvm/Pass.h"
20#include "llvm/Target/TargetMachine.h"
21
Reed Kotlerfe94cc32013-04-10 16:58:04 +000022using namespace llvm;
23
24namespace llvm {
25
26class MipsOs16 : public ModulePass {
27
28public:
29 static char ID;
30
31 MipsOs16() : ModulePass(ID) {
32
33 }
34
Craig Topper56c590a2014-04-29 07:58:02 +000035 const char *getPassName() const override {
Reed Kotlerfe94cc32013-04-10 16:58:04 +000036 return "MIPS Os16 Optimization";
37 }
38
Craig Topper56c590a2014-04-29 07:58:02 +000039 bool runOnModule(Module &M) override;
Reed Kotlerfe94cc32013-04-10 16:58:04 +000040
41};
42
43ModulePass *createMipsOs16(MipsTargetMachine &TM);
44
45}
46
47#endif