summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Sparc/SparcV9TargetMachine.h
blob: 4ebd3dc16983fdf45dcae72038891cbfbbc09712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//===-- SparcTargetMachine.h - Define TargetMachine for Sparc ---*- C++ -*-===//
// 
//                     The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
// 
//===----------------------------------------------------------------------===//
// 
// This file declares the top-level UltraSPARC target machine.
//
//===----------------------------------------------------------------------===//

#ifndef SPARC_TARGETMACHINE_H
#define SPARC_TARGETMACHINE_H

#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "SparcInstrInfo.h"
#include "SparcInternals.h"
#include "SparcRegInfo.h"
#include "SparcFrameInfo.h"
#include "SparcJITInfo.h"

namespace llvm {
  class PassManager;
  class IntrinsicLowering;

class SparcTargetMachine : public TargetMachine {
  IntrinsicLowering *IL;
  SparcInstrInfo instrInfo;
  SparcSchedInfo schedInfo;
  SparcRegInfo   regInfo;
  SparcFrameInfo frameInfo;
  SparcCacheInfo cacheInfo;
  SparcJITInfo   jitInfo;
public:
  SparcTargetMachine(IntrinsicLowering *IL);
  ~SparcTargetMachine();
  
  virtual const TargetInstrInfo  &getInstrInfo() const { return instrInfo; }
  virtual const TargetSchedInfo  &getSchedInfo() const { return schedInfo; }
  virtual const TargetRegInfo    &getRegInfo()   const { return regInfo; }
  virtual const TargetFrameInfo  &getFrameInfo() const { return frameInfo; }
  virtual const TargetCacheInfo  &getCacheInfo() const { return cacheInfo; }
  virtual       TargetJITInfo    *getJITInfo()         { return &jitInfo; }

  virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
  virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
                                          MachineCodeEmitter &MCE);
};

} // End llvm namespace

#endif
OpenPOWER on IntegriCloud