diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2017-07-28 18:35:25 +0000 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2017-07-28 18:35:25 +0000 |
commit | 1b179bc5ff845e49fe787783ca3c7c8f2949c5bb (patch) | |
tree | f136cfefb88d2e208bb37f5b7a0bb4d2bb4513cc /llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp | |
parent | 42698d09b80a152f6cff14ab6bcf0309f67f847e (diff) | |
download | bcm5719-llvm-1b179bc5ff845e49fe787783ca3c7c8f2949c5bb.tar.gz bcm5719-llvm-1b179bc5ff845e49fe787783ca3c7c8f2949c5bb.zip |
[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
Diffstat (limited to 'llvm/lib/Target/AMDGPU/AMDGPURewriteOutArguments.cpp')
0 files changed, 0 insertions, 0 deletions