diff options
Diffstat (limited to 'include/llvm/Target/TargetMachine.h')
| -rw-r--r-- | include/llvm/Target/TargetMachine.h | 31 | 
1 files changed, 20 insertions, 11 deletions
| diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index 933c6c87b0be..5421b22462ae 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -25,6 +25,7 @@  namespace llvm {  class GlobalValue; +class MachineModuleInfo;  class Mangler;  class MCAsmInfo;  class MCContext; @@ -77,7 +78,7 @@ protected: // Can only create subclasses.    std::string TargetFS;    Reloc::Model RM = Reloc::Static; -  CodeModel::Model CMModel = CodeModel::Default; +  CodeModel::Model CMModel = CodeModel::Small;    CodeGenOpt::Level OptLevel = CodeGenOpt::Default;    /// Contains target specific asm information. @@ -222,11 +223,12 @@ public:    /// 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. -  virtual bool addPassesToEmitFile( -      PassManagerBase &, raw_pwrite_stream &, CodeGenFileType, -      bool /*DisableVerify*/ = true, AnalysisID /*StartBefore*/ = nullptr, -      AnalysisID /*StartAfter*/ = nullptr, AnalysisID /*StopBefore*/ = nullptr, -      AnalysisID /*StopAfter*/ = nullptr) { +  /// \p MMI is an optional parameter that, if set to non-nullptr, +  /// will be used to set the MachineModuloInfo for this PM. +  virtual bool addPassesToEmitFile(PassManagerBase &, raw_pwrite_stream &, +                                   CodeGenFileType, +                                   bool /*DisableVerify*/ = true, +                                   MachineModuleInfo *MMI = nullptr) {      return true;    } @@ -257,6 +259,12 @@ public:    /// PEI. If false (virtual-register machines), then callee-save register    /// spilling and scavenging are not needed or used.    virtual bool usesPhysRegsForPEI() const { return true; } + +  /// True if the target wants to use interprocedural register allocation by +  /// default. The -enable-ipra flag can be used to override this. +  virtual bool useIPRA() const { +    return false; +  }  };  /// This class describes a target machine that is implemented with the LLVM @@ -270,6 +278,7 @@ protected: // Can only create subclasses.                      CodeModel::Model CM, CodeGenOpt::Level OL);    void initAsmInfo(); +  public:    /// \brief Get a TargetIRAnalysis implementation for the target.    /// @@ -283,11 +292,11 @@ public:    /// Add passes to the specified pass manager to get the specified file    /// emitted.  Typically this will involve several steps of code generation. -  bool addPassesToEmitFile( -      PassManagerBase &PM, raw_pwrite_stream &Out, CodeGenFileType FileType, -      bool DisableVerify = true, AnalysisID StartBefore = nullptr, -      AnalysisID StartAfter = nullptr, AnalysisID StopBefore = nullptr, -      AnalysisID StopAfter = nullptr) override; +  /// \p MMI is an optional parameter that, if set to non-nullptr, +  /// will be used to set the MachineModuloInfofor this PM. +  bool addPassesToEmitFile(PassManagerBase &PM, raw_pwrite_stream &Out, +                           CodeGenFileType FileType, bool DisableVerify = true, +                           MachineModuleInfo *MMI = nullptr) override;    /// 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 | 
