PromoteMemToReg.h (276479) | PromoteMemToReg.h (280031) |
---|---|
1//===- PromoteMemToReg.h - Promote Allocas to Scalars -----------*- 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//===----------------------------------------------------------------------===// --- 8 unchanged lines hidden (view full) --- 17 18#include "llvm/ADT/ArrayRef.h" 19 20namespace llvm { 21 22class AllocaInst; 23class DominatorTree; 24class AliasSetTracker; | 1//===- PromoteMemToReg.h - Promote Allocas to Scalars -----------*- 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//===----------------------------------------------------------------------===// --- 8 unchanged lines hidden (view full) --- 17 18#include "llvm/ADT/ArrayRef.h" 19 20namespace llvm { 21 22class AllocaInst; 23class DominatorTree; 24class AliasSetTracker; |
25class AssumptionCache; |
|
25 26/// \brief Return true if this alloca is legal for promotion. 27/// 28/// This is true if there are only loads, stores, and lifetime markers 29/// (transitively) using this alloca. This also enforces that there is only 30/// ever one layer of bitcasts or GEPs between the alloca and the lifetime 31/// markers. 32bool isAllocaPromotable(const AllocaInst *AI); 33 34/// \brief Promote the specified list of alloca instructions into scalar 35/// registers, inserting PHI nodes as appropriate. 36/// 37/// This function makes use of DominanceFrontier information. This function 38/// does not modify the CFG of the function at all. All allocas must be from 39/// the same function. 40/// 41/// If AST is specified, the specified tracker is updated to reflect changes 42/// made to the IR. 43void PromoteMemToReg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT, | 26 27/// \brief Return true if this alloca is legal for promotion. 28/// 29/// This is true if there are only loads, stores, and lifetime markers 30/// (transitively) using this alloca. This also enforces that there is only 31/// ever one layer of bitcasts or GEPs between the alloca and the lifetime 32/// markers. 33bool isAllocaPromotable(const AllocaInst *AI); 34 35/// \brief Promote the specified list of alloca instructions into scalar 36/// registers, inserting PHI nodes as appropriate. 37/// 38/// This function makes use of DominanceFrontier information. This function 39/// does not modify the CFG of the function at all. All allocas must be from 40/// the same function. 41/// 42/// If AST is specified, the specified tracker is updated to reflect changes 43/// made to the IR. 44void PromoteMemToReg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT, |
44 AliasSetTracker *AST = nullptr); | 45 AliasSetTracker *AST = nullptr, 46 AssumptionCache *AC = nullptr); |
45 46} // End llvm namespace 47 48#endif | 47 48} // End llvm namespace 49 50#endif |