[all-commits] [llvm/llvm-project] 816579: [ShrinkWrap] Allow shrinkwrapping past memory acce...
Jonathon Penix via All-commits
all-commits at lists.llvm.org
Thu May 11 11:43:17 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 81657922c646827a9266e5c58d53dd4290d56602
https://github.com/llvm/llvm-project/commit/81657922c646827a9266e5c58d53dd4290d56602
Author: Jonathon Penix <jpenix at quicinc.com>
Date: 2023-05-11 (Thu, 11 May 2023)
Changed paths:
M llvm/lib/CodeGen/ShrinkWrap.cpp
A llvm/test/CodeGen/RISCV/shrinkwrap-jump-table.ll
Log Message:
-----------
[ShrinkWrap] Allow shrinkwrapping past memory accesses to jump tables
This patch adds a check for whether the memory operand is known to be
a jump table and, if so, allows shrinkwrapping to continue. In the
case that we are looking at a jump table, I believe it is safe to
assume that the access will not be to the stack (but please correct me
if I am wrong here).
In the test attached, this is helpful in that we are able to generate
only one instruction for each non-default case in the original switch
statement.
Differential Revision: https://reviews.llvm.org/D149886
More information about the All-commits
mailing list