[all-commits] [llvm/llvm-project] 97458f: [CIR] Compare access ranges of pointers into the s...

Andy Kaylor via All-commits all-commits at lists.llvm.org
Tue Sep 22 16:28:56 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97458f644132d62bb938823394b716b684956f49
      https://github.com/llvm/llvm-project/commit/97458f644132d62bb938823394b716b684956f49
  Author: Andy Kaylor <akaylor at nvidia.com>
  Date:   2026-09-22 (Tue, 22 Sep 2026)

  Changed paths:
    M clang/include/clang/CIR/Dialect/Analysis/CIRBasicAliasAnalysis.h
    M clang/lib/CIR/Dialect/Analysis/CIRBasicAliasAnalysis.cpp
    M clang/test/CIR/Analysis/alias-analysis-underlying-object.cir

  Log Message:
  -----------
  [CIR] Compare access ranges of pointers into the same object (#225166)

Two pointers at different offsets into the same object were previously
reported as MayAlias, because whether they overlap depends on how many
bytes each access touches. This change extends the analysis to use the
access size from the pointee type and compare the byte ranges the two
accesses cover. Disjoint ranges don't alias, overlapping ranges
partially alias. Access to different members of a record are now
reported as NoAlias, while a member compared against the record it
belongs to is reported as PartialAlias.

Accesses whose extent isn't statically known, such as those through a
pointer to void, keep the conservative answer.

Assisted-by: Cursor / various models



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