Go to file
Chandler Carruth e2f36bcb84 [Assumptions] Make collecting ephemeral values not quadratic in the
number of assume intrinsics.

The classical way to have a cache-friendly vector style container when
we need queue semantics for BFS instead of stack semantics for DFS is to
use an ever-growing vector and an index. Erasing from the front requires
O(size) work, and unless we expect the worklist to grow *very* large,
its probably cheaper to just grow and race down the list.

But that makes it more bad that we're putting the assume intrinsics in
this at all. We end up looking at the (by definition empty) use list to
see if they're ephemeral (when we've already put them in that set), etc.

Instead, directly populate the worklist with the operands when we mark
the assume intrinsics as ephemeral. Also, test the visited set *before*
putting things into the worklist so we don't accumulate the same value
in the list 100s of times.

It would be nice to use a set-vector for this but I think its useful to
test the set earlier to avoid repeatedly querying whether the same
instruction is safe to speculate.

Hopefully with these changes the number of values pushed onto the
worklist is smaller, and we avoid quadratic work by letting it grow as
necessary.

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

llvm-svn: 279099
2016-08-18 17:51:24 +00:00
clang Revert "[Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds" 2016-08-18 17:43:02 +00:00
clang-tools-extra [clang-tidy docs] Minor fix 2016-08-18 11:12:03 +00:00
compiler-rt [CMake] Stop building eprintf library on Darwin 2016-08-18 17:10:55 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement vstore_half{,n} 2016-08-17 20:02:11 +00:00
libcxx make the associative containers do the right thing for propogate_on_container_assignment. Fixes bug #29001. Tests are only for <map> right now - more complete tests will come when we revamp our allocator testing structure. 2016-08-17 23:24:02 +00:00
libcxxabi Default LIBCXXABI_LIBDIR_SUFFIX to LLVM_LIBDIR_SUFFIX 2016-08-16 03:44:55 +00:00
libunwind Allow building both shared and static library 2016-08-08 22:55:48 +00:00
lld [ELF] - Linkerscript: removed duplicate forward declarations, regrouped. NFC. 2016-08-18 13:00:49 +00:00
lldb Fixed a problem where we failed to get the size of an Objective-C type. 2016-08-18 17:45:50 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm [Assumptions] Make collecting ephemeral values not quadratic in the 2016-08-18 17:51:24 +00:00
openmp cleanup: fixed names of dummy arguments of Fortran interfaces declarations, no functional changes done 2016-08-17 18:18:21 +00:00
parallel-libs [StreamExecutor] Rename StreamExecutor to Executor 2016-08-16 18:18:32 +00:00
polly [SCEVValidator] Don't reorder multiplies in extractConstantFactor. 2016-08-18 16:30:42 +00:00