diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:04 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-11 12:38:11 +0000 |
| commit | e3b557809604d036af6e00c60f012c2025b59a5e (patch) | |
| tree | 8a11ba2269a3b669601e2fd41145b174008f4da8 /llvm/lib/Target/ARC/ARCTargetMachine.cpp | |
| parent | 08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff) | |
Diffstat (limited to 'llvm/lib/Target/ARC/ARCTargetMachine.cpp')
| -rw-r--r-- | llvm/lib/Target/ARC/ARCTargetMachine.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARC/ARCTargetMachine.cpp b/llvm/lib/Target/ARC/ARCTargetMachine.cpp index 21757927d873..2527d6aad9ca 100644 --- a/llvm/lib/Target/ARC/ARCTargetMachine.cpp +++ b/llvm/lib/Target/ARC/ARCTargetMachine.cpp @@ -11,16 +11,18 @@ #include "ARCTargetMachine.h" #include "ARC.h" +#include "ARCMachineFunctionInfo.h" #include "ARCTargetTransformInfo.h" #include "TargetInfo/ARCTargetInfo.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" #include "llvm/CodeGen/TargetPassConfig.h" #include "llvm/MC/TargetRegistry.h" +#include <optional> using namespace llvm; -static Reloc::Model getRelocModel(Optional<Reloc::Model> RM) { +static Reloc::Model getRelocModel(std::optional<Reloc::Model> RM) { return RM.value_or(Reloc::Static); } @@ -28,8 +30,8 @@ static Reloc::Model getRelocModel(Optional<Reloc::Model> RM) { ARCTargetMachine::ARCTargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, - Optional<Reloc::Model> RM, - Optional<CodeModel::Model> CM, + std::optional<Reloc::Model> RM, + std::optional<CodeModel::Model> CM, CodeGenOpt::Level OL, bool JIT) : LLVMTargetMachine(T, "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-" @@ -78,9 +80,17 @@ void ARCPassConfig::addPreRegAlloc() { addPass(createARCOptAddrMode()); } +MachineFunctionInfo *ARCTargetMachine::createMachineFunctionInfo( + BumpPtrAllocator &Allocator, const Function &F, + const TargetSubtargetInfo *STI) const { + return ARCFunctionInfo::create<ARCFunctionInfo>(Allocator, F, STI); +} + // Force static initialization. extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeARCTarget() { RegisterTargetMachine<ARCTargetMachine> X(getTheARCTarget()); + PassRegistry &PR = *PassRegistry::getPassRegistry(); + initializeARCDAGToDAGISelPass(PR); } TargetTransformInfo |
