[all-commits] [llvm/llvm-project] be5738: [InstCombine] Create a class to lazily track compu...
Dhruv Chawla via All-commits
all-commits at lists.llvm.org
Tue Oct 17 09:10:34 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: be57381a4a08b0b6a89d5b5fdec0880b202e99f4
https://github.com/llvm/llvm-project/commit/be57381a4a08b0b6a89d5b5fdec0880b202e99f4
Author: Dhruv Chawla <dhruv263.dc at gmail.com>
Date: 2023-10-17 (Tue, 17 Oct 2023)
Changed paths:
M llvm/include/llvm/Analysis/ValueTracking.h
A llvm/include/llvm/Analysis/WithCache.h
M llvm/include/llvm/Transforms/InstCombine/InstCombiner.h
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
Log Message:
-----------
[InstCombine] Create a class to lazily track computed known bits (#66611)
This patch adds a new class "WithCache" which stores a pointer to
any type passable to computeKnownBits along with KnownBits
information which is computed on-demand when getKnownBits()
is called. This allows reusing the known bits information when it is
passed as an argument to multiple functions.
It also changes a few functions to accept WithCache(s) so that
known bits information computed in some callees can be propagated to
others from the top level visitAddSub caller.
This gives a speedup of 0.14%:
https://llvm-compile-time-tracker.com/compare.php?from=499d41cef2e7bbb65804f6a815b9fa8b27efce0f&to=fbea87f1f1e6d5552e2bc309f8e201a3af6d28ec&stat=instructions:u
More information about the All-commits
mailing list