Primary interface to the complete machine description for the target machine. All target‐specific information should be accessible through this interface.
Synopsis
Declared in <llvm/Target/TargetMachine.h>
class TargetMachine;
Member Functions
Name |
Description |
|
Copy constructor |
|
Destructor |
|
|
|
Adds an AsmPrinter pass to the pipeline that prints assembly or machine code from the MI representation. |
|
Add passes to the specified pass manager to get the specified file emitted. Typically this will involve several steps of code generation. This method should return true if emission of this file type is not supported, or false on success. |
|
Add passes to the specified pass manager to get machine code emitted with the MCJIT. This method returns true if machine code is not supported. It fills the MCContext Ctx pointer which can be used to build custom MCStreamer. |
|
|
|
Returns whether the backend can lower the llvm.cond.loop intrinsic. If this function returns false, the intrinsic will be supported generically but without loop detection support. |
|
Remove all Linker Optimization Hints (LOH) associated with instructions in |
|
Allocate and initialize an instance of the YAML representation of the MachineFunctionInfo. |
Create a DataLayout. |
|
|
Allocate and return a default initialized instance of the YAML representation for the MachineFunctionInfo. |
|
|
|
Create the target's instance of MachineFunctionInfo |
|
Create an instance of ScheduleDAGInstrs to be run within the standard MachineScheduler pass for this function and target at the current optimization level. |
|
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of CodeGen passes. |
|
Similar to createMachineScheduler but used when postRA machine scheduling is enabled. |
|
getAddressSpaceForPseudoSourceKind ‐ Given the kind of memory (e.g. stack) the target returns the corresponding address space. |
|
If the specified generic pointer could be assumed as a pointer to a specific address space, return that address space. |
Get the list of functions and basic block ids that need unique sections. |
|
If basic blocks should be emitted into their own section, corresponding to ‐fbasic‐block‐sections. |
|
Returns the code model. The choices are small, kernel, medium, large, and target default. |
|
Return true if data objects should be emitted into their own section, corresponds to ‐fdata‐sections. |
|
Return the ExceptionHandling to use, considering TargetOptions and the Triple's default. |
|
Return true if functions should be emitted into their own section, corresponding to ‐ffunction‐sections. |
|
Return true if visibility attribute should not be emitted in XCOFF, corresponding to ‐mignore‐xcoff‐visibility. |
|
Return target specific asm information. |
|
Get the MCSubtargetInfo for the given target CPU and target features. For use in contexts where a feature‐specific MC subtarget is needed, but no MachineFunctionis available, such as for module‐level inline assembly. |
|
Returns the maximum code size possible under the code model. |
|
|
|
Returns the optimization level: None, Less, Default, or Aggressive. |
|
Get the pointer size for this target. |
|
|
If the specified predicate checks whether a generic pointer falls within a specified address space, return that generic pointer and the address space being queried. |
Returns the code generation relocation model. The choices are static, PIC, and dynamic‐no‐pic, and target default. |
|
|
|
This method returns a pointer to the specified type of TargetSubtargetInfo. In debug builds, it verifies that the object being returned is of the correct type. |
|
|
Virtual method implemented by subclasses that returns a reference to that target's TargetSubtargetInfo‐derived member variable. |
Returns the TLS model which should be used for the given global variable. |
|
Returns the effective target ABI name: the "target‐abi" module flag if present, otherwise the ‐target‐abi option. This is a pure query; call verifyOptionsConsistency once per module to diagnose a conflict. |
|
Get a |
|
|
Return a TargetTransformInfo for a given function. |
Return true if unique basic block section names must be generated. |
|
Return true if XCOFF traceback table should be emitted, corresponding to ‐xcoff‐traceback‐table. |
|
Test if a DataLayout if compatible with the CodeGen for this target. |
|
|
Returns true if the target is expected to pass all machine verifier checks. This is a stopgap measure to fix targets one by one. We will remove this at some point and always enable the verifier when EXPENSIVE_CHECKS is enabled. |
|
Returns true if a cast between SrcAS and DestAS is a noop. |
|
Parse out the target's MachineFunctionInfo from the YAML reprsentation. |
|
Allow the target to register alias analyses with the AAManager for use with the new pass manager. Only affects the "default" AAManager. |
|
Allow the target to register early alias analyses (AA before BasicAA) with the AAManager for use with the new pass manager. Only affects the "default" AAManager. |
|
|
|
Allow the target to modify the pass pipeline. |
Set the code model. |
|
Overrides the optimization level. |
|
|
Returns true if frontends should default to using the NewPM for this specific target. |
|
Entry point for module splitting. Targets can implement custom module splitting logic, mainly used by LTO for ‐‐lto‐partitions. |
|
True if subtarget inserts the final scheduling pass on its own. |
|
The default variant to use in unqualified |
Returns true if this target uses emulated TLS. |
|
|
True if the target wants to use interprocedural register allocation by default. The ‐enable‐ipra flag can be used to override this. |
Returns true if this target uses TLS Descriptors. |
|
|
True if the target uses physical regs (as nearly all targets do). False for stack machines such as WebAssembly and other virtual‐register machines. If true, all vregs must be allocated before PEI. If false, then callee‐save register spilling and scavenging are not needed or used. If false, implicitly defined registers will still be assumed to be physical registers, except that variadic defs will be allocated vregs. |
Diagnoses command‐line codegen options that conflict with the corresponding module flags (e.g. ‐target‐abi vs the "target‐abi" module flag). Intended to be called once per module. |
Static Member Functions
Name |
Data Members
Name |
Static Data Members
Name |
Description |
The integer bit size to use for SjLj based exception handling. |
Protected Member Functions
Name |
|
Protected Data Members
Name |
Description |
Contains target specific asm information. |
|
DataLayout for the target: keep ABI type size and alignment. |
|
MC subtarget keyed by target features and target CPU. |
|
Triple string, CPU name, and target feature strings the TargetMachine instance is created with. |
|
The Target that this machine was created for. |
Non-Member Functions
Name |
Description |
This pass implements generation of target‐specific intrinsics to support handling of complex number arithmetic |
|
GlobalMerge ‐ This pass merges internal (by default) globals into structs to enable reuse of a base pointer by indexed addressing modes. It can also be configured to focus on size optimizations only. |
|
createSjLjEHPreparePass ‐ This pass adapts exception handling code to use the GCC‐style builtin setjmp/longjmp (sjlj) to handling EH control flow. |
Derived Classes
Name |
Description |
implements a set of functionality in the |
Created with MrDocs