diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-07 06:12:52 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-07 06:12:52 +0000 |
commit | deb7676f0fa3c374d5bc14ff22a41051526a9d92 (patch) | |
tree | 417a522b2b9096eb214f2eebb16a082db4e93783 /llvm/lib/Analysis/DataStructure/Local.cpp | |
parent | 71068a046218544b56392f9fae43af2b780183aa (diff) | |
download | bcm5719-llvm-deb7676f0fa3c374d5bc14ff22a41051526a9d92.tar.gz bcm5719-llvm-deb7676f0fa3c374d5bc14ff22a41051526a9d92.zip |
As much as I hate to say it, the whole setNode interface for DSNodeHandles
is HOPELESSLY broken. The problem is that the embedded getNode call can
change the offset of the node handle in unpredictable ways.
As it turns out, all of the clients of this method really want to set
both the node and the offset, thus it is more efficient (and less buggy)
to just do both of them in one method call. This fixes some obscure bugs
handling non-forwarded node handles.
llvm-svn: 14660
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/Local.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/Local.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DataStructure/Local.cpp b/llvm/lib/Analysis/DataStructure/Local.cpp index 4a61e8bb106..62dc7af2f16 100644 --- a/llvm/lib/Analysis/DataStructure/Local.cpp +++ b/llvm/lib/Analysis/DataStructure/Local.cpp @@ -259,8 +259,7 @@ DSNodeHandle GraphBuilder::getValueDest(Value &Val) { N = createNode(); } - NH.setNode(N); // Remember that we are pointing to it... - NH.setOffset(0); + NH.setTo(N, 0); // Remember that we are pointing to it... return NH; } |