[all-commits] [llvm/llvm-project] 335e13: [Attributor][FIX] Track returned pointer offsets (...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Tue Oct 1 10:41:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 335e1372671c78a8cc6f023f962d621ad48703bb
      https://github.com/llvm/llvm-project/commit/335e1372671c78a8cc6f023f962d621ad48703bb
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2024-10-01 (Tue, 01 Oct 2024)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

  Log Message:
  -----------
  [Attributor][FIX] Track returned pointer offsets (#110534)

If the pointer returned by a function is not "the base pointer" but has
an offset, we need to track the offset such that users can apply it to
their offset chain when they create accesses.
This was reported by @ye-luo and reduced test cases are included. The
OffsetInfo was moved and the container was replaced with a set to avoid
excessive growth. Otherwise, the patch just replaces the "returns
pointer" flag with the "returned offsets", and deals with the applying
to offsets at the call site.

---------

Co-authored-by: Johannes Doerfert <jdoerfert at llnl.gov>



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