LLVM  16.0.0git
ArgumentPromotion.h
Go to the documentation of this file.
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 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
10 #define LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
11 
14 #include "llvm/IR/PassManager.h"
15 
16 namespace llvm {
17 
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;
25 
26 public:
27  ArgumentPromotionPass(unsigned MaxElements = 2u) : MaxElements(MaxElements) {}
28 
31 };
32 
33 } // end namespace llvm
34 
35 #endif // LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371
llvm::ArgumentPromotionPass::run
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)
Definition: ArgumentPromotion.cpp:804
llvm::ArgumentPromotionPass::ArgumentPromotionPass
ArgumentPromotionPass(unsigned MaxElements=2u)
Definition: ArgumentPromotion.h:27
llvm::LazyCallGraph::SCC
An SCC of the call graph.
Definition: LazyCallGraph.h:420
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
LazyCallGraph.h
CGSCCPassManager.h
llvm::CGSCCUpdateResult
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
Definition: CGSCCPassManager.h:232
PassManager.h
llvm::ArgumentPromotionPass
Argument promotion pass.
Definition: ArgumentPromotion.h:23
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:42
llvm::LazyCallGraph
A lazily constructed view of the call graph of a module.
Definition: LazyCallGraph.h:111