[all-commits] [llvm/llvm-project] e5b75a: [CIR] Split side_effect into memory effects, nounw...

Adam Smith via All-commits all-commits at lists.llvm.org
Tue Sep 15 17:55:15 PDT 2026


  Branch: refs/heads/users/adams381/cir-explicit-nothrow-willreturn
  Home:   https://github.com/llvm/llvm-project
  Commit: e5b75aa6c2930b65acc7724a82875dd14deb3c85
      https://github.com/llvm/llvm-project/commit/e5b75aa6c2930b65acc7724a82875dd14deb3c85
  Author: Adam Smith <adams at nvidia.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
    M clang/include/clang/CIR/Dialect/IR/CIRDialect.td
    M clang/include/clang/CIR/Dialect/IR/CIROps.td
    M clang/include/clang/CIR/Interfaces/CIROpInterfaces.td
    M clang/lib/CIR/CodeGen/CIRGenCall.cpp
    M clang/lib/CIR/CodeGen/CIRGenModule.cpp
    M clang/lib/CIR/CodeGen/CIRGenModule.h
    M clang/lib/CIR/Dialect/IR/CIRDialect.cpp
    M clang/lib/CIR/Dialect/Transforms/CIRTransformUtils.cpp
    M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
    M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
    M clang/test/CIR/CodeGen/call.c
    M clang/test/CIR/CodeGen/side-effect.cpp
    M clang/test/CIR/IR/call.cir
    M clang/test/CIR/IR/enum-attrs.cir
    A clang/test/CIR/IR/invalid-memory-effects.cir
    A clang/test/CIR/Lowering/memory-effects.cir
    M clang/test/CIR/Transforms/flatten-preserve-attrs.cir
    M clang/test/CIR/Transforms/idiom-recognizer.cpp

  Log Message:
  -----------
  [CIR] Split side_effect into memory effects, nounwind, and willreturn

side_effect was carrying three facts at once.  It described the memory a
callee may touch, and it was also the only thing lowering derived
nounwind and willreturn from, so any callee with a known memory effect
got both.  That is wrong for one that can throw, and willreturn had no
other representation in CIR at all.

const and pure now record the three separately, and the enum is replaced
by a structured #cir.memory_effects carrying the same six ModRef slots as
the LLVM dialect.  On an operation it prints compactly, as memory(none)
or memory(read, argmem: readwrite).  No lowered IR changes.

Assisted-by: Cursor / claude-opus-5



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