[PATCH] D42007: [SimplifyCFG] Try to change store operation type when sinking
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 12 12:24:03 PST 2018
mssimpso created this revision.
mssimpso added reviewers: spatel, sanjoy, hfinkel, chandlerc, jmolloy.
For a given list of candidate instructions to sink, the sinking algorithm currently checks that each instruction has the same opcode and the same operand types (i.e., Instruction::isSameOperationAs). However, loaded values that are only every stored to memory are canonicalized by InstCombine to have integer types. Because this changes the operand types of the store instructions, this canonicalization can prevent store sinking in SimplifyCFG. So if the candidate instructions are stores, some of which have been canonicalized to operate on integer types while others have not, sinking will not occur. In such a situation, this patch tries to change the stores to operate on the same types so that they may be sunk.
Repository:
rL LLVM
https://reviews.llvm.org/D42007
Files:
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/sink-common-code.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42007.129682.patch
Type: text/x-patch
Size: 8464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180112/3cabceab/attachment.bin>
More information about the llvm-commits
mailing list