summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-03-15 05:43:41 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-03-15 05:43:41 +0000
commit0c3a0b6607549361fae80d548b9b4511de1d1428 (patch)
treecc9dc9f879ad171b0a3e7fb99a4c1282e4c0d9a8 /lib/Analysis
parent133decdcebcd591d2ccc20cbf362a07322a1ffa2 (diff)
downloadllvm-0c3a0b6607549361fae80d548b9b4511de1d1428.tar.gz
llvm-0c3a0b6607549361fae80d548b9b4511de1d1428.tar.bz2
llvm-0c3a0b6607549361fae80d548b9b4511de1d1428.tar.xz
allow field sensitivity to be a tunable parameter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index bd1757dcfd..7fabdf2123 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -39,6 +39,10 @@ namespace {
Statistic<> NumDNE ("dsa", "Number of nodes removed by reachability");
Statistic<> NumTrivialDNE ("dsa", "Number of nodes trivially removed");
Statistic<> NumTrivialGlobalDNE("dsa", "Number of globals trivially removed");
+ static cl::opt<unsigned>
+ DSAFieldLimit("dsa-field-limit", cl::Hidden,
+ cl::desc("Number of fields to track before collapsing a node"),
+ cl::init(256));
};
#if 0
@@ -468,7 +472,7 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset,
// collapse it. This can occur for fortran common blocks, which have stupid
// things like { [100000000 x double], [1000000 x double] }.
unsigned NumFields = (NewTySize+DS::PointerSize-1) >> DS::PointerShift;
- if (NumFields > 256) {
+ if (NumFields > DSAFieldLimit) {
foldNodeCompletely();
return true;
}
@@ -496,7 +500,7 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset,
// collapse it. This can occur for fortran common blocks, which have stupid
// things like { [100000000 x double], [1000000 x double] }.
unsigned NumFields = (NewTySize+Offset+DS::PointerSize-1) >> DS::PointerShift;
- if (NumFields > 256) {
+ if (NumFields > DSAFieldLimit) {
foldNodeCompletely();
return true;
}