[PATCH] D103254: Preserve more MD_mem_parallel_loop_access and MD_access_group in SROA
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 7 10:51:16 PDT 2021
Meinersbur added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:2478
+ cast<Instruction>(V)->copyMetadata(
+ NewAI, {LLVMContext::MD_mem_parallel_loop_access,
+ LLVMContext::MD_access_group});
----------------
`NewAI` is the alloca instruction; it does not have parallel loop access or access group metadata which only apply to memory accesses.
================
Comment at: llvm/lib/Transforms/Scalar/SROA.cpp:2538
LI.getName());
+ NewLI->copyMetadata(NewAI, {LLVMContext::MD_mem_parallel_loop_access,
+ LLVMContext::MD_access_group});
----------------
Did you mean `LI` instead of `NewAI`?
================
Comment at: llvm/test/Transforms/SROA/mem-par-metadata-sroa-cast.ll:8-9
+; CHECK: entry:
+; CHECK: load i32, i32* {{.*}}, !llvm.access.group [[DISTINCT:![0-9]*]]
+; CHECK: load i32, i32* {{.*}}, !llvm.access.group [[DISTINCT]]
+; CHECK: ret void
----------------
This tests the `presplitLoadsAndStores` case. Shouldn't it also have split the store?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103254/new/
https://reviews.llvm.org/D103254
More information about the llvm-commits
mailing list