34 "systemz-machine-combiner",
35 cl::desc(
"Enable the machine combiner pass"),
64 if (TT.isArch64Bit()) {
73 Ret +=
"-i1:8:16-i8:8:16";
96 return std::make_unique<TargetLoweringObjectFileGOFF>();
100 return std::make_unique<SystemZELFTargetObjectFile>();
158 std::optional<Reloc::Model> RM,
159 std::optional<CodeModel::Model> CM,
174 Attribute CPUAttr =
F.getFnAttribute(
"target-cpu");
175 Attribute TuneAttr =
F.getFnAttribute(
"tune-cpu");
176 Attribute FSAttr =
F.getFnAttribute(
"target-features");
180 std::string TuneCPU =
188 bool SoftFloat =
F.getFnAttribute(
"use-soft-float").getValueAsBool();
190 FS += FS.empty() ?
"+soft-float" :
",+soft-float";
191 bool BackChain =
F.hasFnAttribute(
"backchain");
193 FS += FS.empty() ?
"+backchain" :
",+backchain";
195 auto &
I = SubtargetMap[CPU + TuneCPU + FS];
201 I = std::make_unique<SystemZSubtarget>(
TargetTriple, CPU, TuneCPU, FS,
217 return getTM<SystemZTargetMachine>();
223 std::make_unique<SystemZPostRASchedStrategy>(
C),
227 void addIRPasses()
override;
228 bool addInstSelector()
override;
229 bool addILPOpts()
override;
230 void addPreRegAlloc()
override;
231 void addPostRewrite()
override;
232 void addPostRegAlloc()
override;
233 void addPreSched2()
override;
234 void addPreEmitPass()
override;
239void SystemZPassConfig::addIRPasses() {
250bool SystemZPassConfig::addInstSelector() {
259bool SystemZPassConfig::addILPOpts() {
268void SystemZPassConfig::addPreRegAlloc() {
272void SystemZPassConfig::addPostRewrite() {
276void SystemZPassConfig::addPostRegAlloc() {
283void SystemZPassConfig::addPreSched2() {
288void SystemZPassConfig::addPreEmitPass() {
330 return new SystemZPassConfig(*
this, PM);
341 return SystemZMachineFunctionInfo::create<SystemZMachineFunctionInfo>(
#define LLVM_EXTERNAL_VISIBILITY
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static std::string computeDataLayout()
static cl::opt< bool > EnableMachineCombinerPass("ppc-machine-combiner", cl::desc("Enable the machine combiner pass"), cl::init(true), cl::Hidden)
static CodeModel::Model getEffectiveSystemZCodeModel(std::optional< CodeModel::Model > CM, Reloc::Model RM, bool JIT)
static cl::opt< bool > EnableMachineCombinerPass("systemz-machine-combiner", cl::desc("Enable the machine combiner pass"), cl::init(true), cl::Hidden)
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.
initializer< Ty > init(const Ty &Val)
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 * createSystemZCopyPhysRegsPass(SystemZTargetMachine &TM)
FunctionPass * createSystemZElimComparePass(SystemZTargetMachine &TM)
char & PostMachineSchedulerID
PostMachineScheduler - This pass schedules machine instructions postRA.
void initializeSystemZLongBranchPass(PassRegistry &)
void initializeSystemZShortenInstPass(PassRegistry &)
char & MachineCombinerID
This pass performs instruction combining using trace metrics to estimate critical-path and resource d...
void initializeSystemZDAGToDAGISelLegacyPass(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.
FunctionPass * createAtomicExpandLegacyPass()
AtomicExpandPass - At IR level this pass replace atomic instructions with __atomic_* library calls,...
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,...