[all-commits] [llvm/llvm-project] 6abd01: [Attributor][FIX] Do treat byval arguments special

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Dec 12 14:05:32 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6abd01e4624a2c9f8f76e11cc5d57cc7551b5d2a
      https://github.com/llvm/llvm-project/commit/6abd01e4624a2c9f8f76e11cc5d57cc7551b5d2a
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/readattrs.ll

  Log Message:
  -----------
  [Attributor][FIX] Do treat byval arguments special

When we reason about the pointer argument that is byval we actually
reason about a local copy of the value passed at the call site. This was
not the case before and we wrongly introduced attributes based on the
surrounding function.

AAMemoryBehaviorArgument, AAMemoryBehaviorCallSiteArgument and
AANoCaptureCallSiteArgument are made aware of byval now. The code
to skip "subsuming positions" for reasoning follows a common pattern and
we should refactor it. A TODO was added.

Discovered by @efriedma as part of D69748.




More information about the All-commits mailing list