-
Notifications
You must be signed in to change notification settings - Fork 1
/
cbgSubtarget.h
66 lines (56 loc) · 2.61 KB
/
cbgSubtarget.h
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
56
57
58
59
60
61
62
63
64
65
66
//=====-- cbgSubtarget.h - Define Subtarget for the CBG ----*- C++ -*-====//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the CBG specific subclass of TargetSubtarget.
//
//===----------------------------------------------------------------------===//
#ifndef CBG_SUBTARGET_H
#define CBG_SUBTARGET_H
#include "llvm/Target/TargetSubtarget.h"
#include <string>
namespace llvm {
class cbgSubtarget : public TargetSubtarget {
bool HasSelCC; // target supports selCC instructions
bool HasMovCC; // target supports movCC instructions
bool HasPredBlocksCC; // target supports predicated blocks with condition codes
bool HasPredBlocksReg;// target supports predicated blocks
// with own predicate register
bool HasPredInstrCC; // target supports fully predicated instructions with
// condition codes
bool HasPredInstrReg; // target supports fully predicated instructions with
// own predicate register
bool HasHWLoop; // target provides hardware support for single loop
bool HasHWLoops; // target provides hardware support for nested loops
bool HasVLIWIfElse; // target provides hardware support for concurrent
// execution of if and else branch
bool HasHWLoopOpt; // compiler does not optimize hardware loop assembler code
public:
cbgSubtarget(const std::string &TT, const std::string &FS);
bool hasSelCC() const { return HasSelCC; }
bool hasMovCC() const { return HasMovCC; }
bool hasPredBlocksCC() const { return HasPredBlocksCC; }
bool hasPredBlocksReg() const { return HasPredBlocksReg; }
bool hasPredInstrCC() const { return HasPredInstrCC; }
bool hasPredInstrReg() const { return HasPredInstrReg; }
bool hasHWLoop() const { return HasHWLoop; }
bool hasHWLoops() const { return HasHWLoops; }
bool hasHWLoopOpt() const {return HasHWLoopOpt; }
bool hasVLIWIfElse() const { return HasVLIWIfElse; }
/// ParseSubtargetFeatures - Parses features string setting specified
/// subtarget options. Definition of function is auto generated by tblgen.
std::string ParseSubtargetFeatures(const std::string &FS,
const std::string &CPU);
std::string getDataLayout() const {
const char *p;
p = "E-p:32:32:32-i64:64:64-f64:64:64-f128:64:64-n32";
return std::string(p);
}
};
} // end namespace llvm
#endif