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
17using namespace llvm;
18
19/// initializeScalarOptsPasses - Initialize all passes linked into the
20/// ScalarOpts library.
21void llvm::initializeScalarOpts(PassRegistry &Registry) {
22 initializeConstantHoistingLegacyPassPass(Registry);
23 initializeDCELegacyPassPass(Registry);
24 initializeGVNLegacyPassPass(Registry);
25 initializeEarlyCSELegacyPassPass(Registry);
26 initializeEarlyCSEMemSSALegacyPassPass(Registry);
27 initializeFlattenCFGLegacyPassPass(Registry);
28 initializeInferAddressSpacesPass(Registry);
29 initializeInstSimplifyLegacyPassPass(Registry);
30 initializeLegacyLICMPassPass(Registry);
31 initializeLoopDataPrefetchLegacyPassPass(Registry);
32 initializeLoopStrengthReducePass(Registry);
33 initializeLoopUnrollPass(Registry);
34 initializeLowerAtomicLegacyPassPass(Registry);
35 initializeLowerConstantIntrinsicsPass(Registry);
36 initializeMergeICmpsLegacyPassPass(Registry);
37 initializeNaryReassociateLegacyPassPass(Registry);
38 initializePartiallyInlineLibCallsLegacyPassPass(Registry);
39 initializeReassociateLegacyPassPass(Registry);
40 initializeScalarizeMaskedMemIntrinLegacyPassPass(Registry);
41 initializeSROALegacyPassPass(Registry);
42 initializeCFGSimplifyPassPass(Registry);
43 initializeStructurizeCFGLegacyPassPass(Registry);
44 initializeSinkingLegacyPassPass(Registry);
45 initializeTailCallElimPass(Registry);
46 initializeTLSVariableHoistLegacyPassPass(Registry);
47 initializeSeparateConstOffsetFromGEPLegacyPassPass(Registry);
48 initializeSpeculativeExecutionLegacyPassPass(Registry);
49 initializeStraightLineStrengthReduceLegacyPassPass(Registry);
50 initializePlaceBackedgeSafepointsLegacyPassPass(Registry);
51 initializePostInlineEntryExitInstrumenterPass(Registry);
52}
53