Disabled promoting alloca instructions that need run-time checks for bounds
checking or load/store checks. Such promotions are only needed by the real
automatic pool allocation and only because it fails to insert poolinit()
calls for pools for which now malloc/free occurs.
llvm-svn: 87870
diff --git a/safecode/lib/ConvertUnsafeAllocas/convert.cpp b/safecode/lib/ConvertUnsafeAllocas/convert.cpp
index 2a153fe..f33c66f 100755
--- a/safecode/lib/ConvertUnsafeAllocas/convert.cpp
+++ b/safecode/lib/ConvertUnsafeAllocas/convert.cpp
@@ -118,9 +118,11 @@
getUnsafeAllocsFromABC();
if (!DisableStackPromote) TransformCSSAllocasToMallocs(cssPass->AllocaNodes);
#ifndef LLVA_KERNEL
+#if 0
TransformAllocasToMallocs(unsafeAllocaNodes);
TransformCollapsedAllocas(M);
#endif
+#endif
return true;
}
@@ -412,7 +414,7 @@
void
ConvertUnsafeAllocas::TransformCollapsedAllocas(Module &M) {
//
- // Need to check if the following is incomplete becasue we are only looking
+ // Need to check if the following is incomplete because we are only looking
// at scalars.
//
// It may be complete because every instruction actually is a scalar in
@@ -650,9 +652,11 @@
getUnsafeAllocsFromABC();
if (!DisableStackPromote) TransformCSSAllocasToMallocs(cssPass->AllocaNodes);
#ifndef LLVA_KERNEL
+#if 0
TransformAllocasToMallocs(unsafeAllocaNodes);
TransformCollapsedAllocas(M);
#endif
+#endif
return true;
}