summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-03-03 17:13:31 +0000
committerChris Lattner <sabre@nondot.org>2003-03-03 17:13:31 +0000
commitc12e5ccdb55010c03398934a53e8bbb118659f94 (patch)
tree04d7e435b689c8cb42d803c66c80641c227d2b63 /llvm/lib/Analysis/DataStructure/DataStructure.cpp
parente2d58f20655698bbcac42f19eb3ecd3449043bfd (diff)
downloadbcm5719-llvm-c12e5ccdb55010c03398934a53e8bbb118659f94.tar.gz
bcm5719-llvm-c12e5ccdb55010c03398934a53e8bbb118659f94.zip
Don't apply type information to load instructions if it will cause collapsing
llvm-svn: 5684
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/DataStructure.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp
index 27247897e57..1aad8cf69ee 100644
--- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp
@@ -152,7 +152,8 @@ bool DSNode::isNodeCompletelyFolded() const {
///
/// This method returns true if the node is completely folded, otherwise false.
///
-bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset) {
+bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset,
+ bool FoldIfIncompatible) {
// Check to make sure the Size member is up-to-date. Size can be one of the
// following:
// Size = 0, Ty = Void: Nothing is known about this node.
@@ -213,14 +214,14 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset) {
// It is illegal to grow this node if we have treated it as an array of
// objects...
if (isArray()) {
- foldNodeCompletely();
+ if (FoldIfIncompatible) foldNodeCompletely();
return true;
}
if (Offset) { // We could handle this case, but we don't for now...
DEBUG(std::cerr << "UNIMP: Trying to merge a growth type into "
<< "offset != 0: Collapsing!\n");
- foldNodeCompletely();
+ if (FoldIfIncompatible) foldNodeCompletely();
return true;
}
@@ -277,7 +278,7 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset) {
break;
}
default:
- foldNodeCompletely();
+ if (FoldIfIncompatible) foldNodeCompletely();
return true;
}
}
@@ -356,7 +357,7 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset) {
<< "\n due to:" << NewTy << " @ " << Offset << "!\n"
<< "SubType: " << SubType << "\n\n");
- foldNodeCompletely();
+ if (FoldIfIncompatible) foldNodeCompletely();
return true;
}
OpenPOWER on IntegriCloud