llvm-project/llvm/test
Sanjay Patel 5264cc772c [SimplifyCFG] limit recursion depth when speculating instructions (PR26308)
This is a fix for:
https://llvm.org/bugs/show_bug.cgi?id=26308

With the switch to using the TTI cost model in:
http://reviews.llvm.org/rL228826
...it became possible to hit a zero-cost cycle of instructions (gep -> phi -> gep...), 
so we need a cap for the recursion in DominatesMergePoint().

A recursion depth parameter was already added for a different reason in:
http://reviews.llvm.org/rL255660
...so we can just set a limit for it.

I pulled "10" out of the air and made it an independent parameter that we can play with.
It might be higher than it needs to be given the currently low default value of 
PHINodeFoldingThreshold (2). That's the starting cost value that we enter the recursion
with, and most instructions have cost set to TCC_Basic (1), so I don't think we're going
to speculate more than 2 instructions with the current parameters.

As noted in the review and the TODO comment, we can do better than just limiting recursion
depth.

Differential Revision: http://reviews.llvm.org/D16637

llvm-svn: 258971
2016-01-27 19:22:45 +00:00
..
Analysis [DemandedBits] Fix computation of demanded bits for ICmps 2016-01-25 14:49:36 +00:00
Assembler Fix constant folding of constant vector GEPs with undef or null as pointer argument. 2016-01-19 16:34:31 +00:00
Bindings Deprecate a few C APIs. 2015-12-18 23:46:42 +00:00
Bitcode [WinEH] Verify unwind edges against EH pad tree 2016-01-10 04:28:38 +00:00
BugPoint [bugpoint] Add a named metadata (+their operands) reducer 2015-11-06 00:12:50 +00:00
CodeGen Refactor backend diagnostics for unsupported features 2016-01-27 17:30:33 +00:00
DebugInfo Followup to 258750; update more tests to use .p2align . 2016-01-26 00:35:07 +00:00
Examples
ExecutionEngine [RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc. 2016-01-21 21:59:50 +00:00
Feature MachineScheduler: Honor optnone functions in the pre-ra scheduler. 2016-01-20 22:38:25 +00:00
FileCheck
Instrumentation [sanitizer] [msan] Fix origin store of array types 2016-01-11 19:55:27 +00:00
Integer
JitListener Fix several accidental DOS line endings in source files 2016-01-03 17:22:03 +00:00
LTO [LTO] Restore original linkage of externals prior to splitting 2016-01-18 23:24:54 +00:00
LibDriver
Linker [ThinLTO] Find all needed metadata when linking metadata as postpass 2016-01-25 22:04:56 +00:00
MC Followup to 258750; update all MC tests to use .p2align . 2016-01-26 00:27:59 +00:00
Object Fix identify_magic() to check that a file that starts with MH_MAGIC is 2016-01-26 23:43:37 +00:00
Other Recommit r256952 "Filtering IR printing for print-after-all/print-before-all" 2016-01-06 22:55:03 +00:00
SymbolRewriter
TableGen [llvm-tblgen] Stop emitting the intrinsic name matching code 2016-01-26 23:01:21 +00:00
Transforms [SimplifyCFG] limit recursion depth when speculating instructions (PR26308) 2016-01-27 19:22:45 +00:00
Unit
Verifier Add a "gc-transition" operand bundle 2016-01-20 19:50:25 +00:00
YAMLParser
tools [DebugInfo] Support zero-length CIE in the _eh_frame parser 2016-01-27 14:05:35 +00:00
.clang-format
CMakeLists.txt Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00
TestRunner.sh
lit.cfg Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00
lit.site.cfg.in Make WinCOFFObjectWriter.cpp's timestamp writing not use ENABLE_TIMESTAMPS 2016-01-06 19:05:19 +00:00