xref: /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/Scalar.cpp (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
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.
initializeScalarOpts(PassRegistry & Registry)21 void 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