[all-commits] [llvm/llvm-project] 9fec38: [RS4GC] Fix hang on infinite loop

serguei-katkov via All-commits all-commits at lists.llvm.org
Mon Mar 22 23:04:43 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fec382601dfd61e0eccf007a158314ae76b145c
      https://github.com/llvm/llvm-project/commit/9fec382601dfd61e0eccf007a158314ae76b145c
  Author: Serguei Katkov <serguei.katkov at azul.com>
  Date:   2021-03-23 (Tue, 23 Mar 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
    A llvm/test/Transforms/RewriteStatepointsForGC/meetBDVState-hangs.ll

  Log Message:
  -----------
  [RS4GC] Fix hang on infinite loop

meetBDVState utility may sets the base pointer for the conflict state.
At this moment the base for conflict state does not have any meaning but
is used in comparison of BDV states. This comparison is used as an indicator
of progress done on iteration and RS4GC pass uses infinite loop to reach
fixed point.
As a result for added test on each iteration state for some phi nodes is updated
with other base value for conflict state and it indicates as a progress while
for conflict state there is no any progress more possible.
In reality the base value is transferred from one state to another and pass
detects the progress on these states.

The test is very fragile. The traversal order of states and operands of phi nodes
plays important role.

Reviewers: reames, dantrushin
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D99058




More information about the All-commits mailing list