[llvm-commits] [poolalloc] r114063 - /poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
John Criswell
criswell at uiuc.edu
Wed Sep 15 20:29:22 PDT 2010
Author: criswell
Date: Wed Sep 15 22:29:22 2010
New Revision: 114063
URL: http://llvm.org/viewvc/llvm-project?rev=114063&view=rev
Log:
Modifed the simple pool allocation pass so that it does not recreate the global
pool if it already exists. This allows it to yield correct code when executed
multiple times.
Also added support for transforming stack registration.
Modified:
poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=114063&r1=114062&r2=114063&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Wed Sep 15 22:29:22 2010
@@ -92,7 +92,9 @@
(funcname == "sc.lscheckalign") ||
(funcname == "sc.lscheckalignui") ||
(funcname == "sc.boundscheck") ||
- (funcname == "sc.boundscheckui")) {
+ (funcname == "sc.boundscheckui") ||
+ (funcname == "sc.pool_register_stack") ||
+ (funcname == "sc.pool_unregister_stack")) {
return 1;
}
@@ -469,6 +471,14 @@
unsigned Align,
Module& M) {
//
+ // See if the global pool has already been created. If so, then just return
+ // it.
+ //
+ if (GlobalVariable * GV = M.getNamedGlobal ("__poolalloc_GlobalPool")) {
+ return GV;
+ }
+
+ //
// Give poolinit() a dummy body. A later transform will remove the dummy
// body.
//
More information about the llvm-commits
mailing list