[all-commits] [llvm/llvm-project] c6c864: [FunctionAttrs] Treat byval calls as only reading ...

Alex MacLean via All-commits all-commits at lists.llvm.org
Mon Jan 13 12:10:48 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c6c864da3fdfbe98f6302f209056fe3069d071ae
      https://github.com/llvm/llvm-project/commit/c6c864da3fdfbe98f6302f209056fe3069d071ae
  Author: Alex MacLean <amaclean at nvidia.com>
  Date:   2025-01-13 (Mon, 13 Jan 2025)

  Changed paths:
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/lib/Analysis/AliasAnalysis.cpp
    M llvm/lib/Transforms/IPO/FunctionAttrs.cpp
    M llvm/test/Transforms/FunctionAttrs/readattrs.ll
    M llvm/test/Transforms/MemCpyOpt/memcpy-byval-forwarding-clobbers.ll

  Log Message:
  -----------
  [FunctionAttrs] Treat byval calls as only reading ptrs (#122618)

Since byval arguments are passed via a hidden copy of the pointee, they
do not have the same semantics as normal pointer arguments. The callee
cannot capture or write to the pointer and the copy is a read of the
pointer.



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