[all-commits] [llvm/llvm-project] 009f6c: [GVNSink] Make GVNSink resistant against self refe...

yurai007 via All-commits all-commits at lists.llvm.org
Tue May 10 07:07:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 009f6ce0ef1b5cdc8ec465797366ce1ce151acd4
      https://github.com/llvm/llvm-project/commit/009f6ce0ef1b5cdc8ec465797366ce1ce151acd4
  Author: Dawid Jurczak <dawid_jurek at vp.pl>
  Date:   2022-05-10 (Tue, 10 May 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVNSink.cpp
    M llvm/test/Transforms/GVNSink/sink-common-code.ll

  Log Message:
  -----------
  [GVNSink] Make GVNSink resistant against self referencing instructions (PR36954)

Before this change GVNSink pass suffers from stack overflow while processing self referenced instruction in unreachable basic block.
According [1] and [2] it's reasonable to make pass resistant against self referencing instructions.
To fix issue we skip sinking analysis when we reach instruction coming from unreachable block.

[1] https://groups.google.com/g/llvm-dev/c/843Tig9IzwA
[2] https://lists.llvm.org/pipermail/llvm-dev/2015-February/082629.html

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




More information about the All-commits mailing list