[PATCH] D52915: [PM] keeping history when original SCC split and then merge into itself in the same round of SCC update .

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 10 15:59:13 PDT 2018


chandlerc added a comment.

Minor implementation improvement suggestion...



================
Comment at: lib/Transforms/IPO/Inliner.cpp:1164-1171
+    // It is possible that even if no new SCC is generated (i.e., C == OldC),
+    // the original SCC could be split and then merged into the same one as
+    // itself. During this process, the original SCC will be added into
+    // UR.CWorklist again, we want to cache such case too.
+    //
+    // So if only split has ever happen, the size of UR.CWorklist will be
+    // larger than that before the SCC update, and we will cache the history
----------------
Using the size seems a bit odd here -- what about instead checking whether `C != OldC` or if `C` is in `CWorklist`? This is efficient with the given data structure and seems like it captures the intent of what you're checking.


Repository:
  rL LLVM

https://reviews.llvm.org/D52915





More information about the llvm-commits mailing list