llvm-project/llvm/test
Kazu Hirata e23d786526 [JumpThreading] Fix infinite loop (PR44611)
Summary:
This patch fixes https://bugs.llvm.org/show_bug.cgi?id=44611 by
preventing an infinite loop in the jump threading pass when
-jump-threading-across-loop-headers is on.  Specifically, without this
patch, jump threading through two basic blocks would trigger on the
same area of the CFG over and over, resulting in an infinite loop.

Consider testcase PR44611-across-header-hang.ll in this patch.  The
first opportunity to thread through two basic blocks is:

  from bb_body2 through bb_header and bb_body1 to bb_body2.

The pass duplicates bb_header and bb_body1 as, say, bb_header.thread1
and bb_body1.thread1.  Since bb_header contains a successor edge back
to itself, bb_header.thread1 also contains a successor edge to
bb_header, immediately giving rise to the next jump threading
opportunity:

  from bb_header.thread1 through bb_header and bb_body1 to bb_body2.

After that, we repeatedly thread an incoming edge into bb_header
through bb_header and bb_body1 to bb_body2.  In other words, we keep
peeling one iteration from bb_header's self loop.

The patch fixes the problem by preventing the pass from duplicating a
basic block containing a self loop.

Reviewers: wmi, junparser, efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76390
2020-03-19 12:49:36 -07:00
..
Analysis [X86] Attempt to more accurately model the cost of a bool reduction of wide vector type. 2020-03-19 09:31:05 -07:00
Assembler Add support for SHA256 source file checksums in debug info 2020-03-12 16:32:05 -07:00
Bindings Revert "Rework go bindings so that validation works fine" 2020-02-24 09:20:08 -08:00
Bitcode Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode 2020-03-11 13:26:06 -07:00
BugPoint
CodeGen [AMDGPU] Move frame pointer from s34 to s33 2020-03-19 15:35:16 -04:00
DebugInfo [AMDGPU] Add Scratch Wave Offset to Scratch Buffer Descriptor in entry functions 2020-03-19 15:35:16 -04:00
Demangle
Examples
ExecutionEngine [JITLink][AArch64] Fix incorrect capitalization in a testcase name. 2020-03-14 18:54:40 -07:00
Feature Remove no un-necessary require for load_extension.ll 2020-02-26 08:29:09 +01:00
FileCheck
IR [AssumeBundles] filter usefull attriutes to preserve 2020-03-13 17:35:47 +01:00
Instrumentation Reland: [Coverage] Revise format to reduce binary size 2020-02-28 18:12:04 -08:00
Integer
JitListener
LTO ThinLTOBitcodeWriter: drop dso_local when a GlobalVariable is converted to a declaration 2020-03-05 18:09:33 -08:00
Linker Fix conflict value for metadata "Objective-C Garbage Collection" in the mix of swift and Objective-C bitcode 2020-03-11 13:26:06 -07:00
MC [MC] Recalculate fragment offsets after relaxation 2020-03-17 14:48:05 -07:00
MachineVerifier
Object [obj2yaml] - SHT_DYNAMIC and SHT_REL* sections: stop dumping sh_entsize field when it has the default value. 2020-03-19 17:25:53 +03:00
ObjectYAML [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
Other [SLP] Support vectorizing functions provided by vector libs. 2020-03-10 13:10:50 +00:00
Reduce
SafepointIRVerifier
Support
SymbolRewriter
TableGen [TableGen] Support combining AssemblerPredicates with ORs 2020-03-13 17:13:51 +00:00
ThinLTO/X86 [Object] Change ELFObjectFile<ELFT>::getFileFormatName() to use BFD names 2020-03-16 07:42:04 -07:00
Transforms [JumpThreading] Fix infinite loop (PR44611) 2020-03-19 12:49:36 -07:00
Unit
Verifier [VP,Integer,#1] Vector-predicated integer intrinsics 2020-03-19 10:51:47 +01:00
YAMLParser
tools [test] Re-enable accidentally disabled X86 tests 2020-03-19 09:29:23 -07:00
.clang-format
CMakeLists.txt Revert abb00753 "build: reduce CMake handling for zlib" (PR44780) 2020-03-03 11:03:09 +01:00
TestRunner.sh
lit.cfg.py Revert "Rework go bindings so that validation works fine" 2020-02-24 09:20:08 -08:00
lit.site.cfg.py.in Revert abb00753 "build: reduce CMake handling for zlib" (PR44780) 2020-03-03 11:03:09 +01:00