[PATCH] D147348: [MergedLoadStoreMotion] Merge stores with conflicting value types
Jeffrey Byrnes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 12:05:14 PDT 2023
jrbyrnes created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
jrbyrnes requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Since memory does not have an intrinsic type, we do not need to require value type matching on stores in order to sink them. To facilitate that, this patch finds stores which are sinkable, but have conflicting types, and bitcasts the ValueOperand so they are easily sinkable into a PHINode. Rather than doing fancy analysis to optimally insert the bitcast, we always insert right before the relevant store in the diamond branch. The assumption is that later passes (e.g. GVN, SimplifyCFG) will clean up bitcasts as needed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147348
Files:
llvm/include/llvm/IR/Instruction.h
llvm/include/llvm/IR/Instructions.h
llvm/lib/IR/Instruction.cpp
llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp
llvm/test/Transforms/MergedLoadStoreMotion/st_sink_conflict_type.ll
llvm/test/Transforms/PhaseOrdering/bitcast-store-branch.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147348.510096.patch
Type: text/x-patch
Size: 12987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230331/6d7cd461/attachment.bin>
More information about the llvm-commits
mailing list