59 Ret +=
"-i1:8:16-i8:8:16";
82 return std::make_unique<TargetLoweringObjectFileGOFF>();
86 return std::make_unique<TargetLoweringObjectFileELF>();
144 std::optional<Reloc::Model> RM,
145 std::optional<CodeModel::Model> CM,
160 Attribute CPUAttr =
F.getFnAttribute(
"target-cpu");
161 Attribute TuneAttr =
F.getFnAttribute(
"tune-cpu");
162 Attribute FSAttr =
F.getFnAttribute(
"target-features");
166 std::string TuneCPU =
174 bool SoftFloat =
F.getFnAttribute(
"use-soft-float").getValueAsBool();
176 FS += FS.empty() ?
"+soft-float" :
",+soft-float";
177 bool BackChain =
F.hasFnAttribute(
"backchain");
179 FS += FS.empty() ?
"+backchain" :
",+backchain";
181 auto &
I = SubtargetMap[CPU + TuneCPU + FS];
187 I = std::make_unique<SystemZSubtarget>(
TargetTriple, CPU, TuneCPU, FS,
203 return getTM<SystemZTargetMachine>();
209 std::make_unique<SystemZPostRASchedStrategy>(
C),
213 void addIRPasses()
override;
214 bool addInstSelector()
override;
215 bool addILPOpts()
override;
216 void addPreRegAlloc()
override;
217 void addPostRewrite()
override;
218 void addPostRegAlloc()
override;
219 void addPreSched2()
override;
220 void addPreEmitPass()
override;
225void SystemZPassConfig::addIRPasses() {
236bool SystemZPassConfig::addInstSelector() {
245bool SystemZPassConfig::addILPOpts() {
250void SystemZPassConfig::addPreRegAlloc() {
254void SystemZPassConfig::addPostRewrite() {
258void SystemZPassConfig::addPostRegAlloc() {
265void SystemZPassConfig::addPreSched2() {
270void SystemZPassConfig::addPreEmitPass() {
312 return new SystemZPassConfig(*
this, PM);
323 return SystemZMachineFunctionInfo::create<SystemZMachineFunctionInfo>(
#define LLVM_EXTERNAL_VISIBILITY
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static std::string computeDataLayout()
const char LLVMTargetMachineRef TM
static CodeModel::Model getEffectiveSystemZCodeModel(std::optional< CodeModel::Model > CM, Reloc::Model RM, bool JIT)
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSystemZTarget()
static Reloc::Model getEffectiveRelocModel(std::optional< Reloc::Model > RM)
Target-Independent Code Generator Pass Configuration Options pass.
static std::unique_ptr< TargetLoweringObjectFile > createTLOF()
StringRef getValueAsString() const
Return the attribute's value as a string.
bool isValid() const
Return true if the attribute is any kind of attribute.
Allocate memory in an ever growing pool, as if by bump-pointer.
static const char * getManglingComponent(const Triple &T)
This class describes a target machine that is implemented with the LLVM target-independent code gener...
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A ScheduleDAG for scheduling lists of MachineInstr.
ScheduleDAGMI is an implementation of ScheduleDAGInstrs that simply schedules machine instructions ac...
StringRef - Represent a constant reference to a string, i.e.
std::string str() const
str - Get the contents as an std::string.
const SystemZSubtarget * getSubtargetImpl() const =delete
SystemZTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, std::optional< Reloc::Model > RM, std::optional< CodeModel::Model > CM, CodeGenOptLevel OL, bool JIT)
TargetTransformInfo getTargetTransformInfo(const Function &F) const override
Get a TargetTransformInfo implementation for the target.
MachineFunctionInfo * createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F, const TargetSubtargetInfo *STI) const override
Create the target's instance of MachineFunctionInfo.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
~SystemZTargetMachine() override
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with.
std::unique_ptr< const MCSubtargetInfo > STI
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
Target-Independent Code Generator Pass Configuration Options.
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
TargetSubtargetInfo - Generic base class for all target subtargets.
Target - Wrapper for Target specific information.
Triple - Helper class for working with autoconf configuration names.
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
Target & getTheSystemZTarget()
void initializeSystemZElimComparePass(PassRegistry &)
FunctionPass * createSystemZLongBranchPass(SystemZTargetMachine &TM)
FunctionPass * createSystemZISelDag(SystemZTargetMachine &TM, CodeGenOptLevel OptLevel)
FunctionPass * createAtomicExpandPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
FunctionPass * createSystemZCopyPhysRegsPass(SystemZTargetMachine &TM)
FunctionPass * createSystemZElimComparePass(SystemZTargetMachine &TM)
void initializeSystemZDAGToDAGISelPass(PassRegistry &)
char & PostMachineSchedulerID
PostMachineScheduler - This pass schedules machine instructions postRA.
void initializeSystemZLongBranchPass(PassRegistry &)
void initializeSystemZShortenInstPass(PassRegistry &)
FunctionPass * createSystemZTDCPass()
FunctionPass * createLoopDataPrefetchPass()
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
FunctionPass * createSystemZShortenInstPass(SystemZTargetMachine &TM)
void initializeSystemZPostRewritePass(PassRegistry &)
CodeGenOptLevel
Code generation optimization level.
void initializeSystemZTDCPassPass(PassRegistry &)
FunctionPass * createSystemZLDCleanupPass(SystemZTargetMachine &TM)
char & EarlyIfConverterID
EarlyIfConverter - This pass performs if-conversion on SSA form by inserting cmov instructions.
FunctionPass * createSystemZPostRewritePass(SystemZTargetMachine &TM)
char & IfConverterID
IfConverter - This pass performs machine code if conversion.
void initializeSystemZLDCleanupPass(PassRegistry &)
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...
RegisterTargetMachine - Helper template for registering a target machine implementation,...