Fixes BPatch_basicBlockLoop::hasAncestor
authorKevin Roundy <roundy@cumin.cs.wisc.edu>
Wed, 3 Nov 2010 23:08:19 +0000 (18:08 -0500)
committerKevin Roundy <roundy@cumin.cs.wisc.edu>
Wed, 3 Nov 2010 23:08:19 +0000 (18:08 -0500)
commit49ab184694337701a20e36d0b0616feaa487c7ee
tree6d6d69c7ccbe7e67acc15e59a1b6f4df6e82ef60
parent04e278036a46be15afe0645a7dd4edfb337789ea
Fixes BPatch_basicBlockLoop::hasAncestor

BPatch_basicBlockLoop::hasAncestor(otherloop) queries were breaking for complicated loops.
hasAncestor works by traversing a linked list of parents, but this method can fail if a loop
is contained by multiple equivalent loops defined by distinct back edges.
I switched the hasAncestor implementation to do a lookup in the (already existing)
BPatch_basicBlockLoop::containedLoops set.
dyninstAPI/src/BPatch_basicBlockLoop.C