[llvm-commits] [poolalloc] r118210 - /poolalloc/trunk/lib/DSA/DataStructure.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Wed Nov 3 16:58:24 PDT 2010
Author: aggarwa4
Date: Wed Nov 3 18:58:24 2010
New Revision: 118210
URL: http://llvm.org/viewvc/llvm-project?rev=118210&view=rev
Log:
Allow scalar type to be merged into an array node
if the size is the same.
Modified:
poolalloc/trunk/lib/DSA/DataStructure.cpp
Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=118210&r1=118209&r2=118210&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Wed Nov 3 18:58:24 2010
@@ -793,8 +793,11 @@
if ((SN->isArrayNode() && !DN->isArrayNode()) ||
(!SN->isArrayNode() && DN->isArrayNode())) {
- DN->foldNodeCompletely();
- DN = NH.getNode();
+ if(SN->getSize() != 0 && DN->getSize() != 0
+ && (SN->getSize() != DN->getSize())){
+ DN->foldNodeCompletely();
+ DN = NH.getNode();
+ }
}
if ((SN->isArrayNode() && DN->isArrayNode()) &&
(SN->getSize() != DN->getSize())) {
More information about the llvm-commits
mailing list