aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
diff options
context:
space:
mode:
authorHiroshi Yamauchi <yamauchi@google.com>2017-08-03 21:11:30 +0000
committerHiroshi Yamauchi <yamauchi@google.com>2017-08-03 21:11:30 +0000
commit144ee2b4d772e38ec5f183cb2e015417d9af5c57 (patch)
tree79b1a09f33ca30da0b10d3e96bedbaefb3809653 /llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
parent424c88c381f99aa1acac9a2eef67ab06d41ab427 (diff)
downloadllvm-144ee2b4d772e38ec5f183cb2e015417d9af5c57.zip
llvm-144ee2b4d772e38ec5f183cb2e015417d9af5c57.tar.gz
llvm-144ee2b4d772e38ec5f183cb2e015417d9af5c57.tar.bz2
[LVI] Constant-propagate a zero extension of the switch condition value through case edges
Summary: (This is a second attempt as https://reviews.llvm.org/D34822 was reverted.) 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: sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36247 llvm-svn: 309986
Diffstat (limited to 'llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions