[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Dec 8 13:04:08 PST 2004
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.184 -> 1.185
---
Log message:
Move method out of line for better ICC support
Add some ifdefs for some stuff I like to be able to toggle easily
---
Diffs of the changes: (+11 -0)
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.184 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.185
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.184 Sun Oct 31 13:57:43 2004
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Dec 8 15:03:56 2004
@@ -27,6 +27,8 @@
#include <algorithm>
using namespace llvm;
+#define COLLAPSE_ARRAYS_AGGRESSIVELY 0
+
namespace {
Statistic<> NumFolds ("dsa", "Number of nodes completely folded");
Statistic<> NumCallNodesMerged("dsa", "Number of call nodes merged");
@@ -651,12 +653,14 @@
// If the two nodes are of different size, and the smaller node has the array
// bit set, collapse!
if (NSize != CurNodeH.getNode()->getSize()) {
+#if COLLAPSE_ARRAYS_AGGRESSIVELY
if (NSize < CurNodeH.getNode()->getSize()) {
if (NH.getNode()->isArray())
NH.getNode()->foldNodeCompletely();
} else if (CurNodeH.getNode()->isArray()) {
NH.getNode()->foldNodeCompletely();
}
+#endif
}
// Merge the type entries of the two nodes together...
@@ -895,6 +899,7 @@
} else if (SN->getSize() != DN->getSize()) {
// If the two nodes are of different size, and the smaller node has the
// array bit set, collapse!
+#if COLLAPSE_ARRAYS_AGGRESSIVELY
if (SN->getSize() < DN->getSize()) {
if (SN->isArray()) {
DN->foldNodeCompletely();
@@ -904,6 +909,7 @@
DN->foldNodeCompletely();
DN = NH.getNode();
}
+#endif
}
// Merge the type entries of the two nodes together...
@@ -1934,6 +1940,11 @@
DEBUG(AssertGraphOK(); GlobalsGraph->AssertGraphOK());
}
+void DSGraph::AssertNodeContainsGlobal(const DSNode *N, GlobalValue *GV) const {
+ assert(std::find(N->getGlobals().begin(), N->getGlobals().end(), GV) !=
+ N->getGlobals().end() && "Global value not in node!");
+}
+
void DSGraph::AssertCallSiteInGraph(const DSCallSite &CS) const {
if (CS.isIndirectCall()) {
AssertNodeInGraph(CS.getCalleeNode());
More information about the llvm-commits
mailing list