49 #include "tce_config.h"
54 #include <llvm/Target/TargetLoweringObjectFile.h>
55 #include <llvm/Target/TargetMachine.h>
56 #include <llvm/CodeGen/Passes.h>
57 #include <llvm/IR/LegacyPassManager.h>
58 #include <llvm/Target/TargetOptions.h>
59 #include <llvm/CodeGen/TargetPassConfig.h>
68 RegisterTarget<Triple::tce,
false>
70 "TODO: wonder what this button does");
71 RegisterTarget<Triple::tcele, false>
73 "TCE custom processor (little endian)",
74 "TODO: wonder what this button does");
75 RegisterTarget<Triple::tcele64, false>
76 Z(
TheTCELE64Target,
"tcele64-tut-llvm",
"64-bit TCE custom processor (little endian) ",
77 "TODO: wonder what this button does");
90 "i16:16:32-i32:32:32-i64:32:32-"
91 "f32:32:32-f64:32:32-v64:32:32-"
92 "v128:32:32-v256:32:32-v512:32:32-v1024:32:32-a0:0:32-n32";
94 #if LLVM_HAS_CUSTOM_VECTOR_EXTENSION == 2
96 "i16:16:32-i32:32:32-i64:32:32-"
97 "f32:32:32-f64:32:32-v64:64:64-"
98 "v128:128:128-v256:256:256-v512:512:512-v1024:1024:1024-"
99 "v2048:2048:2048-v4096:4096:4096-a0:0:32-n32";
102 "i16:16:32-i32:32:32-i64:32:32-"
103 "f32:32:32-f64:32:32-v64:64:64-"
104 "v128:128:128-v256:256:256-v512:512:512-v1024:1024:1024-a0:0:32-n32";
108 "i16:16:64-i32:32:64-i64:64:64-"
109 "f32:32:64-f64:64:64-v64:64:64-"
110 "v128:128:128-v256:256:256-v512:512:512-v1024:1024:1024-"
111 "v2048:2048:2048-v4096:4096:4096-a0:0:64-n64";
114 if (TT.getArchName().equals(
"tce"))
117 if (TT.getArchName().equals(
"tcele"))
126 const Target &T,
const Triple& TT,
const llvm::StringRef& CPU,
127 const llvm::StringRef& FS,
const TargetOptions &
Options,
128 Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL) :
135 const Target &T,
const Triple &TT,
const llvm::StringRef& CPU,
136 const llvm::StringRef& FS,
const TargetOptions &
Options,
137 Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
138 CodeGenOpt::Level OL,
bool) :
140 RM?*RM:Reloc::
Model::Static,
141 CM?*CM:CodeModel::Small, OL),
144 TLOF(new TargetLoweringObjectFileELF) {
170 class TCEStubPassConfig :
public TargetPassConfig {
173 : TargetPassConfig(*TM, PM) {}
176 return getTM<TCEStubTargetMachine>();