aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopUnroll.cpp
diff options
context:
space:
mode:
authorHarald van Dijk <harald@gigawatt.nl>2021-06-03 17:51:52 +0100
committerHarald van Dijk <harald@gigawatt.nl>2021-06-03 17:51:52 +0100
commit5d2b3de284f46e4c1e60fc5f266b085f54391566 (patch)
tree1d667237b634705cafd985a5064145129cda7f5c /llvm/lib/Transforms/Utils/LoopUnroll.cpp
parentb0ab79ee2dfab993d95f01aaa2d51bbe6af9ecbe (diff)
downloadllvm-5d2b3de284f46e4c1e60fc5f266b085f54391566.zip
llvm-5d2b3de284f46e4c1e60fc5f266b085f54391566.tar.gz
llvm-5d2b3de284f46e4c1e60fc5f266b085f54391566.tar.bz2
[SLP] Avoid std::stable_sort(properlyDominates()).
As noticed by NAKAMURA Takumi back in 2017, we cannot use properlyDominates for std::stable_sort as properlyDominates only partially orders blocks. That is, for blocks A, B, C, D, where A dominates B and C dominates D, we have A == C, B == C, but A < B. This is not a valid comparison function for std::stable_sort and causes different results between libstdc++ and libc++. This change uses DFS numbering to give deterministic results for all reachable blocks. Unreachable blocks are ignored already, so do not need special consideration. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D103441
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUnroll.cpp')
0 files changed, 0 insertions, 0 deletions