1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Go to file
Max Kazantsev 8b58bcf73c [LV] Do not create SCEVs on broken IR in emitTransformedIndex. PR39160
At the point when we perform `emitTransformedIndex`, we have a broken IR (in
particular, we have Phis for which not every incoming value is properly set). On
such IR, it is illegal to create SCEV expressions, because their internal
simplification process may try to prove some predicates and break when it
stumbles across some broken IR.

The only purpose of using SCEV in this particular place is attempt to simplify
the generated code slightly. It seems that the result isn't worth it, because
some trivial cases (like addition of zero and multiplication by 1) can be
handled separately if needed, but more generally InstCombine is able to achieve
the goals we want to achieve by using SCEV.

This patch fixes a functional crash described in PR39160, and as side-effect it
also generates a bit smarter code in some simple cases. It also may cause some
optimality loss (i.e. we will now generate `mul` by power of `2` instead of
shift etc), but there is nothing what InstCombine could not handle later. In
case of dire need, we can support more trivial cases just in place.

Note that this patch only fixes one particular case of the general problem that
LV misuses SCEV, attempting to create SCEVs or prove predicates on invalid IR.
The general solution, however, seems complex enough.

Differential Revision: https://reviews.llvm.org/D52881
Reviewed By: fhahn, hsaito

llvm-svn: 343954
2018-10-08 05:46:29 +00:00
benchmarks Pull google/benchmark library to the LLVM tree 2018-08-28 09:42:41 +00:00
bindings [bindings/go] Add Go bindings to the Token type 2018-09-28 17:39:59 +00:00
cmake [cmake] Also create lowercase extension WinSDK symlinks 2018-10-05 00:08:27 +00:00
docs [doc] Update the programmer's manual about SmallSet's iterator 2018-10-04 12:33:33 +00:00
examples [ORC] Fix BuildingAJIT tutorial examples that were broken by r343059. 2018-09-26 04:00:58 +00:00
include [PDB] Add the ability to lookup global symbols by name. 2018-10-08 04:19:16 +00:00
lib [LV] Do not create SCEVs on broken IR in emitTransformedIndex. PR39160 2018-10-08 05:46:29 +00:00
projects [cmake] Support moving debuginfo-tests to llvm/projects 2017-12-12 17:06:08 +00:00
resources
runtimes Revert "[CMake] Pass Clang defaults to runtimes builds" 2018-07-13 20:01:55 +00:00
test [LV] Do not create SCEVs on broken IR in emitTransformedIndex. PR39160 2018-10-08 05:46:29 +00:00
tools [PDB] Add the ability to lookup global symbols by name. 2018-10-08 04:19:16 +00:00
unittests [ORC] Consume unhandled errors in unit test. 2018-10-07 01:08:02 +00:00
utils [utils] Ensure that update_mca_test_checks.py writes prefixes in alphabetical order 2018-10-04 14:42:19 +00:00
.arcconfig [llvm] Set up .arcconfig to point to Diffusion L repository 2018-01-12 15:37:41 +00:00
.clang-format
.clang-tidy
.gitattributes [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
.gitignore
CMakeLists.txt [WebAssembly] Add WebAssembly to LLVM_ALL_TARGETS 2018-10-03 23:56:52 +00:00
CODE_OWNERS.TXT Add owner for llvm-objcopy 2018-08-09 22:05:19 +00:00
configure
CREDITS.TXT Update my information in the CREDITS file. 2018-06-15 20:02:11 +00:00
LICENSE.TXT Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm.spec.in
LLVMBuild.txt
README.txt Test commit. 2018-09-22 01:01:03 +00:00
RELEASE_TESTERS.TXT Remove myself from the release testers list. (NFC) 2018-06-20 21:25:50 +00:00

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.