
Legacy passes are only supported for codegen, and I don't believe it's possible to write backends using the C API, so we should drop all of those. Reduces the number of places that need to be modified when removing legacy passes. Differential Revision: https://reviews.llvm.org/D144970
36 lines
1.3 KiB
C++
36 lines
1.3 KiB
C++
//===-- IPO.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 implements the common infrastructure (including C bindings) for
|
|
// libLLVMIPO.a, which implements several transformations over the LLVM
|
|
// intermediate representation.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm-c/Initialization.h"
|
|
#include "llvm/IR/LegacyPassManager.h"
|
|
#include "llvm/InitializePasses.h"
|
|
#include "llvm/Transforms/IPO.h"
|
|
#include "llvm/Transforms/IPO/AlwaysInliner.h"
|
|
#include "llvm/Transforms/IPO/FunctionAttrs.h"
|
|
|
|
using namespace llvm;
|
|
|
|
void llvm::initializeIPO(PassRegistry &Registry) {
|
|
initializeDAEPass(Registry);
|
|
initializeDAHPass(Registry);
|
|
initializeAlwaysInlinerLegacyPassPass(Registry);
|
|
initializeLoopExtractorLegacyPassPass(Registry);
|
|
initializeSingleLoopExtractorPass(Registry);
|
|
initializeBarrierNoopPass(Registry);
|
|
}
|
|
|
|
void LLVMInitializeIPO(LLVMPassRegistryRef R) {
|
|
initializeIPO(*unwrap(R));
|
|
}
|