[llvm-commits] [poolalloc] r118256 - /poolalloc/trunk/lib/DSA/DataStructure.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Thu Nov 4 11:42:16 PDT 2010
Author: aggarwa4
Date: Thu Nov 4 13:42:15 2010
New Revision: 118256
URL: http://llvm.org/viewvc/llvm-project?rev=118256&view=rev
Log:
Do not collapse nodes, if one is a VOID array , and the
other is an array node with some other type.
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=118256&r1=118255&r2=118256&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Thu Nov 4 13:42:15 2010
@@ -524,13 +524,15 @@
NOffset = NH.getOffset();
}
}
- if ((CurNodeH.getNode()->isArrayNode() && NH.getNode()->isArrayNode()) &&
- (CurNodeH.getNode()->getSize() != NH.getNode()->getSize())) {
+ if (CurNodeH.getNode()->isArrayNode() && NH.getNode()->isArrayNode()) {
+ if(NH.getNode()->getSize() != 1 && CurNodeH.getNode()->getSize() != 1
+ && (NH.getNode()->getSize() != CurNodeH.getNode()->getSize())){
CurNodeH.getNode()->foldNodeCompletely();
NH.getNode()->foldNodeCompletely();
NSize = NH.getNode()->getSize();
// N = NH.getNode();
NOffset = NH.getOffset();
+ }
}
@@ -799,11 +801,12 @@
DN = NH.getNode();
}
}
- if ((SN->isArrayNode() && DN->isArrayNode()) &&
- (SN->getSize() != DN->getSize())) {
+ if (SN->isArrayNode() && DN->isArrayNode()) {
+ if((SN->getSize() != DN->getSize()) && (SN->getSize() != 1) && DN->getSize() != 1) {
DN->foldNodeCompletely();
DN = NH.getNode();
- }
+ }
+ }
// Merge the type entries of the two nodes together...
More information about the llvm-commits
mailing list