
This matches the optimization pipeline's PassRegistry.def. I ran into a bug where CONSTRUCTOR wasn't always being used (in PassBuilder::registerMachineFunctionAnalyses()). Make DUMMY_* just accept a pass name, there's no point in having proper constructors if the generated dummy class has a templated constructor accepting arbitrary arguments. Remove unused getPassNameFromLegacyName() as it was using this but for no purpose. Remove DUMMY_MACHINE_FUNCTION_ANALYSIS, we can just add those as we port them. This for some reason exposed missing mock calls in existing unittests.
23 lines
840 B
C++
23 lines
840 B
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/Passes/CodeGenPassBuilder.h"
|
|
|
|
using namespace llvm;
|
|
|
|
namespace llvm {
|
|
#define DUMMY_MACHINE_FUNCTION_ANALYSIS(NAME, CREATE_PASS) \
|
|
AnalysisKey PASS_NAME::Key;
|
|
#include "llvm/Passes/MachinePassRegistry.def"
|
|
} // namespace llvm
|