[all-commits] [llvm/llvm-project] ae266e: [LVI] Remove recursion from getValueForCondition (...

Carl Ritson via All-commits all-commits at lists.llvm.org
Wed Jun 23 17:59:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae266e743c9182ebd9702ccea2afb16f470013db
      https://github.com/llvm/llvm-project/commit/ae266e743c9182ebd9702ccea2afb16f470013db
  Author: Carl Ritson <carl.ritson at amd.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M llvm/lib/Analysis/LazyValueInfo.cpp

  Log Message:
  -----------
  [LVI] Remove recursion from getValueForCondition (NFCI)

Convert getValueForCondition to a worklist model instead of using
recursion.

In pathological cases getValueForCondition recurses heavily.
Stack frames are quite expensive on x86-64, and some operating
systems (e.g. Windows) have relatively low stack size limits.
Using a worklist avoids potential failures from stack overflow.

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




More information about the All-commits mailing list