================
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) {
@G = external global ptr
define i8 @test_store_capture(ptr %p) {
-; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind
willreturn memory(readwrite, argmem: read, inaccessiblemem: none)
+; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind
willreturn memory(readwrite, argmem: read, inaccessiblemem: none, errnomem:
none)
----------------
antoniofrighetto wrote:
While walking the call-graph for deducing attrs, in `checkFunctionMemoryAccess`
we initialize a ME object that doesn't access/modify memory and gradually
refine it (currently says ErrnoMem: NoModRef). This ME is intersected with the
original ME based on AA results (which says ErrnoMem: ModRef), so we get
NoModRef, as per the meet of the lattice. We miss logic to infer if the
function clobbers errno, but I think it should be fine as the PR only
introduces the location (it might be better to conservatively always say
ModRef, but the location is currently unused, so it should be okay to address
this in an upcoming PR?). Rebased to main too.
https://github.com/llvm/llvm-project/pull/120783
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits