[PATCH] D153311: [Attributor] Unify AAMemoryLocation and AAMemoryBehavior

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 19 16:40:39 PDT 2023


jdoerfert added a comment.

Didn't make it all the way, will fix the issues below first.



================
Comment at: llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll:42
 ; CGSCC-LABEL: define {{[^@]+}}@exportedfun
-; CGSCC-SAME: (ptr nocapture nofree readnone [[A:%.*]]) {
+; CGSCC-SAME: (ptr nocapture nofree [[A:%.*]]) {
 ; CGSCC-NEXT:    [[INALLOCA_SAVE:%.*]] = tail call ptr @llvm.stacksave() #[[ATTR1:[0-9]+]]
----------------
TODO: Missing readnone here. Should not be impacted by the `inalloca`.


================
Comment at: llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll:25
 define internal void @g(ptr %a) {
+; CHECK: Function Attrs: memory(readwrite, argmem: read)
 ; CHECK-LABEL: define {{[^@]+}}@g
----------------
Note: I put logic in to avoid `argmem: mode` if there are no pointer arguments but for now that logic won't trigger if we replaced/deleted pointer arguments. 


================
Comment at: llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll:24
 ; CHECK-LABEL: define {{[^@]+}}@callee
-; CHECK-SAME: (i32 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]]) {
+; CHECK-SAME: (ptr noalias nocapture noundef nonnull align 4 dereferenceable(12) [[ARG:%.*]]) {
 ; CHECK-NEXT:  entry:
----------------
TODO: missing read-only here causes us to miss out on the privatization/promotion.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153311/new/

https://reviews.llvm.org/D153311



More information about the llvm-commits mailing list