/src/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMIRFormatter.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | //===- AMDGPUMIRFormatter.cpp ---------------------------------------------===// |
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 | | /// \file |
10 | | /// Implementation of AMDGPU overrides of MIRFormatter. |
11 | | // |
12 | | //===----------------------------------------------------------------------===// |
13 | | |
14 | | #include "AMDGPUMIRFormatter.h" |
15 | | #include "GCNSubtarget.h" |
16 | | #include "SIMachineFunctionInfo.h" |
17 | | |
18 | | using namespace llvm; |
19 | | |
20 | | bool AMDGPUMIRFormatter::parseCustomPseudoSourceValue( |
21 | | StringRef Src, MachineFunction &MF, PerFunctionMIParsingState &PFS, |
22 | 0 | const PseudoSourceValue *&PSV, ErrorCallbackType ErrorCallback) const { |
23 | 0 | SIMachineFunctionInfo *MFI = MF.getInfo<SIMachineFunctionInfo>(); |
24 | 0 | const AMDGPUTargetMachine &TM = |
25 | 0 | static_cast<const AMDGPUTargetMachine &>(MF.getTarget()); |
26 | 0 | if (Src == "GWSResource") { |
27 | 0 | PSV = MFI->getGWSPSV(TM); |
28 | 0 | return false; |
29 | 0 | } |
30 | 0 | llvm_unreachable("unknown MIR custom pseudo source value"); |
31 | 0 | } |