47 Ret +=
"-f128:64-n32";
73 Subtarget(TT, CPU, FS, *this, is64bit),
is64Bit(is64bit) {
99 FS += FS.
empty() ?
"+soft-float" :
",+soft-float";
101 auto &
I = SubtargetMap[CPU + FS];
107 I = llvm::make_unique<SparcSubtarget>(
TargetTriple, CPU, FS, *
this,
121 return getTM<SparcTargetMachine>();
124 void addIRPasses()
override;
125 bool addInstSelector()
override;
126 void addPreEmitPass()
override;
131 return new SparcPassConfig(
this, PM);
134 void SparcPassConfig::addIRPasses() {
140 bool SparcPassConfig::addInstSelector() {
145 void SparcPassConfig::addPreEmitPass(){
148 if (this->getSparcTargetMachine().getSubtargetImpl()->insertNOPLoad())
152 if (this->getSparcTargetMachine().getSubtargetImpl()->fixFSMULD())
154 addPass(
new FixFSMULD(getSparcTargetMachine()));
156 if (this->getSparcTargetMachine().getSubtargetImpl()->replaceFMULS())
160 if (this->getSparcTargetMachine().getSubtargetImpl()->detectRoundChange()) {
163 if (this->getSparcTargetMachine().getSubtargetImpl()->fixAllFDIVSQRT())
169 void SparcV8TargetMachine::anchor() { }
179 void SparcV9TargetMachine::anchor() { }
189 void SparcelTargetMachine::anchor() {}
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
FunctionPass * createSparcDelaySlotFillerPass(TargetMachine &TM)
createSparcDelaySlotFillerPass - Returns a pass that fills in delay slots in Sparc MachineFunctions ...
void LLVMInitializeSparcTarget()
bool hasAttribute(AttrKind Val) const
Return true if the attribute is present.
FunctionPass * createAtomicExpandPass(const TargetMachine *TM)
No attributes have been set.
Target-Independent Code Generator Pass Configuration Options.
Function Alias Analysis false
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
Target & getTheSparcTarget()
std::enable_if<!std::is_array< T >::value, std::unique_ptr< T > >::type make_unique(Args &&...args)
Constructs a new T() with the given args and returns a unique_ptr<T> which owns the object...
static Reloc::Model getEffectiveRelocModel(Optional< Reloc::Model > RM)
static bool is64Bit(const char *name)
SparcTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool is64bit)
Create an ILP32 architecture model.
Target & getTheSparcelTarget()
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
This class describes a target machine that is implemented with the LLVM target-independent code gener...
SparcelTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)
FunctionPass * createSparcISelDag(SparcTargetMachine &TM)
createSparcISelDag - This pass converts a legalized DAG into a SPARC-specific DAG, ready for instruction scheduling.
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
Triple - Helper class for working with autoconf configuration names.
SparcV8TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)
Target - Wrapper for Target specific information.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
Target & getTheSparcV9Target()
static std::string computeDataLayout(const Triple &T, bool is64Bit)
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
const SparcSubtarget * getSubtargetImpl() const
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
~SparcTargetMachine() override
StringRef getValueAsString() const
Return the attribute's value as a string.
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
RegisterTargetMachine - Helper template for registering a target machine implementation, for use in the target machine initialization function.
StringRef - Represent a constant reference to a string, i.e.
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")
SparcV9TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, CodeModel::Model CM, CodeGenOpt::Level OL)