[all-commits] [llvm/llvm-project] 83e723: [LVI] Cache lookup of experimental.guard intrinsic...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Jun 14 06:36:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 83e7230e5a1fbe2d1d54912d7841e8ae590df01a
      https://github.com/llvm/llvm-project/commit/83e7230e5a1fbe2d1d54912d7841e8ae590df01a
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-06-14 (Sun, 14 Jun 2020)

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

  Log Message:
  -----------
  [LVI] Cache lookup of experimental.guard intrinsic (NFC)

When LVI is performing assume intersections, it also checks for
llvm.experimental.guard intrinsics. To avoid unnecessary block
scans, it first checks whether this intrinsic is declared in the
module at all. I've noticed that we end up spending quite a lot
of time looking up that function again and again...

Avoid this by only looking it up once when LazyValueInfo is
constructed. This of course assumes that we don't introduce new
guard intrinsics (which is the case for all existing uses of LVI --
and even if it weren't, it would not introduce miscompiles, just
potentially lose optimization power.)

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




More information about the All-commits mailing list