aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-26 02:54:17 +0000
committerChris Lattner <sabre@nondot.org>2008-11-26 02:54:17 +0000
commitc5dd22a3338e089a75ad4a1c2b5cc120a82f9f77 (patch)
tree7312fe6610bb05f69aba96398667a5434f299d52 /include/llvm/Instructions.h
parentad2b173f9bef5ba304c9e3fc906f6a335e366bd2 (diff)
downloadexternal_llvm-c5dd22a3338e089a75ad4a1c2b5cc120a82f9f77.zip
external_llvm-c5dd22a3338e089a75ad4a1c2b5cc120a82f9f77.tar.gz
external_llvm-c5dd22a3338e089a75ad4a1c2b5cc120a82f9f77.tar.bz2
add a long-overdue AllocaInst::isStaticAlloca method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60080 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 6ee1831..bc4abc9 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -167,6 +167,11 @@ public:
: AllocationInst(Ty, ArraySize, Alloca, Align, NameStr, InsertAtEnd) {}
virtual AllocaInst *clone() const;
+
+ /// isStaticAlloca - Return true if this alloca is in the entry block of the
+ /// function and is a constant size. If so, the code generator will fold it
+ /// into the prolog/epilog code, so it is basically free.
+ bool isStaticAlloca() const;
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const AllocaInst *) { return true; }