xref: /freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.h (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1 //===-- llvm/Target/AMDGPU/AMDGPUMIRFormatter.h -----------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6 // See https://llvm.org/LICENSE.txt for license information.
7 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //
9 //===----------------------------------------------------------------------===//
10 //
11 /// \file
12 /// AMDGPU specific overrides of MIRFormatter.
13 //
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_LIB_TARGET_AMDGPUMIRFORMATTER_H
17 #define LLVM_LIB_TARGET_AMDGPUMIRFORMATTER_H
18 
19 #include "llvm/CodeGen/MIRFormatter.h"
20 
21 namespace llvm {
22 
23 class MachineFunction;
24 struct PerFunctionMIParsingState;
25 
26 class AMDGPUMIRFormatter final : public MIRFormatter {
27 public:
28   AMDGPUMIRFormatter() = default;
29   virtual ~AMDGPUMIRFormatter() = default;
30 
31   /// Implement target specific parsing of target custom pseudo source value.
32   bool
33   parseCustomPseudoSourceValue(StringRef Src, MachineFunction &MF,
34                                PerFunctionMIParsingState &PFS,
35                                const PseudoSourceValue *&PSV,
36                                ErrorCallbackType ErrorCallback) const override;
37 };
38 
39 } // end namespace llvm
40 
41 #endif
42