llvm-project/llvm/lib/CodeGen/CodeGenPassBuilder.cpp
paperchalice fde91d1b37
Reland "[Pass][CodeGen] Add some necessary passes for codegen" (#71783)
Unfortunately, there are two `KCFI` passes in source tree,
`CodeGen/KCFI.cpp` and `Transforms/Instrumentation/KCFI.cpp`, use
`MachineKCFIPass` for machine function pass.
`MIRProfileLoaderPass` is resolved to the legacy one when
`LLVM_ENABLE_MODULES=ON`, use `MIRProfileLoaderNewPass` as a workaround.
2023-12-15 12:30:53 +08:00

28 lines
1.1 KiB
C++

//===--- CodeGenPassBuilder.cpp --------------------------------------- ---===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines interfaces to access the target independent code
// generation passes provided by the LLVM backend.
//
//===---------------------------------------------------------------------===//
#include "llvm/CodeGen/CodeGenPassBuilder.h"
using namespace llvm;
namespace llvm {
#define DUMMY_MACHINE_MODULE_PASS(NAME, PASS_NAME, CONSTRUCTOR) \
AnalysisKey PASS_NAME::Key;
#include "llvm/CodeGen/MachinePassRegistry.def"
#define DUMMY_MACHINE_FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR) \
AnalysisKey PASS_NAME::Key;
#define DUMMY_MACHINE_FUNCTION_ANALYSIS(NAME, PASS_NAME, CONSTRUCTOR) \
AnalysisKey PASS_NAME::Key;
#include "llvm/CodeGen/MachinePassRegistry.def"
} // namespace llvm