[PATCH] D42007: [SimplifyCFG] Try to change store operation type when sinking

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 12:37:09 PST 2018


I'm fairly against trying to extend store sinking further in *CFG
simplification*.  It seems entirely the wrong place to do it.



On Fri, Jan 12, 2018 at 12:24 PM, Matthew Simpson via Phabricator via
llvm-commits <llvm-commits at lists.llvm.org> wrote:

> 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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180112/db90039c/attachment.html>


More information about the llvm-commits mailing list