[PATCH] D153464: Revert "[CaptureTracking] Ignore ephemeral values when determining pointer escapeness"

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 04:41:17 PDT 2023


nikic added a comment.

Could you please rebase over https://github.com/llvm/llvm-project/commit/deb5bd1289404e8ca751127672d9380a6203b880? In https://github.com/llvm/llvm-project/issues/70547 a variant of this issue was found that was not fixed by D153511 <https://reviews.llvm.org/D153511> (and that D153577 <https://reviews.llvm.org/D153577> would not have fixed either).

As such, I think we probably do need to land this patch.

I think the way to recover the original motivating case would be to make CaptureTracking return whether the capture is a ProvenanceEscape or an AddressCapture, consider icmp an AddressCapture only, and only consider ProvenanceEscape for DSE/AA. I think the icmp semantics we want are that just a pointer icmp cannot leak provenance of the pointer, regardless of whether it will end up getting used in an assume or not.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153464



More information about the llvm-commits mailing list