llvm-project/llvm
Hiroshi Yamauchi 1b179bc5ff [LVI] Constant-propagate a zero extension of the switch condition value through case edges
Summary:
LazyValueInfo currently computes the constant value of the switch condition through case edges, which allows the constant value to be propagated through the case edges.

But we have seen a case where a zero-extended value of the switch condition is used past case edges for which the constant propagation doesn't occur.

This patch adds a small logic to handle such a case in getEdgeValueLocal().

This is motivated by the Python 2.7 eval loop in PyEval_EvalFrameEx() where the lack of the constant propagation causes longer live ranges and more spill code than necessary.

With this patch, we see that the code size of PyEval_EvalFrameEx() decreases by ~5.4% and a performance test improves by ~4.6%.




Reviewers: wmi, dberlin, sanjoy

Reviewed By: sanjoy

Subscribers: davide, davidxl, llvm-commits

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

llvm-svn: 309415
2017-07-28 18:35:25 +00:00
..
bindings [OCaml] Fix undefined reference to LLVMDumpType() with NDEBUG 2017-07-27 21:13:25 +00:00
cmake [CMake] NFC. Add intrinsics_gen target to CMake Exports 2017-07-28 15:33:35 +00:00
docs [docs] change a few code-blocks to llvm from text 2017-07-26 14:11:23 +00:00
examples Defeat another -Wunused-but-set-variable warning 2017-07-19 15:06:31 +00:00
include [GVN] Recommit the patch "Add phi-translate support in scalarpre" 2017-07-28 15:47:25 +00:00
lib [LVI] Constant-propagate a zero extension of the switch condition value through case edges 2017-07-28 18:35:25 +00:00
projects
resources
runtimes [CMake] Remove redundant logic in runtimes/CMakeList.txt 2017-07-24 17:26:28 +00:00
test [LVI] Constant-propagate a zero extension of the switch condition value through case edges 2017-07-28 18:35:25 +00:00
tools [llvm-pdbutil] Clean up ExitOnError usage to add ": " to our errors 2017-07-27 23:13:18 +00:00
unittests [TargetParser] Use enum classes for various ARM kind enums. 2017-07-27 16:27:56 +00:00
utils [lit] Dump some FileCheck inputs to try to debug some failing tests 2017-07-28 16:24:18 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Un-revert "Teach the CMake build system to run lit's test suite. These can be run" 2017-07-27 19:18:35 +00:00
CODE_OWNERS.TXT Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
CREDITS.TXT Another test commit 2017-07-01 03:24:06 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT [RelTest] Diana is doing both releases now 2017-07-14 08:33:52 +00:00
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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.