[all-commits] [llvm/llvm-project] 650dca: [IR] Remove the AtomicMem*Inst helper classes (#13...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue May 6 14:25:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 650dca5d896023c05bd34dafb756d9bdf7c0033d
      https://github.com/llvm/llvm-project/commit/650dca5d896023c05bd34dafb756d9bdf7c0033d
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2025-05-06 (Tue, 06 May 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryLocation.h
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/include/llvm/Transforms/Utils/LowerMemIntrinsics.h
    M llvm/lib/Analysis/MemoryLocation.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/IR/IRBuilder.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
    M llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp
    M llvm/unittests/Transforms/Utils/MemTransferLowering.cpp

  Log Message:
  -----------
  [IR] Remove the AtomicMem*Inst helper classes (#138710)

Migrate their usage to the `AnyMem*Inst` family, and add a isAtomic()
query on the base class for that hierarchy. This matches the idioms we
use for e.g. isAtomic on load, store, etc.. instructions, the existing
isVolatile idioms on mem* routines, and allows us to more easily share
code between atomic and non-atomic variants.

As with #138568, the goal here is to simplify the class hierarchy and
make it easier to reason about. I'm moving from easiest to hardest, and
will stop at some point when I hit "good enough". Longer term, I'd sorta
like to merge or reverse the naming on the plain Mem*Inst and the
AnyMem*Inst, but that's a much larger and more risky change. Not sure
I'm going to actually do that.



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