[all-commits] [llvm/llvm-project] 0112f1: [EarlyCSE] Remove void return restriction for call...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 24 00:20:25 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0112f12eb61b2ea5cde750506c31afbfc8b9ea8a
      https://github.com/llvm/llvm-project/commit/0112f12eb61b2ea5cde750506c31afbfc8b9ea8a
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2025-06-24 (Tue, 24 Jun 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/EarlyCSE.cpp
    M llvm/test/Transforms/EarlyCSE/basic.ll
    M llvm/test/Transforms/EarlyCSE/flags.ll
    M llvm/test/Transforms/EarlyCSE/noalias-addrspace.ll

  Log Message:
  -----------
  [EarlyCSE] Remove void return restriction for call CSE (#145320)

For readonly/readnone calls returning void we can't CSE the return
value. However, making these participate in CSE is still useful,
because it allows DCE of calls that are not willreturn/nounwind
(something no other part of LLVM is capable of removing).

The more interesting use-case is CSE for writeonly calls (not
yet supported), but I figured this change makes sense independently.

There is no impact on compile-time.



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