llvm-project/llvm/lib/Transforms/InstCombine
Hal Finkel 8a9a783f2c Make processing @llvm.assume more efficient - Add affected values to the assumption cache
Here's my second try at making @llvm.assume processing more efficient. My
previous attempt, which leveraged operand bundles, r289755, didn't end up
working: it did make assume processing more efficient but eliminating the
assumption cache made ephemeral value computation too expensive. This is a
more-targeted change. We'll keep the assumption cache, but extend it to keep a
map of affected values (i.e. values about which an assumption might provide
some information) to the corresponding assumption intrinsics. This allows
ValueTracking and LVI to find assumptions relevant to the value being queried
without scanning all assumptions in the function. The fact that ValueTracking
started doing O(number of assumptions in the function) work, for every
known-bits query, has become prohibitively expensive in some cases.

As discussed during the review, this is a pragmatic fix that, longer term, will
likely be replaced by a more-principled solution (perhaps based on an extended
SSA form).

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

llvm-svn: 291671
2017-01-11 13:24:24 +00:00
..
CMakeLists.txt [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
InstCombineAddSub.cpp [InstCombine] add a wrapper for a common pair of transforms; NFCI 2017-01-10 23:49:07 +00:00
InstCombineAndOrXor.cpp [InstCombine] add a wrapper for a common pair of transforms; NFCI 2017-01-10 23:49:07 +00:00
InstCombineCalls.cpp Make processing @llvm.assume more efficient - Add affected values to the assumption cache 2017-01-11 13:24:24 +00:00
InstCombineCasts.cpp Replace APFloatBase static fltSemantics data members with getter functions 2016-12-14 11:57:17 +00:00
InstCombineCompares.cpp fix comment typos; NFC 2017-01-09 16:27:56 +00:00
InstCombineInternal.h [InstCombine] add a wrapper for a common pair of transforms; NFCI 2017-01-10 23:49:07 +00:00
InstCombineLoadStoreAlloca.cpp [InstCombine] use combineMetadataForCSE instead of copying it; NFCI 2017-01-02 23:25:28 +00:00
InstCombineMulDivRem.cpp [InstCombine] add a wrapper for a common pair of transforms; NFCI 2017-01-10 23:49:07 +00:00
InstCombinePHI.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
InstCombineSelect.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
InstCombineShifts.cpp [InstCombine] add a wrapper for a common pair of transforms; NFCI 2017-01-10 23:49:07 +00:00
InstCombineSimplifyDemanded.cpp [InstCombine] Fix typo in comment. NFC 2016-12-29 05:38:31 +00:00
InstCombineVectorOps.cpp [InstCombine] Use getVectorNumElements instead of explicitly casting to VectorType and calling getNumElements. NFC 2016-12-29 07:03:18 +00:00
InstructionCombining.cpp [InstCombine] add a wrapper for a common pair of transforms; NFCI 2017-01-10 23:49:07 +00:00
LLVMBuild.txt Update libdeps since TLI was moved from Target to Analysis in r226078. 2015-01-15 05:21:00 +00:00