[all-commits] [llvm/llvm-project] e24067: [ArgPromotion] Protect harder against recursive pr...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Feb 11 00:30:54 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e24067819fbda2f2bf5d1f43dfe36c114accc21d
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-02-11 (Fri, 11 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
    A llvm/test/Transforms/ArgumentPromotion/pr42028-recursion.ll

  Log Message:
  [ArgPromotion] Protect harder against recursive promotion (PR42028)

In addition to the self-recursion check, also check whether there
is more than one node in the SCC, which implies that there is a
larger cycle. I believe checking SCC structure (rather than
something like norecurse) is the right thing to do here, because
this is specifically about preventing infinite loops over the SCC.

Fixes https://github.com/llvm/llvm-project/issues/42028.

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

More information about the All-commits mailing list