[PATCH] D130466: [LICM] - Add option to force thread model single
Shubham Narlawar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 7 02:22:30 PDT 2022
gsocshubham updated this revision to Diff 466013.
gsocshubham added a comment.
Add simple LIT tests -
1. Remove complex testcases and add simple ones without allocas as requested by @nikic
2. Run `-instnamer` and `-sroa.`
3. Two checks with and without flag `-licm-force-thread-model-single` is shown only when behaviour differs when flag is set. (For reduced line in LIT tests). TMS stands for Thread Model Single
Note - There is alloca present in capture case as requested from above comment by @nikic `We should have a variant of the test with an alloca that is captured (store promotion legal with the flag, because capture does not impact thread safety).`
Behaviour of test cases -
constant-global-sroa-instnamer.ll
-> We can not store to a constant global and hence same behaviour irrespective of flag
capture-instnamer.ll
-> Store promotion happens.
arg-sroa-instnamer.ll
-> No store promotion irrespective of flag.
promote-sink-store-global.ll
-> Store promotion happens if flag is set.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130466/new/
https://reviews.llvm.org/D130466
Files:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/promote-sink-store-arg.ll
llvm/test/Transforms/LICM/promote-sink-store-capture.ll
llvm/test/Transforms/LICM/promote-sink-store-constant-global.ll
llvm/test/Transforms/LICM/promote-sink-store-global.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130466.466013.patch
Type: text/x-patch
Size: 22530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221007/f5625d35/attachment.bin>
More information about the llvm-commits
mailing list