[PATCH] D57316: [LoopSimplifyCFG] Work around bug in DTU by using lazy strategy

Chijun Sima via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 22:35:11 PST 2019


NutshellySima added a comment.

In D57316#1377177 <https://reviews.llvm.org/D57316#1377177>, @kuhar wrote:

> @NutshellySima What was the reason we introduced DTU.insertEdge and DTU.deleteEdge? While they are essential primitives in the incremental updater, couldn't we get rid of it entirely? My memory is blurry.


Under Eager update strategy, they act as an alias of DTU.applyUpdates. And under Lazy update strategy, they'll assert when insertEdge() is inserting a nonexistent edge / deleteEdge() is deleting an edge that still exists to detect possible misuses.

Anyway, it is OK to get rid of insertEdge/deleteEdge entirely if we remove the check I mentioned. (I didn't implement a similar check in DTU.applyUpdates under Lazy strategy because it is still an open debate whether trying "inserting a nonexistent edge/deleting an edge that still exists" is a good approach.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57316/new/

https://reviews.llvm.org/D57316





More information about the llvm-commits mailing list