[all-commits] [llvm/llvm-project] fe146e: [InferAddressSpaces] Fix constant replace to avoid...

Wenju He via All-commits all-commits at lists.llvm.org
Sun Nov 12 21:29:09 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fe146e9b59891e50bddc0e61037773999335e1fe
      https://github.com/llvm/llvm-project/commit/fe146e9b59891e50bddc0e61037773999335e1fe
  Author: Wenju He <wenju.he at intel.com>
  Date:   2023-11-13 (Mon, 13 Nov 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
    M llvm/test/Transforms/InferAddressSpaces/AMDGPU/noop-ptrint-pair.ll
    A llvm/test/Transforms/InferAddressSpaces/optnone-func-unchanged.ll

  Log Message:
  -----------
  [InferAddressSpaces] Fix constant replace to avoid modifying other functions (#70611)

A constant value is unique in llvm context. InferAddressSpaces was
replacing its users in other functions as well. This leads to unexpected
behavior in our downstream use case after the pass.

InferAddressSpaces is a function passe, so it shall not modify functions
other than currently processed one.

Co-authored-by: Abhinav Gaba <abhinav.gaba at intel.com>

---------

Co-authored-by: Abhinav Gaba <abhinav.gaba at intel.com>




More information about the All-commits mailing list