[all-commits] [llvm/llvm-project] 3b6e25: [TBAA] Only clear TBAAStruct if field can be extra...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Feb 16 01:49:32 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b6e25048f188692c27e7788f4e4453a3963306d
      https://github.com/llvm/llvm-project/commit/3b6e25048f188692c27e7788f4e4453a3963306d
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-02-16 (Fri, 16 Feb 2024)

  Changed paths:
    M llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
    M llvm/test/Transforms/InstCombine/struct-assign-tbaa.ll

  Log Message:
  -----------
  [TBAA] Only clear TBAAStruct if field can be extracted. (#81285)

Retain TBAAStruct if we fail to match the access to a single field. All
users at the moment use this when using the full size of the original
access. SROA also retains the original TBAAStruct when accessing parts
at offset 0.

Motivation for this and follow-on patches is to improve codegen for
libc++, where using memcpy limits optimizations, like vectorization for
code iteration over std::vector<std::complex<float>>:
https://godbolt.org/z/f3vqYos3c

Depends on https://github.com/llvm/llvm-project/pull/81284




More information about the All-commits mailing list