47 Ret +=
"-f128:64-n32";
73 bool Is64Bit,
bool JIT) {
109 Attribute CPUAttr =
F.getFnAttribute(
"target-cpu");
110 Attribute FSAttr =
F.getFnAttribute(
"target-features");
121 F.hasFnAttribute(
"use-soft-float") &&
122 F.getFnAttribute(
"use-soft-float").getValueAsString() ==
"true";
125 FS +=
FS.empty() ?
"+soft-float" :
",+soft-float";
127 auto &
I = SubtargetMap[CPU +
FS];
147 return getTM<SparcTargetMachine>();
150 void addIRPasses()
override;
151 bool addInstSelector()
override;
152 void addPreEmitPass()
override;
157 return new SparcPassConfig(*
this, PM);
160 void SparcPassConfig::addIRPasses() {
166 bool SparcPassConfig::addInstSelector() {
171 void SparcPassConfig::addPreEmitPass(){
174 if (this->getSparcTargetMachine().getSubtargetImpl()->insertNOPLoad())
178 if (this->getSparcTargetMachine().getSubtargetImpl()->detectRoundChange()) {
181 if (this->getSparcTargetMachine().getSubtargetImpl()->fixAllFDIVSQRT())
187 void SparcV8TargetMachine::anchor() { }
197 void SparcV9TargetMachine::anchor() { }
207 void SparcelTargetMachine::anchor() {}
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
This class represents lattice values for constants.
FunctionPass * createSparcDelaySlotFillerPass()
createSparcDelaySlotFillerPass - Returns a pass that fills in delay slots in Sparc MachineFunctions
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.
SparcelTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT)
SparcV8TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT)
const SparcSubtarget * getSubtargetImpl() const
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml", "ocaml 3.10-compatible collector")
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
Target-Independent Code Generator Pass Configuration Options.
RegisterTargetMachine - Helper template for registering a target machine implementation,...
Target & getTheSparcTarget()
static CodeModel::Model getEffectiveSparcCodeModel(Optional< CodeModel::Model > CM, Reloc::Model RM, bool Is64Bit, bool JIT)
bool isValid() const
Return true if the attribute is any kind of attribute.
static Reloc::Model getEffectiveRelocModel(Optional< Reloc::Model > RM)
Target & getTheSparcelTarget()
This class describes a target machine that is implemented with the LLVM target-independent code gener...
FunctionPass * createSparcISelDag(SparcTargetMachine &TM)
createSparcISelDag - This pass converts a legalized DAG into a SPARC-specific DAG,...
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 ...
SparcTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT, bool is64bit)
Create an ILP32 architecture model.
#define LLVM_EXTERNAL_VISIBILITY
Target - Wrapper for Target specific information.
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeSparcTarget()
Target & getTheSparcV9Target()
static std::string computeDataLayout(const Triple &T, bool is64Bit)
StringRef getValueAsString() const
Return the attribute's value as a string.
~SparcTargetMachine() override
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
SparcV9TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT)
StringRef - Represent a constant reference to a string, i.e.
FunctionPass * createAtomicExpandPass()
static bool is64Bit(const char *name)