1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/test
Chandler Carruth a61218ea75 [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when
unswitching loops.

Original patch trying to address this was sent in D47624, but that
didn't quite handle things correctly. There are two key principles used
to select whether and how to invalidate SCEV-cached information about
loops:

1) We must invalidate any info SCEV has cached before unswitching as we
   may change (or destroy) the loop structure by the act of unswitching,
   and make it hard to recover everything we want to invalidate within
   SCEV.

2) We need to invalidate all of the loops whose CFGs are mutated by the
   unswitching. Notably, this isn't the *entire* loop nest, this is
   every loop contained by the outermost loop reached by an exit block
   relevant to the unswitch.

And we need to do this even when doing trivial unswitching.

I've added more focused tests that directly check that SCEV starts off
with imprecise information and after unswitching (and simplifying
instructions) re-querying SCEV will produce precise information. These
tests also specifically work to check that an *outer* loop's information
becomes precise.

However, the testing here is still a bit imperfect. Crafting test cases
that reliably fail to be analyzed by SCEV before unswitching and succeed
afterward proved ... very, very hard. It took me several hours and
careful work to build these, and I'm not optimistic about necessarily
coming up with more to cover more elaborate possibilities. Fortunately,
the code pattern we are testing here in the pass is really
straightforward and reliable.

Thanks to Max Kazantsev for the initial work on this as well as the
review, and to Hal Finkel for helping me talk through approaches to test
this stuff even if it didn't come to much.

Differential Revision: https://reviews.llvm.org/D47624

llvm-svn: 336183
2018-07-03 09:13:27 +00:00
..
Analysis [InstCombine] Delay foldICmpUsingKnownBits until simple transforms are done 2018-07-03 06:23:57 +00:00
Assembler ConstantFold: Don't fold global address vs. null for addrspace != 0 2018-06-26 18:55:43 +00:00
Bindings
Bitcode [ThinLTO] Parse module summary index from assembly 2018-06-26 13:56:49 +00:00
BugPoint
CodeGen [X86] Add avx512vl command line to break-false-dep.ll 2018-07-03 04:43:49 +00:00
DebugInfo [DebugInfo] Fix PR37395. 2018-07-03 07:56:04 +00:00
Examples
ExecutionEngine Revert "Re-land r335297 "[X86] Implement more of x86-64 large and medium PIC code models"" 2018-06-28 17:56:43 +00:00
Feature
FileCheck [FileCheck] Add CHECK-EMPTY directive for checking for blank lines 2018-06-26 15:15:45 +00:00
Instrumentation [HWASan] Do not retag allocas before return from the function. 2018-06-29 20:20:17 +00:00
Integer
JitListener
Linker
LTO [ThinLTO] Add per-module indexes to combined index consistently 2018-06-26 01:32:58 +00:00
MC [AArch64][SVE] Asm: Support for vector element FP compare. 2018-07-03 09:07:23 +00:00
Object [ELF] Change isSectionData to exclude SHF_EXECINSTR 2018-06-23 00:15:33 +00:00
ObjectYAML
Other Implement strip.invariant.group 2018-07-02 04:49:30 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [IR] Split Intrinsics.inc into enums and implementations 2018-06-23 02:02:38 +00:00
ThinLTO/X86 [ThinLTO] Fix printing of aliases for distributed backend indexes 2018-07-03 01:11:43 +00:00
tools Remove absolute path in test 2018-07-02 23:02:07 +00:00
Transforms [PM/LoopUnswitch] Fix PR37651 by correctly invalidating SCEV when 2018-07-03 09:13:27 +00:00
Unit
Verifier Revert "Add support for generating a call graph profile from Branch Frequency Info." 2018-06-28 13:15:03 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py [LIT] Enable testing of LLVM gold plugin on Mac OS X 2018-06-20 15:32:47 +00:00
lit.site.cfg.py.in
TestRunner.sh