1 //===-- Scalar.cpp --------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file implements common infrastructure for libLLVMScalarOpts.a, which 10 // implements several scalar transformations over the LLVM intermediate 11 // representation, including the C bindings for that library. 12 // 13 //===----------------------------------------------------------------------===// 14 15 #include "llvm/InitializePasses.h" 16 17 using namespace llvm; 18 19 /// initializeScalarOptsPasses - Initialize all passes linked into the 20 /// ScalarOpts library. 21 void llvm::initializeScalarOpts(PassRegistry &Registry) { 22 initializeConstantHoistingLegacyPassPass(Registry); 23 initializeDCELegacyPassPass(Registry); 24 initializeScalarizerLegacyPassPass(Registry); 25 initializeGuardWideningLegacyPassPass(Registry); 26 initializeLoopGuardWideningLegacyPassPass(Registry); 27 initializeGVNLegacyPassPass(Registry); 28 initializeEarlyCSELegacyPassPass(Registry); 29 initializeEarlyCSEMemSSALegacyPassPass(Registry); 30 initializeMakeGuardsExplicitLegacyPassPass(Registry); 31 initializeFlattenCFGLegacyPassPass(Registry); 32 initializeInferAddressSpacesPass(Registry); 33 initializeInstSimplifyLegacyPassPass(Registry); 34 initializeLegacyLICMPassPass(Registry); 35 initializeLegacyLoopSinkPassPass(Registry); 36 initializeLoopDataPrefetchLegacyPassPass(Registry); 37 initializeLoopInstSimplifyLegacyPassPass(Registry); 38 initializeLoopPredicationLegacyPassPass(Registry); 39 initializeLoopRotateLegacyPassPass(Registry); 40 initializeLoopStrengthReducePass(Registry); 41 initializeLoopUnrollPass(Registry); 42 initializeLowerAtomicLegacyPassPass(Registry); 43 initializeLowerConstantIntrinsicsPass(Registry); 44 initializeLowerExpectIntrinsicPass(Registry); 45 initializeLowerGuardIntrinsicLegacyPassPass(Registry); 46 initializeLowerWidenableConditionLegacyPassPass(Registry); 47 initializeMergeICmpsLegacyPassPass(Registry); 48 initializeMergedLoadStoreMotionLegacyPassPass(Registry); 49 initializeNaryReassociateLegacyPassPass(Registry); 50 initializePartiallyInlineLibCallsLegacyPassPass(Registry); 51 initializeReassociateLegacyPassPass(Registry); 52 initializeRedundantDbgInstEliminationPass(Registry); 53 initializeRegToMemLegacyPass(Registry); 54 initializeScalarizeMaskedMemIntrinLegacyPassPass(Registry); 55 initializeSROALegacyPassPass(Registry); 56 initializeCFGSimplifyPassPass(Registry); 57 initializeStructurizeCFGLegacyPassPass(Registry); 58 initializeSimpleLoopUnswitchLegacyPassPass(Registry); 59 initializeSinkingLegacyPassPass(Registry); 60 initializeTailCallElimPass(Registry); 61 initializeTLSVariableHoistLegacyPassPass(Registry); 62 initializeSeparateConstOffsetFromGEPLegacyPassPass(Registry); 63 initializeSpeculativeExecutionLegacyPassPass(Registry); 64 initializeStraightLineStrengthReduceLegacyPassPass(Registry); 65 initializePlaceBackedgeSafepointsLegacyPassPass(Registry); 66 initializeLoopSimplifyCFGLegacyPassPass(Registry); 67 } 68