summaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/Utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-14 02:13:07 +0000
committerChris Lattner <sabre@nondot.org>2004-03-14 02:13:07 +0000
commitcbf99ee973b6c6e6cd9537dae12031382783bc61 (patch)
tree8ffc024c49774938bcf943f745711c7e8d7abde4 /include/llvm/Transforms/Utils
parentf5ee170f9323a6cc6a2df155fea64b4002d3cc4b (diff)
downloadllvm-cbf99ee973b6c6e6cd9537dae12031382783bc61.tar.gz
llvm-cbf99ee973b6c6e6cd9537dae12031382783bc61.tar.bz2
llvm-cbf99ee973b6c6e6cd9537dae12031382783bc61.tar.xz
Move DemoteRegToStack prototype out of DemoteRegToStack.h to this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Transforms/Utils')
-rw-r--r--include/llvm/Transforms/Utils/Local.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h
index 05db3b1255..6df8da3de5 100644
--- a/include/llvm/Transforms/Utils/Local.h
+++ b/include/llvm/Transforms/Utils/Local.h
@@ -21,6 +21,7 @@ namespace llvm {
class Pass;
class PHINode;
+class AllocaInst;
//===----------------------------------------------------------------------===//
// Local constant propagation...
@@ -87,6 +88,14 @@ Value *hasConstantValue(PHINode *PN);
///
bool SimplifyCFG(BasicBlock *BB);
+/// DemoteRegToStack - This function takes a virtual register computed by an
+/// Instruction& X and replaces it with a slot in the stack frame, allocated via
+/// alloca. This allows the CFG to be changed around without fear of
+/// invalidating the SSA information for the value. It returns the pointer to
+/// the alloca inserted to create a stack slot for X.
+///
+AllocaInst *DemoteRegToStack(Instruction &X);
+
} // End llvm namespace
#endif