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
This commit is contained in:
Andrew Lenharth 2006-03-15 05:43:41 +00:00
parent 133decdceb
commit 0c3a0b6607

View File

@ -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;
}