|
|
|||
File indexing completed on 2026-05-10 08:44:43
0001 //===- PromoteMemToReg.h - Promote Allocas to Scalars -----------*- 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 // This file exposes an interface to promote alloca instructions to SSA 0010 // registers, by using the SSA construction algorithm. 0011 // 0012 //===----------------------------------------------------------------------===// 0013 0014 #ifndef LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H 0015 #define LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H 0016 0017 namespace llvm { 0018 0019 template <typename T> class ArrayRef; 0020 class AllocaInst; 0021 class DominatorTree; 0022 class AssumptionCache; 0023 0024 /// Return true if this alloca is legal for promotion. 0025 /// 0026 /// This is true if there are only loads, stores, and lifetime markers 0027 /// (transitively) using this alloca. This also enforces that there is only 0028 /// ever one layer of bitcasts or GEPs between the alloca and the lifetime 0029 /// markers. 0030 bool isAllocaPromotable(const AllocaInst *AI); 0031 0032 /// Promote the specified list of alloca instructions into scalar 0033 /// registers, inserting PHI nodes as appropriate. 0034 /// 0035 /// This function makes use of DominanceFrontier information. This function 0036 /// does not modify the CFG of the function at all. All allocas must be from 0037 /// the same function. 0038 /// 0039 void PromoteMemToReg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT, 0040 AssumptionCache *AC = nullptr); 0041 0042 } // End llvm namespace 0043 0044 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|