The elts of ActivePreds which is defined as a SmallPtrSet are copied into
Blocks using std::copy. This makes the resultant order of Blocks
non-deterministic. We cannot simply sort Blocks as they need to match the
corresponding Values. So a better approach is to define ActivePreds as
SmallSetVector.
This fixes the following failures in http://lab.llvm.org:8011/builders/reverse-iteration:
        LLVM :: Transforms/GVNSink/indirect-call.ll
        LLVM :: Transforms/GVNSink/sink-common-code.ll
        LLVM :: Transforms/GVNSink/struct.llDetails
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This is right in the sense that it's deterministic, which is definitely an improvement. I'm not sure equality comparisons on ModelledPHI really work the way they're supposed to, even with this patch, but I guess we don't need to fix that here.
Looks fine, but I'll wait for @dberlin to comment.
Comment Actions
This seems reasonable to me, 
I'd just add a comment to explain why it's a small set vector (so nobody breaks this future)