[x86] fix assert with horizontal math + broadcast of vector (PR43402)
[llvm-core.git] / lib / Target / MSP430 / MSP430TargetMachine.h
blob96fbc3ba03779b04803586a7acec84303472a5d9
1 //===-- MSP430TargetMachine.h - Define TargetMachine for MSP430 -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the MSP430 specific subclass of TargetMachine.
11 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H
17 #include "MSP430Subtarget.h"
18 #include "llvm/CodeGen/TargetFrameLowering.h"
19 #include "llvm/Target/TargetMachine.h"
21 namespace llvm {
23 /// MSP430TargetMachine
24 ///
25 class MSP430TargetMachine : public LLVMTargetMachine {
26 std::unique_ptr<TargetLoweringObjectFile> TLOF;
27 MSP430Subtarget Subtarget;
29 public:
30 MSP430TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
31 StringRef FS, const TargetOptions &Options,
32 Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
33 CodeGenOpt::Level OL, bool JIT);
34 ~MSP430TargetMachine() override;
36 const MSP430Subtarget *getSubtargetImpl(const Function &F) const override {
37 return &Subtarget;
39 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
41 TargetLoweringObjectFile *getObjFileLowering() const override {
42 return TLOF.get();
44 }; // MSP430TargetMachine.
46 } // end namespace llvm
48 #endif