Go to file
Chandler Carruth 93063e6191 [unroll] Make the unroll cost analysis terminate deterministically and
reasonably quickly.

I don't have a reduced test case, but for a version of FFMPEG, this
makes the loop unroller start finishing at all (after over 15 minutes of
running, it hadn't terminated for me, no idea if it was a true infloop
or just exponential work).

The key thing here is to check the DeadInstructions set when pulling
things off the worklist. Without this, we would re-walk the user list of
already dead instructions again and again and again. Consider phi nodes
with many, many operands and other patterns.

The other important aspect of this is that because we would keep
re-visiting instructions that were already known dead, we kept adding
their cost savings to this! This would cause our cost savings to be
*insanely* inflated from this.

While I was here, I also rotated the operand walk out of the worklist
loop to make the code easier to read. There is still work to be done to
minimize worklist traffic because we don't de-duplicate operands. This
means we may add the same instruction onto the worklist 1000s of times
if it shows up in 1000s of operansd to a PHI node for example.

Still, with this patch, the ffmpeg testcase I have finishes quickly and
I can't measure the runtime impact of the unroll analysis any more. I'll
probably try to do a few more cleanups to this code, but not sure how
much cleanup I can justify right now.

llvm-svn: 229038
2015-02-13 03:40:58 +00:00
clang Mark clang/test/CodeGen/exceptions-seh-leave.c as REQUIRES:asserts, for now. 2015-02-13 00:24:21 +00:00
clang-tools-extra Modularize.cpp: Simplify. Vector may be aware of ranged-for. 2015-02-13 00:28:32 +00:00
compiler-rt [Sanitizer] Change InitializeFlags() signatures. NFC. 2015-02-12 00:36:42 +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 log10 2015-01-30 18:00:34 +00:00
libcxx Fix error checking in get_temp_file_name(). 2015-02-13 03:02:28 +00:00
libcxxabi unwind: use explicit memcpy for register saving 2015-02-12 04:25:05 +00:00
lld Remove class that really does nothing. 2015-02-13 02:34:08 +00:00
lldb Add a ModuleList::ForEach(...) which takes the module list mutex calls the std::function argument with each module. If you return true in the callback, iteration will continue, if you return false, iteration will stop and the lock will be released. 2015-02-13 01:19:24 +00:00
llgo irgen: don't emit debug metadata for locals 2015-01-29 00:34:30 +00:00
llvm [unroll] Make the unroll cost analysis terminate deterministically and 2015-02-13 03:40:58 +00:00
openmp Fixed memory corruption problem. 2015-02-10 20:10:21 +00:00
polly Link LLVM libraries into libLLVMPolly if BUILD_SHARED_LIBS=ON is set 2015-02-12 08:27:19 +00:00