~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/Target/ARM/ARMTargetMachine.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- ARMTargetMachine.h - Define TargetMachine for ARM -------*- C++ -*-===//
 
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 declares the ARM specific subclass of TargetMachine.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef ARMTARGETMACHINE_H
 
15
#define ARMTARGETMACHINE_H
 
16
 
 
17
#include "llvm/Target/TargetMachine.h"
 
18
#include "llvm/Target/TargetData.h"
 
19
#include "ARMInstrInfo.h"
 
20
#include "ARMFrameInfo.h"
 
21
#include "ARMJITInfo.h"
 
22
#include "ARMSubtarget.h"
 
23
#include "ARMISelLowering.h"
 
24
#include "Thumb1InstrInfo.h"
 
25
#include "Thumb2InstrInfo.h"
 
26
 
 
27
namespace llvm {
 
28
 
 
29
class ARMBaseTargetMachine : public LLVMTargetMachine {
 
30
protected:
 
31
  ARMSubtarget        Subtarget;
 
32
 
 
33
private:
 
34
  ARMFrameInfo        FrameInfo;
 
35
  ARMJITInfo          JITInfo;
 
36
  InstrItineraryData  InstrItins;
 
37
  Reloc::Model        DefRelocModel;    // Reloc model before it's overridden.
 
38
 
 
39
public:
 
40
  ARMBaseTargetMachine(const Target &T, const std::string &TT,
 
41
                       const std::string &FS, bool isThumb);
 
42
 
 
43
  virtual const ARMFrameInfo     *getFrameInfo() const { return &FrameInfo; }
 
44
  virtual       ARMJITInfo       *getJITInfo()         { return &JITInfo; }
 
45
  virtual const ARMSubtarget  *getSubtargetImpl() const { return &Subtarget; }
 
46
  virtual const InstrItineraryData getInstrItineraryData() const {
 
47
    return InstrItins;
 
48
  }
 
49
 
 
50
  // Pass Pipeline Configuration
 
51
  virtual bool addInstSelector(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
 
52
  virtual bool addPreRegAlloc(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
 
53
  virtual bool addPreSched2(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
 
54
  virtual bool addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel);
 
55
  virtual bool addCodeEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
 
56
                              JITCodeEmitter &MCE);
 
57
};
 
58
 
 
59
/// ARMTargetMachine - ARM target machine.
 
60
///
 
61
class ARMTargetMachine : public ARMBaseTargetMachine {
 
62
  ARMInstrInfo        InstrInfo;
 
63
  const TargetData    DataLayout;       // Calculates type size & alignment
 
64
  ARMTargetLowering   TLInfo;
 
65
public:
 
66
  ARMTargetMachine(const Target &T, const std::string &TT,
 
67
                   const std::string &FS);
 
68
 
 
69
  virtual const ARMRegisterInfo  *getRegisterInfo() const {
 
70
    return &InstrInfo.getRegisterInfo();
 
71
  }
 
72
 
 
73
  virtual       ARMTargetLowering *getTargetLowering() const {
 
74
    return const_cast<ARMTargetLowering*>(&TLInfo);
 
75
  }
 
76
 
 
77
  virtual const ARMInstrInfo     *getInstrInfo() const { return &InstrInfo; }
 
78
  virtual const TargetData       *getTargetData() const { return &DataLayout; }
 
79
};
 
80
 
 
81
/// ThumbTargetMachine - Thumb target machine.
 
82
/// Due to the way architectures are handled, this represents both
 
83
///   Thumb-1 and Thumb-2.
 
84
///
 
85
class ThumbTargetMachine : public ARMBaseTargetMachine {
 
86
  ARMBaseInstrInfo    *InstrInfo;   // either Thumb1InstrInfo or Thumb2InstrInfo
 
87
  const TargetData    DataLayout;   // Calculates type size & alignment
 
88
  ARMTargetLowering   TLInfo;
 
89
public:
 
90
  ThumbTargetMachine(const Target &T, const std::string &TT,
 
91
                     const std::string &FS);
 
92
 
 
93
  /// returns either Thumb1RegisterInfo or Thumb2RegisterInfo
 
94
  virtual const ARMBaseRegisterInfo *getRegisterInfo() const {
 
95
    return &InstrInfo->getRegisterInfo();
 
96
  }
 
97
 
 
98
  virtual ARMTargetLowering *getTargetLowering() const {
 
99
    return const_cast<ARMTargetLowering*>(&TLInfo);
 
100
  }
 
101
 
 
102
  /// returns either Thumb1InstrInfo or Thumb2InstrInfo
 
103
  virtual const ARMBaseInstrInfo *getInstrInfo() const { return InstrInfo; }
 
104
  virtual const TargetData       *getTargetData() const { return &DataLayout; }
 
105
};
 
106
 
 
107
} // end namespace llvm
 
108
 
 
109
#endif