1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test
Sanjay Patel 8c8f34a124 [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
Bitcode
BugPoint
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
LibDriver
Linker [ThinLTO] Find all needed metadata when linking metadata as postpass 2016-01-25 22:04:56 +00:00
LTO [LTO] Restore original linkage of externals prior to splitting 2016-01-18 23:24:54 +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
SymbolRewriter
TableGen [llvm-tblgen] Stop emitting the intrinsic name matching code 2016-01-26 23:01:21 +00:00
tools [DebugInfo] Support zero-length CIE in the _eh_frame parser 2016-01-27 14:05:35 +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
.clang-format
CMakeLists.txt Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00
lit.cfg Introduce sanstats tool and llvm::CreateSanitizerStatReport function. 2016-01-16 00:31:11 +00:00
lit.site.cfg.in
TestRunner.sh