[all-commits] [llvm/llvm-project] 41ef6d: [IR] Add Instruction::maySynchronize() method (NFC...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed May 6 09:26:44 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41ef6d0982f88c09336d6a836dc1e7b8354563ce
      https://github.com/llvm/llvm-project/commit/41ef6d0982f88c09336d6a836dc1e7b8354563ce
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-05-06 (Wed, 06 May 2026)

  Changed paths:
    M llvm/include/llvm/IR/Instruction.h
    M llvm/lib/IR/Instruction.cpp
    M llvm/lib/Transforms/IPO/FunctionAttrs.cpp

  Log Message:
  -----------
  [IR] Add Instruction::maySynchronize() method (NFC) (#196052)

Extract the logic from FunctionAttrs into a generic API on Instruction,
which will check the nosync flag on calls and ordering for atomic
instructions.

For now, I've retained the previous implementation which considers
monotonic ordering to be synchronizing, which is unnecessarily
conservative and doesn't match LangRef (or the Attributor
implementation).

This is to make it easier to reuse this logic in more places.



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