[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / AMDGPU / MCA / AMDGPUCustomBehaviour.cpp
blob3643b777db599e6060f6d53fb7f64fa9e0d94054
1 //===------------------ AMDGPUCustomBehaviour.cpp ---------------*-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 /// \file
9 ///
10 /// This file implements methods from the AMDGPUCustomBehaviour class.
11 ///
12 //===----------------------------------------------------------------------===//
14 #include "AMDGPUCustomBehaviour.h"
15 #include "MCTargetDesc/AMDGPUMCTargetDesc.h"
16 #include "SIInstrInfo.h"
17 #include "TargetInfo/AMDGPUTargetInfo.h"
18 #include "llvm/Support/TargetRegistry.h"
19 #include "llvm/Support/WithColor.h"
21 namespace llvm {
22 namespace mca {
24 AMDGPUCustomBehaviour::AMDGPUCustomBehaviour(const MCSubtargetInfo &STI,
25 const mca::SourceMgr &SrcMgr,
26 const MCInstrInfo &MCII)
27 : CustomBehaviour(STI, SrcMgr, MCII) {}
29 unsigned
30 AMDGPUCustomBehaviour::checkCustomHazard(ArrayRef<mca::InstRef> IssuedInst,
31 const mca::InstRef &IR) {
32 return 0;
35 } // namespace mca
36 } // namespace llvm
38 using namespace llvm;
39 using namespace mca;
41 static CustomBehaviour *
42 createAMDGPUCustomBehaviour(const MCSubtargetInfo &STI,
43 const mca::SourceMgr &SrcMgr,
44 const MCInstrInfo &MCII) {
45 return new AMDGPUCustomBehaviour(STI, SrcMgr, MCII);
48 static InstrPostProcess *
49 createAMDGPUInstrPostProcess(const MCSubtargetInfo &STI,
50 const MCInstrInfo &MCII) {
51 return new AMDGPUInstrPostProcess(STI, MCII);
54 /// Extern function to initialize the targets for the AMDGPU backend
56 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTargetMCA() {
57 TargetRegistry::RegisterCustomBehaviour(getTheAMDGPUTarget(),
58 createAMDGPUCustomBehaviour);
59 TargetRegistry::RegisterInstrPostProcess(getTheAMDGPUTarget(),
60 createAMDGPUInstrPostProcess);
62 TargetRegistry::RegisterCustomBehaviour(getTheGCNTarget(),
63 createAMDGPUCustomBehaviour);
64 TargetRegistry::RegisterInstrPostProcess(getTheGCNTarget(),
65 createAMDGPUInstrPostProcess);