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

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 16:36:26 PDT 2018


wmi created this revision.
wmi added reviewers: chandlerc, eraman.

I am not sure whether this is the right approach, just send it out to get comments and improve it on the way.

In https://reviews.llvm.org/rL309784, inline history is added to prevent infinite inlining across multiple run of inliner and SCC update, but the history will only be kept when new SCC is actually generated during SCC update.

We found a case that SCC can be split and then merge into itself in the same round of SCC update, so the same SCC will be pop out from UR.CWorklist and then added back immediately, without any new SCC generated, that is why the existing patch cannot catch the case.

The patch changes the condition when inline history should be kept. If only UR.CWorklist has ever increased after SCC update, it means split has happen and we should keep the inline history to prevent infinite loop.


Repository:
  rL LLVM

https://reviews.llvm.org/D52915

Files:
  lib/Transforms/IPO/Inliner.cpp
  test/Transforms/Inline/cgscc-cycle-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52915.168401.patch
Type: text/x-patch
Size: 20281 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181004/e67c3b56/attachment.bin>


More information about the llvm-commits mailing list