[Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment
[llvm-core.git] / include / llvm / Transforms / IPO / ArgumentPromotion.h
blobc8afb7bdcd65fe9bae4fd77594223fdd051c3708
1 //===- ArgumentPromotion.h - Promote by-reference arguments -----*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
10 #define LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
12 #include "llvm/Analysis/CGSCCPassManager.h"
13 #include "llvm/Analysis/LazyCallGraph.h"
14 #include "llvm/IR/PassManager.h"
16 namespace llvm {
18 /// Argument promotion pass.
19 ///
20 /// This pass walks the functions in each SCC and for each one tries to
21 /// transform it and all of its callers to replace indirect arguments with
22 /// direct (by-value) arguments.
23 class ArgumentPromotionPass : public PassInfoMixin<ArgumentPromotionPass> {
24 unsigned MaxElements;
26 public:
27 ArgumentPromotionPass(unsigned MaxElements = 3u) : MaxElements(MaxElements) {}
29 PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM,
30 LazyCallGraph &CG, CGSCCUpdateResult &UR);
33 } // end namespace llvm
35 #endif // LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H