[LoopInfo] Remove duplicates in ExitBlocks to reduce the compile time of
authorWei Mi <wmi@google.com>
Fri, 27 Sep 2019 05:43:31 +0000 (05:43 +0000)
committerWei Mi <wmi@google.com>
Fri, 27 Sep 2019 05:43:31 +0000 (05:43 +0000)
commit40d4b53329d564588a99cb02b0c357fd8f90532a
treeeaeaabced6e60c2a84864730d1d486b0f24616b9
parent9c8efeda5c81232f32ac4daa4c1be460a28f1b53
[LoopInfo] Remove duplicates in ExitBlocks to reduce the compile time of
hasDedicatedExits.

For the compile time problem described in https://reviews.llvm.org/D67359,
turns out the root cause is there are many duplicates in ExitBlocks so
the algorithm complexity of hasDedicatedExits gets very high. If we remove
the duplicates, the compile time issue is gone.

Thanks to Philip Reames for raising a good question and it leads me to
find the root cause.

Differential Revision: https://reviews.llvm.org/D68107

llvm-svn: 373045
llvm/include/llvm/Analysis/LoopInfoImpl.h