LLVM
3.7.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
work
release_test
rc4
llvm.src
include
llvm
Transforms
Utils
PromoteMemToReg.h
Go to the documentation of this file.
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
//===----------------------------------------------------------------------===//
9
//
10
// This file exposes an interface to promote alloca instructions to SSA
11
// registers, by using the SSA construction algorithm.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
16
#define LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
17
18
#include "
llvm/ADT/ArrayRef.h
"
19
20
namespace
llvm {
21
22
class
AllocaInst;
23
class
DominatorTree;
24
class
AliasSetTracker;
25
class
AssumptionCache;
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.
33
bool
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.
44
void
PromoteMemToReg
(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT,
45
AliasSetTracker *AST =
nullptr
,
46
AssumptionCache *AC =
nullptr
);
47
48
}
// End llvm namespace
49
50
#endif
llvm::isAllocaPromotable
bool isAllocaPromotable(const AllocaInst *AI)
Return true if this alloca is legal for promotion.
Definition:
PromoteMemoryToRegister.cpp:51
llvm::PromoteMemToReg
void PromoteMemToReg(ArrayRef< AllocaInst * > Allocas, DominatorTree &DT, AliasSetTracker *AST=nullptr, AssumptionCache *AC=nullptr)
Promote the specified list of alloca instructions into scalar registers, inserting PHI nodes as appro...
Definition:
PromoteMemoryToRegister.cpp:981
ArrayRef.h
Generated on Mon Aug 31 2015 11:06:08 for LLVM by
1.8.6