mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
52e567e87f
and diretory. Also cleans up all the associated naming to be consistent and removes the public access to the pass ID which was unused in LLVM. Also runs clang-format over parts that changed, which generally cleans up a bunch of formatting. This is in preparation for doing some internal cleanups to the pass. Differential Revision: https://reviews.llvm.org/D47352 llvm-svn: 336028
57 lines
2.0 KiB
C++
57 lines
2.0 KiB
C++
//===-- Utils.cpp - TransformUtils Infrastructure -------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines the common initialization infrastructure for the
|
|
// TransformUtils library.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/Transforms/Utils.h"
|
|
#include "llvm-c/Initialization.h"
|
|
#include "llvm-c/Transforms/Utils.h"
|
|
#include "llvm/IR/LegacyPassManager.h"
|
|
#include "llvm/InitializePasses.h"
|
|
#include "llvm/PassRegistry.h"
|
|
|
|
using namespace llvm;
|
|
|
|
/// initializeTransformUtils - Initialize all passes in the TransformUtils
|
|
/// library.
|
|
void llvm::initializeTransformUtils(PassRegistry &Registry) {
|
|
initializeAddDiscriminatorsLegacyPassPass(Registry);
|
|
initializeBreakCriticalEdgesPass(Registry);
|
|
initializeInstNamerPass(Registry);
|
|
initializeLCSSAWrapperPassPass(Registry);
|
|
initializeLibCallsShrinkWrapLegacyPassPass(Registry);
|
|
initializeLoopSimplifyPass(Registry);
|
|
initializeLowerInvokeLegacyPassPass(Registry);
|
|
initializeLowerSwitchPass(Registry);
|
|
initializeNameAnonGlobalLegacyPassPass(Registry);
|
|
initializePromoteLegacyPassPass(Registry);
|
|
initializeStripNonLineTableDebugInfoPass(Registry);
|
|
initializeUnifyFunctionExitNodesPass(Registry);
|
|
initializeMetaRenamerPass(Registry);
|
|
initializeStripGCRelocatesPass(Registry);
|
|
initializePredicateInfoPrinterLegacyPassPass(Registry);
|
|
}
|
|
|
|
/// LLVMInitializeTransformUtils - C binding for initializeTransformUtilsPasses.
|
|
void LLVMInitializeTransformUtils(LLVMPassRegistryRef R) {
|
|
initializeTransformUtils(*unwrap(R));
|
|
}
|
|
|
|
void LLVMAddLowerSwitchPass(LLVMPassManagerRef PM) {
|
|
unwrap(PM)->add(createLowerSwitchPass());
|
|
}
|
|
|
|
void LLVMAddPromoteMemoryToRegisterPass(LLVMPassManagerRef PM) {
|
|
unwrap(PM)->add(createPromoteMemoryToRegisterPass());
|
|
}
|
|
|