[AMDGPU] Check for immediate SrcC in mfma in AsmParser
[llvm-core.git] / lib / Target / XCore / XCoreTargetMachine.h
blob9c3bdcf78f9c437e8c54076a572ca33c74cde173
1 //===-- XCoreTargetMachine.h - Define TargetMachine for XCore ---*- 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 XCore specific subclass of TargetMachine.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H
14 #define LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H
16 #include "XCoreSubtarget.h"
17 #include "llvm/ADT/Optional.h"
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/Analysis/TargetTransformInfo.h"
20 #include "llvm/Support/CodeGen.h"
21 #include "llvm/Target/TargetMachine.h"
22 #include <memory>
24 namespace llvm {
26 class XCoreTargetMachine : public LLVMTargetMachine {
27 std::unique_ptr<TargetLoweringObjectFile> TLOF;
28 XCoreSubtarget Subtarget;
30 public:
31 XCoreTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
32 StringRef FS, const TargetOptions &Options,
33 Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
34 CodeGenOpt::Level OL, bool JIT);
35 ~XCoreTargetMachine() override;
37 const XCoreSubtarget *getSubtargetImpl() const { return &Subtarget; }
38 const XCoreSubtarget *getSubtargetImpl(const Function &) const override {
39 return &Subtarget;
42 // Pass Pipeline Configuration
43 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
45 TargetTransformInfo getTargetTransformInfo(const Function &F) override;
47 TargetLoweringObjectFile *getObjFileLowering() const override {
48 return TLOF.get();
52 } // end namespace llvm
54 #endif // LLVM_LIB_TARGET_XCORE_XCORETARGETMACHINE_H