llvm-project/llvm/test
Florian Hahn dd2ef0af46 [LCSSA] Handle case with single new PHI faster.
If there is only a single available value, all uses must be dominated by
the single value and there is no need to search for a reaching
definition.

This drastically speeds up LCSSA in some cases. For the test case
from PR37202, it speeds up LCSSA construction by 4 times.

Time-passes without this patch for test case from PR37202:

    Total Execution Time: 29.9285 seconds (29.9276 wall clock)

    ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
    5.2786 ( 17.7%)   0.0021 (  1.2%)   5.2806 ( 17.6%)   5.2808 ( 17.6%)  Unswitch loops
    4.3739 ( 14.7%)   0.0303 ( 18.1%)   4.4042 ( 14.7%)   4.4042 ( 14.7%)  Loop-Closed SSA Form Pass
    4.2658 ( 14.3%)   0.0192 ( 11.5%)   4.2850 ( 14.3%)   4.2851 ( 14.3%)  Loop-Closed SSA Form Pass #2
    2.2307 (  7.5%)   0.0013 (  0.8%)   2.2320 (  7.5%)   2.2318 (  7.5%)  Loop Invariant Code Motion
    2.0888 (  7.0%)   0.0012 (  0.7%)   2.0900 (  7.0%)   2.0897 (  7.0%)  Unroll loops
    1.6761 (  5.6%)   0.0013 (  0.8%)   1.6774 (  5.6%)   1.6774 (  5.6%)  Value Propagation
    1.3686 (  4.6%)   0.0029 (  1.8%)   1.3716 (  4.6%)   1.3714 (  4.6%)  Induction Variable Simplification
    1.1457 (  3.8%)   0.0010 (  0.6%)   1.1468 (  3.8%)   1.1468 (  3.8%)  Loop-Closed SSA Form Pass #4
    1.1384 (  3.8%)   0.0005 (  0.3%)   1.1389 (  3.8%)   1.1389 (  3.8%)  Loop-Closed SSA Form Pass #6
    1.1360 (  3.8%)   0.0027 (  1.6%)   1.1387 (  3.8%)   1.1387 (  3.8%)  Loop-Closed SSA Form Pass #5
    1.1331 (  3.8%)   0.0010 (  0.6%)   1.1341 (  3.8%)   1.1340 (  3.8%)  Loop-Closed SSA Form Pass #3

Time passes with this patch

  Total Execution Time: 19.2802 seconds (19.2813 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
   4.4234 ( 23.2%)   0.0038 (  2.0%)   4.4272 ( 23.0%)   4.4273 ( 23.0%)  Unswitch loops
   2.3828 ( 12.5%)   0.0020 (  1.1%)   2.3848 ( 12.4%)   2.3847 ( 12.4%)  Unroll loops
   1.8714 (  9.8%)   0.0020 (  1.1%)   1.8734 (  9.7%)   1.8735 (  9.7%)  Loop Invariant Code Motion
   1.7973 (  9.4%)   0.0022 (  1.2%)   1.7995 (  9.3%)   1.8003 (  9.3%)  Value Propagation
   1.4010 (  7.3%)   0.0033 (  1.8%)   1.4043 (  7.3%)   1.4044 (  7.3%)  Induction Variable Simplification
   0.9978 (  5.2%)   0.0244 ( 13.1%)   1.0222 (  5.3%)   1.0224 (  5.3%)  Loop-Closed SSA Form Pass #2
   0.9611 (  5.0%)   0.0257 ( 13.8%)   0.9868 (  5.1%)   0.9868 (  5.1%)  Loop-Closed SSA Form Pass
   0.5856 (  3.1%)   0.0015 (  0.8%)   0.5871 (  3.0%)   0.5869 (  3.0%)  Unroll loops #2
   0.4132 (  2.2%)   0.0012 (  0.7%)   0.4145 (  2.1%)   0.4143 (  2.1%)  Loop Invariant Code Motion #3

Reviewers: efriedma, davide, mzolotukhin

Reviewed By: efriedma

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

llvm-svn: 352960
2019-02-02 15:26:05 +00:00
..
Analysis [SCEV] Prohibit SCEV transformations for huge SCEVs 2019-01-31 06:19:25 +00:00
Assembler Add a 'dynamic' parameter to the objectsize intrinsic 2019-01-30 20:34:35 +00:00
Bindings
Bitcode Revert "[Sanitizers] UBSan unreachable incompatible with ASan in the presence of `noreturn` calls" 2019-01-24 18:04:21 +00:00
BugPoint Python compat - print statement 2019-01-03 14:11:33 +00:00
CodeGen [BPF] [BTF] Process FileName with absolute path correctly 2019-02-02 05:54:59 +00:00
DebugInfo [DebugInfo] Fix mkdir use in test 2019-02-01 21:14:21 +00:00
Demangle [llvm-undname] Add support for demangling msvc's noexcept types. 2019-01-08 21:05:51 +00:00
Examples
ExecutionEngine
Feature
FileCheck Fixup test after r352704 since it changes how paths may be emitted. 2019-01-31 07:58:34 +00:00
Instrumentation [ASan] Do not instrument other runtime functions with `__asan_handle_no_return` 2019-02-02 02:05:16 +00:00
Integer
JitListener
LTO [LTO] Record whether LTOUnit splitting is enabled in index 2019-01-11 18:31:57 +00:00
Linker Remove irrelevant references to legacy git repositories from 2019-01-15 16:18:52 +00:00
MC [X86][SSE]: Adding full coverage of MC encoding tests for the SSE isa sets.<NFC> 2019-02-02 06:21:54 +00:00
Object [llvm-nm] Report '.comment' ELF sections as 'n' instead of '?' 2019-02-01 17:38:08 +00:00
ObjectYAML [WebAssembly] Parse llvm.ident into producers section 2019-01-17 02:29:55 +00:00
Other Add a 'dynamic' parameter to the objectsize intrinsic 2019-01-30 20:34:35 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [TblGen] Extend !if semantics through new feature !cond 2019-01-25 10:25:25 +00:00
ThinLTO/X86 Try to make new test more resilient to different orderings 2019-01-29 02:04:01 +00:00
Transforms [LCSSA] Handle case with single new PHI faster. 2019-02-02 15:26:05 +00:00
Unit [test] Fix propagating HOME envvar to unittests 2018-12-31 13:48:12 +00:00
Verifier GlobalISel: Verify memory size for load/store 2019-01-30 01:10:42 +00:00
YAMLParser
tools [llvm-objcopy] Temporarily limit one test to darwin 2019-02-02 05:01:00 +00:00
.clang-format
CMakeLists.txt Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm] 2019-01-19 00:10:54 +00:00
TestRunner.sh
lit.cfg.py Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm] 2019-01-19 00:10:54 +00:00
lit.site.cfg.py.in Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [llvm] 2019-01-19 00:10:54 +00:00