LLVM  8.0.1
ArgumentPromotion.h
Go to the documentation of this file.
1 //===- ArgumentPromotion.h - Promote by-reference arguments -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
11 #define LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
12 
15 #include "llvm/IR/PassManager.h"
16 
17 namespace llvm {
18 
19 /// Argument promotion pass.
20 ///
21 /// This pass walks the functions in each SCC and for each one tries to
22 /// transform it and all of its callers to replace indirect arguments with
23 /// direct (by-value) arguments.
24 class ArgumentPromotionPass : public PassInfoMixin<ArgumentPromotionPass> {
25  unsigned MaxElements;
26 
27 public:
28  ArgumentPromotionPass(unsigned MaxElements = 3u) : MaxElements(MaxElements) {}
29 
32 };
33 
34 } // end namespace llvm
35 
36 #endif // LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
uint64_t CallInst * C
This class represents lattice values for constants.
Definition: AllocatorList.h:24
Implements a lazy call graph analysis and related passes for the new pass manager.
Support structure for SCC passes to communicate updates the call graph back to the CGSCC pass manager...
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:366
A lazily constructed view of the call graph of a module.
Argument promotion pass.
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:154
PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR)
This header provides classes for managing passes over SCCs of the call graph.
An SCC of the call graph.
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.
ArgumentPromotionPass(unsigned MaxElements=3u)