[all-commits] [llvm/llvm-project] 91d765: [FunctionAttrs][Attributor] Update nofree inferenc...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu May 28 00:41:57 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 91d765f6ab10974f2c7080c90fe26b21bd7d7cb1
https://github.com/llvm/llvm-project/commit/91d765f6ab10974f2c7080c90fe26b21bd7d7cb1
Author: Nikita Popov <npopov at redhat.com>
Date: 2026-05-28 (Thu, 28 May 2026)
Changed paths:
M clang/test/CodeGen/sanitize-metadata-nosanitize.c
M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
M llvm/lib/Transforms/IPO/FunctionAttrs.cpp
M llvm/test/Transforms/Attributor/align-atomic.ll
M llvm/test/Transforms/Attributor/align.ll
M llvm/test/Transforms/Attributor/liveness.ll
M llvm/test/Transforms/Attributor/noalias.ll
M llvm/test/Transforms/Attributor/nocapture-1.ll
M llvm/test/Transforms/Attributor/nocapture-2.ll
M llvm/test/Transforms/Attributor/nofpclass.ll
M llvm/test/Transforms/Attributor/nonnull.ll
M llvm/test/Transforms/Attributor/nosync.ll
M llvm/test/Transforms/Attributor/range.ll
M llvm/test/Transforms/Attributor/readattrs.ll
M llvm/test/Transforms/Attributor/undefined_behavior.ll
M llvm/test/Transforms/Attributor/value-simplify-instances.ll
M llvm/test/Transforms/Attributor/value-simplify-pointer-info-struct.ll
M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
M llvm/test/Transforms/Attributor/value-simplify.ll
M llvm/test/Transforms/FunctionAttrs/atomic.ll
M llvm/test/Transforms/FunctionAttrs/nocapture.ll
M llvm/test/Transforms/FunctionAttrs/nonnull.ll
M llvm/test/Transforms/FunctionAttrs/nosync.ll
M llvm/test/Transforms/FunctionAttrs/readattrs.ll
M llvm/test/Transforms/FunctionAttrs/writeonly.ll
M llvm/test/Transforms/OpenMP/parallel_deletion.ll
Log Message:
-----------
[FunctionAttrs][Attributor] Update nofree inference (#196266)
This updates nofree inference after the semantics changes in
https://github.com/llvm/llvm-project/pull/195658.
FunctionAttrs currently only supports function-level nofree inference,
so we just need to check for potentially synchronizing instructions.
Attributor also supports argument nofree, in which case we make
additional changes:
* For callsite arguments, in addition to checking nofree, we also need
to check nocapture. If the call itself doesn't free the arg, it may
still capture it and then we may free it via the captured pointer later.
The way this was handled was already incorrect prior to the semantics
changes.
* Reformulate the handling for other instructions in terms of looking
for provenance captures, as that's what the code was essentially doing,
in a crude way. I'm including this to avoid some regressions for cases
where we can no longer infer function nofree, but can still infer
argument nofree.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list