[llvm] MemoryDependenceAnalysis: Consider a pointer clobbered if it is saved (PR #142096)

YunQiang Su via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 18:54:23 PDT 2025


wzssyqa wrote:

> This should be handled by AA/CaptureTracking. Needs a reduced reproducer to understand why it fails.

In the comment of AA/CaptureTracking
```
// This file contains routines that help determine which pointers are captured.
// A pointer value is captured if the function makes a copy of any part of the
// pointer that outlives the call.  Not being captured means, more or less, that
// the pointer is only dereferenced and not stored in a global.  Returning part
// of the pointer as the function return value may or may not count as capturing
// the pointer, depending on the context.
```

In our case, the pointer is not globalized. It just store into a local vector, and then we edit the value of local vector.

https://github.com/llvm/llvm-project/pull/142096


More information about the llvm-commits mailing list