[PATCH] D28459: Make processing @llvm.assume more efficient - Add affected values to the assumption cache

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 8 12:21:09 PST 2017


hfinkel created this revision.
hfinkel added reviewers: chandlerc, wash, sanjoy, Prazek, reames, davide, dyung, dberlin.
hfinkel added a subscriber: llvm-commits.
Herald added a subscriber: mcrosier.

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.


https://reviews.llvm.org/D28459

Files:
  include/llvm/Analysis/AssumptionCache.h
  lib/Analysis/AssumptionCache.cpp
  lib/Analysis/LazyValueInfo.cpp
  lib/Analysis/ValueTracking.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28459.83570.patch
Type: text/x-patch
Size: 7887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170108/20735863/attachment.bin>


More information about the llvm-commits mailing list