|
|
|||
File indexing completed on 2026-05-10 08:44:41
0001 //===------- LoopBoundSplit.h - Split Loop Bound ----------------*- 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_SCALAR_LOOPBOUNDSPLIT_H 0010 #define LLVM_TRANSFORMS_SCALAR_LOOPBOUNDSPLIT_H 0011 0012 #include "llvm/Analysis/LoopAnalysisManager.h" 0013 #include "llvm/IR/PassManager.h" 0014 0015 namespace llvm { 0016 class LPMUpdater; 0017 class Loop; 0018 0019 /// This pass transforms loops that contain a conditional branch with induction 0020 /// variable. For example, it transforms left code to right code: 0021 /// 0022 /// newbound = min(n, c) 0023 /// while (iv < n) { while(iv < newbound) { 0024 /// A A 0025 /// if (iv < c) B 0026 /// B C 0027 /// C } 0028 /// if (iv != n) { 0029 /// while (iv < n) { 0030 /// A 0031 /// C 0032 /// } 0033 /// } 0034 class LoopBoundSplitPass : public PassInfoMixin<LoopBoundSplitPass> { 0035 public: 0036 PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, 0037 LoopStandardAnalysisResults &AR, LPMUpdater &U); 0038 }; 0039 0040 } // end namespace llvm 0041 0042 #endif // LLVM_TRANSFORMS_SCALAR_LOOPBOUNDSPLIT_H
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|