[all-commits] [llvm/llvm-project] f445e3: [SimplifyCFG] Use isWritableObject() API (#110127)

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Sep 30 01:04:08 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f445e39ab271d07733f0f45048badd9e58905aec
      https://github.com/llvm/llvm-project/commit/f445e39ab271d07733f0f45048badd9e58905aec
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-09-30 (Mon, 30 Sep 2024)

  Changed paths:
    M llvm/lib/Analysis/AliasAnalysis.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/speculate-store.ll

  Log Message:
  -----------
  [SimplifyCFG] Use isWritableObject() API (#110127)

SimplifyCFG store speculation currently has some homegrown code to check
for a writable object, handling the alloca special case only.

Switch it to use the generic isWritableObject() API, which means that we
also support byval arguments, allocator return values, and writable
arguments.

I've adjusted isWritableObject() to also check for the noalias attribute
when handling writable. Otherwise, I don't think that we can generalize
from at-entry writability. This was not relevant for previous uses of
the function, because they'd already require noalias for other reasons
anyway.



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