llvm-6502/lib
Chandler Carruth 595a99573a [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229038 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 03:40:58 +00:00
..
Analysis Fix a crash in the assumption cache when inlining indirect function calls 2015-02-12 21:04:22 +00:00
AsmParser AsmWriter/Bitcode: MDImportedEntity 2015-02-13 01:46:02 +00:00
Bitcode AsmWriter/Bitcode: MDImportedEntity 2015-02-13 01:46:02 +00:00
CodeGen Add support for having multiple sections with the same name and comdat. 2015-02-12 23:29:51 +00:00
DebugInfo Improve llvm-pdbdump output display. 2015-02-13 01:23:51 +00:00
ExecutionEngine Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Fuzzer [fuzzer] move default sanitizer options to a separate file 2015-02-06 19:52:07 +00:00
IR IR: Drop never-used defaults for DIBuilder::createTemplate*(), NFC 2015-02-13 03:35:29 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker [LinkModules] Change the way ModuleLinker merges triples. 2015-02-13 00:40:41 +00:00
LTO Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
MC Add support for having multiple sections with the same name and comdat. 2015-02-12 23:29:51 +00:00
Object Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Option Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
ProfileData Fix accidental bit flip. 2015-02-12 16:30:00 +00:00
Support Support: Add dwarf::getOperationEncoding() 2015-02-13 01:05:00 +00:00
TableGen Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Target R600/SI: Remove unnecessary check for fpimm 2015-02-13 02:47:22 +00:00
Transforms [unroll] Make the unroll cost analysis terminate deterministically and 2015-02-13 03:40:58 +00:00
CMakeLists.txt Reverting r227452, which adds back the fuzzer library. Now excluding the fuzzer library based on LLVM_USE_SANITIZE_COVERAGE being set or unset. 2015-01-29 16:58:29 +00:00
LLVMBuild.txt
Makefile Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00