diff options
author | Chris Lattner <sabre@nondot.org> | 2004-06-23 06:29:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-06-23 06:29:59 +0000 |
commit | 37ec591c746775ad71c30fc2aae5affd469d3370 (patch) | |
tree | 6af072b9073a1320b3dae51e190c3893ff98337d | |
parent | 1f2b892b4b6e5989f3bfe8938901deefdbb212b1 (diff) | |
download | external_llvm-37ec591c746775ad71c30fc2aae5affd469d3370.zip external_llvm-37ec591c746775ad71c30fc2aae5affd469d3370.tar.gz external_llvm-37ec591c746775ad71c30fc2aae5affd469d3370.tar.bz2 |
Fix merging of nodes whose incoming offset is not zero. This unbreaks DSA on
several mallocbench programs, including perl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14342 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index a15f374..53c39f9 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -825,8 +825,7 @@ DSNodeHandle ReachabilityCloner::getClonedNH(const DSNodeHandle &SrcNH) { unsigned MergeOffset = 0; DSNode *CN = NH.getNode(); if (CN->getSize() != 1) - MergeOffset = ((i << DS::PointerShift)+NH.getOffset() - - SrcNH.getOffset()) %CN->getSize(); + MergeOffset = ((i << DS::PointerShift)+NH.getOffset()) % CN->getSize(); CN->addEdgeTo(MergeOffset, DestEdge); } } |