31 cl::desc(
"Inhibit optimization of S->D register accesses on A15"),
36 cl::desc(
"Run SimplifyCFG after expanding atomic operations"
37 " to make use of cmpxchg flow-based information"),
42 cl::desc(
"Enable ARM load/store optimization pass"),
48 cl::desc(
"Enable the global merge pass"));
60 return make_unique<TargetLoweringObjectFileMachO>();
62 return make_unique<TargetLoweringObjectFileCOFF>();
63 return make_unique<ARMElfTargetObjectFile>();
75 "Unknown target-abi option!");
121 std::string
Ret =
"";
147 Ret +=
"-v64:32:64-v128:32:128";
149 Ret +=
"-v128:64:128";
178 CPU, FS, Options, RM, CM, OL),
181 Subtarget(TT, CPU, FS, *this, isLittle), isLittle(isLittle) {
214 FS += FS.
empty() ?
"+soft-float" :
",+soft-float";
233 void ARMTargetMachine::anchor() { }
244 "support ARM mode execution!");
247 void ARMLETargetMachine::anchor() { }
256 void ARMBETargetMachine::anchor() { }
265 void ThumbTargetMachine::anchor() { }
276 void ThumbLETargetMachine::anchor() { }
285 void ThumbBETargetMachine::anchor() { }
302 return getTM<ARMBaseTargetMachine>();
305 void addIRPasses()
override;
306 bool addPreISel()
override;
307 bool addInstSelector()
override;
308 void addPreRegAlloc()
override;
309 void addPreSched2()
override;
310 void addPreEmitPass()
override;
315 return new ARMPassConfig(
this, PM);
318 void ARMPassConfig::addIRPasses() {
330 return ST.hasAnyDataBarrier() && !
ST.isThumb1Only();
340 bool ARMPassConfig::addPreISel() {
357 bool ARMPassConfig::addInstSelector() {
360 if (
TM->getTargetTriple().isOSBinFormatELF() &&
TM->Options.EnableFastISel)
365 void ARMPassConfig::addPreRegAlloc() {
377 void ARMPassConfig::addPreSched2() {
402 void ARMPassConfig::addPreEmitPass() {
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
static ARMBaseTargetMachine::ARMABI computeTargetABI(const Triple &TT, StringRef CPU, const TargetOptions &Options)
ThumbTargetMachine - Thumb target machine.
FunctionPass * createA15SDOptimizerPass()
FunctionPass * createMLxExpansionPass()
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
TargetIRAnalysis getTargetIRAnalysis() override
Get the TargetIRAnalysis for this target.
MCTargetOptions MCOptions
Machine level options.
const std::string & getCPUString() const
FunctionPass * createARMGlobalBaseRegPass()
virtual void addIRPasses()
Add common target configurable passes that perform LLVM IR to IR transforms following machine indepen...
static cl::opt< bool > EnableARMLoadStoreOpt("arm-load-store-opt", cl::Hidden, cl::desc("Enable ARM load/store optimization pass"), cl::init(true))
Triple TargetTriple
Triple string, CPU name, and target feature strings the TargetMachine instance is created with...
FunctionPass * createARMExpandPseudoPass()
createARMExpandPseudoPass - returns an instance of the pseudo instruction expansion pass...
Analysis pass providing the TargetTransformInfo.
FunctionPass * createInterleavedAccessPass(const TargetMachine *TM)
InterleavedAccess Pass - This pass identifies and matches interleaved memory accesses to target speci...
std::string str() const
str - Get the contents as an std::string.
FunctionPass * createARMOptimizeBarriersPass()
createARMOptimizeBarriersPass - Returns an instance of the remove double barriers pass...
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
static std::unique_ptr< TargetLoweringObjectFile > createTLOF(const Triple &TT)
bool hasAttribute(AttrKind Val) const
Return true if the attribute is present.
static const char * getManglingComponent(const Triple &T)
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(const char *reason, bool gen_crash_diag=true)
Reports a serious error, calling any installed error handler.
bool isOSWindows() const
Tests whether the OS is Windows.
ThumbBETargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
FunctionPass * createAtomicExpandPass(const TargetMachine *TM)
No attributes have been set.
Target-Independent Code Generator Pass Configuration Options.
FunctionPass * createARMConstantIslandPass()
createARMConstantIslandPass - returns an instance of the constpool island pass.
void LLVMInitializeARMTarget()
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
FunctionPass * createIfConverter(std::function< bool(const Function &)> Ftor)
StringMap< std::unique_ptr< ARMSubtarget > > SubtargetMap
static std::string computeDataLayout(const Triple &TT, StringRef CPU, const TargetOptions &Options, bool isLittle)
ARMBaseTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle)
TargetMachine ctor - Create an ARM architecture model.
initializer< Ty > init(const Ty &Val)
static cl::opt< bool > DisableA15SDOptimization("disable-a15-sd-optimization", cl::Hidden, cl::desc("Inhibit optimization of S->D register accesses on A15"), cl::init(false))
bool isTargetHardFloat() const
const ARMSubtarget * getSubtargetImpl() const
FunctionPass * createCFGSimplificationPass(int Threshold=-1, std::function< bool(const Function &)> Ftor=nullptr)
ARMBETargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
FunctionPass * createUnpackMachineBundles(std::function< bool(const Function &)> Ftor)
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...
ThumbLETargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
static cl::opt< cl::boolOrDefault > EnableGlobalMerge("arm-global-merge", cl::Hidden, cl::desc("Enable the global merge pass"))
Triple - Helper class for working with autoconf configuration names.
FunctionPass * createARMLoadStoreOptimizationPass(bool PreAlloc=false)
Returns an instance of the load / store optimization pass.
ARMTargetMachine - ARM target machine.
bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
FunctionPass * createExecutionDependencyFixPass(const TargetRegisterClass *RC)
createExecutionDependencyFixPass - This pass fixes execution time problems with dependent instruction...
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
Pass * createLowerAtomicPass()
ARMTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle)
Target - Wrapper for Target specific information.
ThumbTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle)
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
StringRef getABIName() const
getABIName - If this returns a non-empty string this represents the textual name of the ABI that we w...
~ARMBaseTargetMachine() override
static cl::opt< bool > EnableAtomicTidy("arm-atomic-cfg-tidy", cl::Hidden, cl::desc("Run SimplifyCFG after expanding atomic operations"" to make use of cmpxchg flow-based information"), cl::init(true))
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
FunctionPass * createARMISelDag(ARMBaseTargetMachine &TM, CodeGenOpt::Level OptLevel)
createARMISelDag - This pass converts a legalized DAG into a ARM-specific DAG, ready for instruction ...
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
StringRef getValueAsString() const
Return the attribute's value as a string.
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.
FunctionPass * createThumb2SizeReductionPass(std::function< bool(const Function &)> Ftor=nullptr)
createThumb2SizeReductionPass - Returns an instance of the Thumb2 size reduction pass.
FunctionPass * createThumb2ITBlockPass()
createThumb2ITBlockPass - Returns an instance of the Thumb2 IT blocks insertion pass.
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")
ARMLETargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM, CodeGenOpt::Level OL)
Pass * createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset, bool OnlyOptimizeForSize=false)
bool empty() const
empty - Check if the string is empty.
FloatABI::ABIType FloatABIType
FloatABIType - This setting is set by -float-abi=xxx option is specfied on the command line...