[all-commits] [llvm/llvm-project] 007d29: [Flang] Turn on alias analysis for locally allocat...

Dominik Adamski via All-commits all-commits at lists.llvm.org
Tue Jun 10 07:46:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 007d29e30c6e311501ed97b7a368521622319620
      https://github.com/llvm/llvm-project/commit/007d29e30c6e311501ed97b7a368521622319620
  Author: Dominik Adamski <dominik.adamski at amd.com>
  Date:   2025-06-10 (Tue, 10 Jun 2025)

  Changed paths:
    M flang/lib/Optimizer/Transforms/AddAliasTags.cpp
    M flang/test/Fir/tbaa-codegen2.fir
    M flang/test/Transforms/tbaa-with-dummy-scope2.fir
    M flang/test/Transforms/tbaa2.fir
    M flang/test/Transforms/tbaa3.fir

  Log Message:
  -----------
  [Flang] Turn on alias analysis for locally allocated objects (#143489)

Previously, a bug in the MemCptOpt LLVM IR pass caused issues with
adding alias tags for locally allocated objects for Fortran code.

However, the bug has now been fixed (https://github.com/llvm/llvm-project/pull/129537 ),
and we can safely enable alias tags for these objects. This change should
improve the accuracy of the alias analysis.

More accurate alias analysis assumes that Cray pointers do not alias
with other variables. This assumption is common among other compilers.
If the code violates this assumption, it can lead to incorrect results
(see: https://github.com/llvm/llvm-project/issues/141928)



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