[all-commits] [llvm/llvm-project] 287340: Minimal support of floating-point operand bundles

Serge Pavlov via All-commits all-commits at lists.llvm.org
Sun Apr 20 10:47:00 PDT 2025


  Branch: refs/heads/users/spavloff/bundles2
  Home:   https://github.com/llvm/llvm-project
  Commit: 287340535219cd5bc31de3a27cde1b279db0eb09
      https://github.com/llvm/llvm-project/commit/287340535219cd5bc31de3a27cde1b279db0eb09
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/docs/ReleaseNotes.md
    M llvm/include/llvm/IR/FPEnv.h
    A llvm/include/llvm/IR/FloatingPointOps.def
    M llvm/include/llvm/IR/IRBuilder.h
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/include/llvm/IR/LLVMContext.h
    M llvm/include/llvm/Support/ModRef.h
    M llvm/lib/IR/FPEnv.cpp
    M llvm/lib/IR/IRBuilder.cpp
    M llvm/lib/IR/Instructions.cpp
    M llvm/lib/IR/IntrinsicInst.cpp
    M llvm/lib/IR/LLVMContext.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/test/Bitcode/operand-bundles-bc-analyzer.ll
    M llvm/test/Verifier/fp-intrinsics.ll
    M llvm/unittests/IR/IRBuilderTest.cpp

  Log Message:
  -----------
  Minimal support of floating-point operand bundles

This is a lite version of https://github.com/llvm/llvm-project/pull/109798,
where code changes are minimized to facilitate discussion about the
implementation. The motivations and ideas behind the new floating-point
operation support are described in that PR and in the discussion
https://discourse.llvm.org/t/rfc-change-of-strict-fp-operation-representation-in-ir/85021.
There are concerns that the proposed changes are too invasive and a new
approach is required to make the transition smoother.

This implementation is essentially a subset of PR109798, where
everything beyond the minimum is removed. It tries to build eventually
the same implementation as that PR but in different steps.

The patch does not attempt to modify the existing implementation based
on the constrained intrinsics. Instead it introduces a new one using
operand bundles. This new implementation initially has very limited
functionality, which latter will be extended and finally can replace the
existing one.

This PR introduces the notion of floating-point operation, this is an
intrinsic, that is listed in the file "FloatingPointOps.def". These have
two additional properties:

1. In the strict environment (a function with strictfp attribute) calls
   to these operations acquire side effect, now it is read/write access
   to inaccessible memory, just as constrained intrinsics do.

2. Calls to these operations may have floating-point operand bundles.
   There are two kinds of such bundles, tagged with "fp.control" and
   "fp.except", which are used to carry additional information about
   control modes and exception handling. Initially the set of control
   modes consists of rounding mode only.

The set of operations enlisted in "FloatingPointOps.def" and in
"ConstrainedOps.def" are completely independent, an intrinsic may be in
one list or in both. The set of floating-point operations is expected to
grow and finally all FP intrinsics will be available in the new
implementation. In this patch set of intrinsics in
"FloatingPointOps.def" is minimum necessary for tests.


  Commit: 089909dcd10a841b4504bbcbc1e991ecbac426c2
      https://github.com/llvm/llvm-project/commit/089909dcd10a841b4504bbcbc1e991ecbac426c2
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2025-04-16 (Wed, 16 Apr 2025)

  Changed paths:
    M clang/test/CodeGen/strictfp-elementwise-builtins.cpp

  Log Message:
  -----------
  Fix test


  Commit: 1a300f9783b9c0dcdeb76913d004f6c0f73a41a4
      https://github.com/llvm/llvm-project/commit/1a300f9783b9c0dcdeb76913d004f6c0f73a41a4
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2025-04-17 (Thu, 17 Apr 2025)

  Changed paths:
    M llvm/lib/IR/IRBuilder.cpp

  Log Message:
  -----------
  Set MemoryEffects of call only if called function is nomem

It make call close to constrained calls, where memory effects of the
calls do not define memory effects. It helps migration to operand
bundles.


  Commit: f9180b3c9d4f304772802107569eb53e4a91ac77
      https://github.com/llvm/llvm-project/commit/f9180b3c9d4f304772802107569eb53e4a91ac77
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2025-04-17 (Thu, 17 Apr 2025)

  Changed paths:
    M llvm/include/llvm/IR/InstrTypes.h
    M llvm/lib/IR/Instructions.cpp

  Log Message:
  -----------
  Fix method signature


  Commit: add26fef01a93ddf81cd3410b13b1b2c66a5f9e9
      https://github.com/llvm/llvm-project/commit/add26fef01a93ddf81cd3410b13b1b2c66a5f9e9
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2025-04-19 (Sat, 19 Apr 2025)

  Changed paths:
    M llvm/lib/IR/Verifier.cpp
    M llvm/test/Verifier/fp-intrinsics.ll

  Log Message:
  -----------
  Organize checks in Verifier


  Commit: ad480e9de4015a9acc17b80d9f2d6ce5f39d13e5
      https://github.com/llvm/llvm-project/commit/ad480e9de4015a9acc17b80d9f2d6ce5f39d13e5
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2025-04-20 (Sun, 20 Apr 2025)

  Changed paths:
    M llvm/docs/LangRef.rst

  Log Message:
  -----------
  Small changes in documentation


Compare: https://github.com/llvm/llvm-project/compare/287340535219%5E...ad480e9de401

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