[all-commits] [llvm/llvm-project] f9599b: [AssumptionCache] caches @llvm.experimental.guard's

Joshua Cao via All-commits all-commits at lists.llvm.org
Tue Jan 24 20:17:35 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9599bbc7a3f831e1793a549d8a7a19265f3e504
      https://github.com/llvm/llvm-project/commit/f9599bbc7a3f831e1793a549d8a7a19265f3e504
  Author: Joshua Cao <cao.joshua at yahoo.com>
  Date:   2023-01-24 (Tue, 24 Jan 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/AssumptionCache.h
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/lib/Analysis/AssumeBundleQueries.cpp
    M llvm/lib/Analysis/AssumptionCache.cpp
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp
    M llvm/test/Analysis/AssumptionCache/basic.ll
    M llvm/test/Analysis/ScalarEvolution/guards.ll
    M llvm/test/Transforms/EarlyCSE/guards.ll

  Log Message:
  -----------
  [AssumptionCache] caches @llvm.experimental.guard's

As discussed in https://github.com/llvm/llvm-project/issues/59901

This change is not NFC. There is one SCEV and EarlyCSE test that have an
improved analysis/optimization case. Rest of the tests are not failing.

I've mostly only added cleanup to SCEV since that is where this issue
started. As a follow up, I believe there is more cleanup opportunity in
SCEV and other affected passes.

There could be cases where there are missed registerAssumption of
guards, but this case is not so bad because there will be no
miscompilation. AssumptionCacheTracker should take care of deleted
guards.

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




More information about the All-commits mailing list