|
|
|||
File indexing completed on 2026-05-10 08:44:39
0001 //===- ArgumentPromotion.h - Promote by-reference arguments -----*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 0009 #ifndef LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H 0010 #define LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H 0011 0012 #include "llvm/Analysis/CGSCCPassManager.h" 0013 #include "llvm/Analysis/LazyCallGraph.h" 0014 #include "llvm/IR/PassManager.h" 0015 0016 namespace llvm { 0017 0018 /// Argument promotion pass. 0019 /// 0020 /// This pass walks the functions in each SCC and for each one tries to 0021 /// transform it and all of its callers to replace indirect arguments with 0022 /// direct (by-value) arguments. 0023 class ArgumentPromotionPass : public PassInfoMixin<ArgumentPromotionPass> { 0024 unsigned MaxElements; 0025 0026 public: 0027 ArgumentPromotionPass(unsigned MaxElements = 2u) : MaxElements(MaxElements) {} 0028 0029 PreservedAnalyses run(LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, 0030 LazyCallGraph &CG, CGSCCUpdateResult &UR); 0031 }; 0032 0033 } // end namespace llvm 0034 0035 #endif // LLVM_TRANSFORMS_IPO_ARGUMENTPROMOTION_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|