Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
2.5 KiB
C++
Raw Permalink Normal View History

//===-- Utils.cpp - TransformUtils Infrastructure -------------------------===//
//
// 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 the common initialization infrastructure for the
// TransformUtils library.
//
//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils.h"
#include "llvm-c/Initialization.h"
2018-03-29 22:31:38 +00:00
#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) {
2016-06-15 21:51:30 +00:00
initializeAddDiscriminatorsLegacyPassPass(Registry);
initializeAssumeSimplifyPassLegacyPassPass(Registry);
initializeAssumeBuilderPassLegacyPassPass(Registry);
initializeBreakCriticalEdgesPass(Registry);
2019-01-04 19:04:54 +00:00
initializeCanonicalizeAliasesLegacyPassPass(Registry);
2020-05-08 05:28:42 +09:00
initializeCanonicalizeFreezeInLoopsPass(Registry);
initializeInstNamerPass(Registry);
2016-06-09 19:44:46 +00:00
initializeLCSSAWrapperPassPass(Registry);
initializeLibCallsShrinkWrapLegacyPassPass(Registry);
initializeLoopSimplifyPass(Registry);
initializeLowerInvokeLegacyPassPass(Registry);
initializeLowerSwitchPass(Registry);
initializeNameAnonGlobalLegacyPassPass(Registry);
2016-06-14 03:22:22 +00:00
initializePromoteLegacyPassPass(Registry);
initializeStripNonLineTableDebugInfoPass(Registry);
initializeUnifyFunctionExitNodesPass(Registry);
initializeMetaRenamerPass(Registry);
initializeStripGCRelocatesPass(Registry);
2017-02-07 21:10:46 +00:00
initializePredicateInfoPrinterLegacyPassPass(Registry);
initializeInjectTLIMappingsLegacyPass(Registry);
2020-04-15 15:05:51 +05:30
initializeFixIrreduciblePass(Registry);
2020-03-28 07:13:35 -04:00
initializeUnifyLoopExitsPass(Registry);
initializeUniqueInternalLinkageNamesLegacyPassPass(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());
}
void LLVMAddAddDiscriminatorsPass(LLVMPassManagerRef PM) {
unwrap(PM)->add(createAddDiscriminatorsPass());
}