aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/include/llvm/Target/TargetMachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/Target/TargetMachine.h')
-rw-r--r--contrib/llvm-project/llvm/include/llvm/Target/TargetMachine.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/Target/TargetMachine.h b/contrib/llvm-project/llvm/include/llvm/Target/TargetMachine.h
index acfb265a9ff9..bf37ad7010ec 100644
--- a/contrib/llvm-project/llvm/include/llvm/Target/TargetMachine.h
+++ b/contrib/llvm-project/llvm/include/llvm/Target/TargetMachine.h
@@ -18,7 +18,6 @@
#include "llvm/ADT/Triple.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/PassManager.h"
-#include "llvm/Pass.h"
#include "llvm/Support/CodeGen.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/PGOOptions.h"
@@ -30,8 +29,6 @@
namespace llvm {
class AAManager;
-template <typename IRUnitT, typename AnalysisManagerT, typename... ExtraArgTs>
-class PassManager;
using ModulePassManager = PassManager<Module>;
class Function;
@@ -225,7 +222,10 @@ public:
/// Returns the code model. The choices are small, kernel, medium, large, and
/// target default.
- CodeModel::Model getCodeModel() const;
+ CodeModel::Model getCodeModel() const { return CMModel; }
+
+ /// Set the code model.
+ void setCodeModel(CodeModel::Model CM) { CMModel = CM; }
bool isPositionIndependent() const;
@@ -260,6 +260,8 @@ public:
Options.SupportsDebugEntryValues = Enable;
}
+ void setCFIFixup(bool Enable) { Options.EnableCFIFixup = Enable; }
+
bool getAIXExtendedAltivecABI() const {
return Options.EnableAIXExtendedAltivecABI;
}
@@ -337,13 +339,13 @@ public:
/// This is used to construct the new pass manager's target IR analysis pass,
/// set up appropriately for this target machine. Even the old pass manager
/// uses this to answer queries about the IR.
- TargetIRAnalysis getTargetIRAnalysis();
+ TargetIRAnalysis getTargetIRAnalysis() const;
/// Return a TargetTransformInfo for a given function.
///
/// The returned TargetTransformInfo is specialized to the subtarget
/// corresponding to \p F.
- virtual TargetTransformInfo getTargetTransformInfo(const Function &F);
+ virtual TargetTransformInfo getTargetTransformInfo(const Function &F) const;
/// Allow the target to modify the pass manager, e.g. by calling
/// PassManagerBuilder::addExtension.
@@ -398,6 +400,12 @@ public:
virtual unsigned getSjLjDataSize() const { return DefaultSjLjDataSize; }
static std::pair<int, int> parseBinutilsVersion(StringRef Version);
+
+ /// getAddressSpaceForPseudoSourceKind - Given the kind of memory
+ /// (e.g. stack) the target returns the corresponding address space.
+ virtual unsigned getAddressSpaceForPseudoSourceKind(unsigned Kind) const {
+ return 0;
+ }
};
/// This class describes a target machine that is implemented with the LLVM
@@ -417,7 +425,7 @@ public:
///
/// The TTI returned uses the common code generator to answer queries about
/// the IR.
- TargetTransformInfo getTargetTransformInfo(const Function &F) override;
+ TargetTransformInfo getTargetTransformInfo(const Function &F) const override;
/// Create a pass configuration object to be used by addPassToEmitX methods
/// for generating a pipeline of CodeGen passes.