xref: /freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/Scalar.cpp (revision a90b9d0159070121c221b966469c3e36d912bf82)
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   initializeGVNLegacyPassPass(Registry);
25   initializeEarlyCSELegacyPassPass(Registry);
26   initializeEarlyCSEMemSSALegacyPassPass(Registry);
27   initializeFlattenCFGLegacyPassPass(Registry);
28   initializeInferAddressSpacesPass(Registry);
29   initializeInstSimplifyLegacyPassPass(Registry);
30   initializeLegacyLICMPassPass(Registry);
31   initializeLoopDataPrefetchLegacyPassPass(Registry);
32   initializeLoopRotateLegacyPassPass(Registry);
33   initializeLoopStrengthReducePass(Registry);
34   initializeLoopUnrollPass(Registry);
35   initializeLowerAtomicLegacyPassPass(Registry);
36   initializeLowerConstantIntrinsicsPass(Registry);
37   initializeMergeICmpsLegacyPassPass(Registry);
38   initializeNaryReassociateLegacyPassPass(Registry);
39   initializePartiallyInlineLibCallsLegacyPassPass(Registry);
40   initializeReassociateLegacyPassPass(Registry);
41   initializeScalarizeMaskedMemIntrinLegacyPassPass(Registry);
42   initializeSROALegacyPassPass(Registry);
43   initializeCFGSimplifyPassPass(Registry);
44   initializeStructurizeCFGLegacyPassPass(Registry);
45   initializeSinkingLegacyPassPass(Registry);
46   initializeTailCallElimPass(Registry);
47   initializeTLSVariableHoistLegacyPassPass(Registry);
48   initializeSeparateConstOffsetFromGEPLegacyPassPass(Registry);
49   initializeSpeculativeExecutionLegacyPassPass(Registry);
50   initializeStraightLineStrengthReduceLegacyPassPass(Registry);
51   initializePlaceBackedgeSafepointsLegacyPassPass(Registry);
52 }
53