[all-commits] [llvm/llvm-project] aa440b: [NFCI][ValueTracking] getUnderlyingObject(): grace...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Mon Mar 15 03:51:34 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aa440ba24dc25e4c95f6dcf8ff647024f3b12661
      https://github.com/llvm/llvm-project/commit/aa440ba24dc25e4c95f6dcf8ff647024f3b12661
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

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

  Log Message:
  -----------
  [NFCI][ValueTracking] getUnderlyingObject(): gracefully handle cycles

Normally, this function just doesn't bother about cycles,
and hopes that the caller supplied small-enough depth
so that at worst it will take a potentially large,
but limited amount of time. But that obviously doesn't work
if there is no depth limit.

This reapples 36f1c3db66f7268ea3183bcf0bbf05b3e1c570b4,
but without asserting, just bailout once cycle is detected.




More information about the All-commits mailing list