Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:42

0001 //===- SROA.h - Scalar Replacement Of Aggregates ----------------*- 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 /// \file
0009 /// This file provides the interface for LLVM's Scalar Replacement of
0010 /// Aggregates pass. This pass provides both aggregate splitting and the
0011 /// primary SSA formation used in the compiler.
0012 ///
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_TRANSFORMS_SCALAR_SROA_H
0016 #define LLVM_TRANSFORMS_SCALAR_SROA_H
0017 
0018 #include "llvm/IR/PassManager.h"
0019 
0020 namespace llvm {
0021 
0022 class Function;
0023 
0024 enum class SROAOptions : bool { ModifyCFG, PreserveCFG };
0025 
0026 class SROAPass : public PassInfoMixin<SROAPass> {
0027   const SROAOptions PreserveCFG;
0028 
0029 public:
0030   /// If \p PreserveCFG is set, then the pass is not allowed to modify CFG
0031   /// in any way, even if it would update CFG analyses.
0032   SROAPass(SROAOptions PreserveCFG);
0033 
0034   /// Run the pass over the function.
0035   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
0036 
0037   void printPipeline(raw_ostream &OS,
0038                      function_ref<StringRef(StringRef)> MapClassName2PassName);
0039 };
0040 
0041 } // end namespace llvm
0042 
0043 #endif // LLVM_TRANSFORMS_SCALAR_SROA_H