[all-commits] [llvm/llvm-project] e0615b: [Loads] Add optimized FindAvailableLoadedValue() o...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Sun Feb 21 09:43:27 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e0615bcd39fd863361ce8eb68aafdfcdcd8b067d
https://github.com/llvm/llvm-project/commit/e0615bcd39fd863361ce8eb68aafdfcdcd8b067d
Author: Nikita Popov <nikita.ppv at gmail.com>
Date: 2021-02-21 (Sun, 21 Feb 2021)
Changed paths:
M llvm/include/llvm/Analysis/Loads.h
M llvm/lib/Analysis/Loads.cpp
M llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
Log Message:
-----------
[Loads] Add optimized FindAvailableLoadedValue() overload (NFCI)
FindAvailableLoadedValue() accepts an iterator by reference. If no
available value is found, then the iterator will either be left
at a clobbering instruction or the beginning of the basic block.
This allows using FindAvailableLoadedValue() across multiple blocks.
If this functionality is not needed, as is the case in InstCombine,
then we can use a much more efficient implementation: First try
to find an available value, and only perform clobber checks if
we actually found one. As this function only looks at a very small
number of instructions (6 by default) and usually doesn't find an
available value, this saves many expensive alias analysis queries.
More information about the All-commits
mailing list