LLVM 19.0.0git
AMDGPUCodeGenPassBuilder.cpp
Go to the documentation of this file.
1//===- lib/Target/AMDGPU/AMDGPUCodeGenPassBuilder.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
10#include "AMDGPUISelDAGToDAG.h"
11#include "AMDGPUTargetMachine.h"
13
14using namespace llvm;
15
19 : CodeGenPassBuilder(TM, Opts, PIC) {
21 // Exceptions and StackMaps are not supported, so these passes will never do
22 // anything.
23 // Garbage collection is not supported.
24 disablePass<StackMapLivenessPass, FuncletLayoutPass,
26}
27
28void AMDGPUCodeGenPassBuilder::addPreISel(AddIRPass &addPass) const {
29 // TODO: Add passes pre instruction selection.
30 // Test only, convert to real IR passes in future.
32}
33
34void AMDGPUCodeGenPassBuilder::addAsmPrinter(AddMachinePass &addPass,
35 CreateMCStreamer) const {
36 // TODO: Add AsmPrinter.
37}
38
39Error AMDGPUCodeGenPassBuilder::addInstSelector(AddMachinePass &addPass) const {
40 addPass(AMDGPUISelDAGToDAGPass(TM));
41 return Error::success();
42}
Defines an instruction selector for the AMDGPU target.
The AMDGPU TargetMachine interface definition for hw codegen targets.
const char LLVMTargetMachineRef TM
PassInstrumentationCallbacks PIC
LLVM IR instance of the generic uniformity analysis.
Error addInstSelector(AddMachinePass &) const
void addPreISel(AddIRPass &addPass) const
void addAsmPrinter(AddMachinePass &, CreateMCStreamer) const
AMDGPUCodeGenPassBuilder(AMDGPUTargetMachine &TM, const CGPassBuilderOption &Opts, PassInstrumentationCallbacks *PIC)
This class provides access to building LLVM's passes.
void disablePass()
Allow the target to disable a specific pass by default.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
static ErrorSuccess success()
Create a success value.
Definition: Error.h:337
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
A utility pass template to force an analysis result to be available.
Definition: PassManager.h:874