[all-commits] [llvm/llvm-project] f63ab1: [CaptureTracking] Early abort on too many uses (NFCI)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Nov 7 02:55:14 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f63ab188c63be12871da75bfc5801a7fc752769b
      https://github.com/llvm/llvm-project/commit/f63ab188c63be12871da75bfc5801a7fc752769b
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-11-07 (Sat, 07 Nov 2020)

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

  Log Message:
  -----------
  [CaptureTracking] Early abort on too many uses (NFCI)

If there are too many uses, we should directly return -- there's
no point in inspecting the remaining uses in the worklist, as we
have to conservatively assume a capture anyway. This also means
that tooManyUses() gets called exactly once, rather than
potentially many times.

This restores the behavior prior to e9832dfdf366ddffba68164adb6855d17c9f87c1,
where this was accidentally changed while moving the AddUses logic
into a closure, thus making the return a return from the closure
rather than the whole function.




More information about the All-commits mailing list