[llvm] Revert "[IR] Reject unhandled assume bundles and seperate them from normal attributes" (PR #202336)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 06:37:08 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: Nikolas Klauser (philnik777)
<details>
<summary>Changes</summary>
Reverts llvm/llvm-project#<!-- -->197007
This causes an assertion failure.
---
Patch is 81.08 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/202336.diff
23 Files Affected:
- (modified) llvm/docs/LangRef.rst (+55-55)
- (modified) llvm/docs/ReleaseNotes.md (-5)
- (removed) llvm/include/llvm/IR/BundleAttributes.def (-22)
- (removed) llvm/include/llvm/IR/BundleAttributes.h (-63)
- (modified) llvm/include/llvm/IR/InstrTypes.h (-6)
- (modified) llvm/include/llvm/Transforms/Utils/PredicateInfo.h (+2-3)
- (modified) llvm/lib/Analysis/LazyValueInfo.cpp (+19-17)
- (modified) llvm/lib/Analysis/ValueTracking.cpp (+29-30)
- (removed) llvm/lib/IR/BundleAttributes.cpp (-64)
- (modified) llvm/lib/IR/CMakeLists.txt (-1)
- (modified) llvm/lib/IR/Verifier.cpp (+44-56)
- (modified) llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp (+39-50)
- (modified) llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp (+8-1)
- (modified) llvm/lib/Transforms/Utils/PredicateInfo.cpp (+8-9)
- (added) llvm/test/Analysis/ValueTracking/assume-queries-counter.ll (+112)
- (modified) llvm/test/Analysis/ValueTracking/assume.ll (-69)
- (modified) llvm/test/Transforms/AlignmentFromAssumptions/simple.ll (+3-2)
- (modified) llvm/test/Transforms/Attributor/nofpclass.ll (+28)
- (modified) llvm/test/Transforms/Attributor/nofree.ll (+81)
- (modified) llvm/test/Transforms/InstCombine/assume.ll (-71)
- (modified) llvm/test/Transforms/Util/assume-builder.ll (+217)
- (modified) llvm/test/Verifier/assume-bundles.ll (+12-69)
- (modified) llvm/unittests/Analysis/AssumeBundleQueriesTest.cpp (+27)
``````````diff
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index ca1f007865c03..5e5ebdf80773f 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1587,8 +1587,6 @@ Currently, only the following parameter attributes are defined:
:ref:`bitcast instruction <i_bitcast>`. This is not a valid attribute for
return values and can only be applied to one parameter.
-.. _attr_nonnull:
-
``nonnull``
This indicates that the parameter or return pointer is not null. This
attribute may only be applied to pointer-typed parameters. This is not
@@ -1600,8 +1598,6 @@ Currently, only the following parameter attributes are defined:
The ``nonnull`` attribute should be combined with the ``noundef`` attribute
to ensure a pointer is not null or otherwise the behavior is undefined.
-.. _attr_dereferenceable:
-
``dereferenceable(<n>)``
This indicates that the parameter or return pointer is dereferenceable. This
attribute may only be applied to pointer-typed parameters. A pointer that
@@ -1614,9 +1610,9 @@ Currently, only the following parameter attributes are defined:
``null_pointer_is_valid`` function attribute is present.
``n`` should be a positive number. The pointer should be well defined,
otherwise it is undefined behavior. This means ``dereferenceable(<n>)``
- implies ``noundef``.
-
-.. _attr_dereferenceable_or_null:
+ implies ``noundef``. When used in an assume operand bundle, more restricted
+ semantics apply. See :ref:`assume operand bundles <assume_opbundles>` for
+ more details.
``dereferenceable_or_null(<n>)``
This indicates that the parameter or return value isn't both
@@ -1671,8 +1667,6 @@ Currently, only the following parameter attributes are defined:
only valid on intrinsic declarations and cannot be applied to a
call site or arbitrary function.
-.. _attr_noundef:
-
``noundef``
This attribute applies to parameters and return values. If the value
representation contains any undefined or poison bits, the behavior is
@@ -2155,9 +2149,6 @@ For example:
uses the ``nobuiltin`` attribute. This is only valid at call sites for
direct calls to functions that are declared with the ``nobuiltin``
attribute.
-
-.. _attr_cold:
-
``cold``
This attribute indicates that this function is rarely called. When
computing edge weights, basic blocks post-dominated by a cold
@@ -3136,57 +3127,33 @@ Assume Operand Bundles
^^^^^^^^^^^^^^^^^^^^^^
Operand bundles on an :ref:`llvm.assume <int_assume>` allow representing
-assumptions that hold at the location of the assume. Operand bundles enable
-assumptions that are either hard or impossible to represent as a boolean
-argument of an :ref:`llvm.assume <int_assume>`.
+assumptions, such as that a :ref:`parameter attribute <paramattrs>` or a
+:ref:`function attribute <fnattrs>` holds for a certain value at a certain
+location. Operand bundles enable assumptions that are either hard or impossible
+to represent as a boolean argument of an :ref:`llvm.assume <int_assume>`.
Assumes with operand bundles must have ``i1 true`` as the condition operand.
-Just like for the argument of :ref:`llvm.assume <int_assume>`, if any of the
-provided guarantees are violated at runtime the behavior is undefined.
+An assume operand bundle has the form:
-While attributes expect constant arguments, assume operand bundles may be
-provided a dynamic value, for example:
-
-.. code-block:: llvm
-
- call void @llvm.assume(i1 true) ["align"(ptr %val, i32 %align)]
-
-The following attributes are currently accepted:
-
-``"align"(ptr %p, i64 %align)``, ``"align"(ptr %p, i64 %align, i64 %offset)``
- Equivalent to :ref:`align(%align) <attr_align>` on ``%p``, or ``%p - %offset``
- if the ``%offset`` argument exists, except that ``%align`` may be a
- non-power-of-two alignment (including a zero alignment). If ``%align`` is not
- a power of two the pointer value must be all-zero. Otherwise the behavior is
- undefined.
-
-``"cold"()``
- Equivalent to :ref:`cold <attr_cold>`.
+::
-``"dereferenceable"(ptr %p, i64 %size)``
- Equivalent to :ref:`dereferenceable(%size) <attr_dereferenceable>` on ``%p``,
- except that ``%size`` may also be zero, in which case the bundle doesn't
- imply ``nonnull``.
+ "<tag>"([ <arguments>] ])
-``"dereferenceable_or_null"(ptr %p, i64 %size)``
- Equivalent to :ref:`dereferenceable_or_null(%size)
- <attr_dereferenceable_or_null>` on ``%p``, except that ``%size`` may also be
- zero.
+In the case of function or parameter attributes, the operand bundle has the
+restricted form:
-``"ignore"(...)``
- Doesn't imply anything and is ignored. This is used to drop an assume where
- the ``llvm.assume`` call cannot be replaced or dropped.
+::
-``"nonnull"(ptr %p)``
- Equivalent to :ref:`nonnull <attr_nonnull>` on ``%p``.
+ "<tag>"([ <holds for value> [, <attribute argument>] ])
-``"noundef"(any_type %v)``
- Equivalent to :ref:`noundef <attr_noundef>` on ``%v``.
+* The tag of the operand bundle is usually the name of the attribute that can be
+ assumed to hold. It can also be `ignore`; this tag doesn't contain any
+ information and should be ignored.
+* The first argument, if present, is the value for which the attribute holds.
+* The second argument, if present, is an argument of the attribute.
-``"separate_storage"(ptr %p1, ptr %p2)``
- This indicates that no pointer :ref:`based <pointeraliasing>` on one of its
- arguments can alias any pointer based on the other.
+If there are no arguments the attribute is a property of the call location.
For example:
@@ -3204,6 +3171,39 @@ allows the optimizer to assume that at location of call to
allows the optimizer to assume that the :ref:`llvm.assume <int_assume>`
call location is cold and that ``%val`` may not be null.
+Just like for the argument of :ref:`llvm.assume <int_assume>`, if any of the
+provided guarantees are violated at runtime the behavior is undefined.
+
+While attributes expect constant arguments, assume operand bundles may be
+provided a dynamic value, for example:
+
+.. code-block:: llvm
+
+ call void @llvm.assume(i1 true) ["align"(ptr %val, i32 %align)]
+
+If the operand bundle value violates any requirements on the attribute value,
+the behavior is undefined, unless one of the following exceptions applies:
+
+* ``"align"`` operand bundles may specify a non-power-of-two alignment
+ (including a zero alignment). If this is the case, then the pointer value
+ must be an all-zero pointer, otherwise the behavior is undefined.
+
+* ``dereferenceable(<n>)`` operand bundles only guarantee the pointer is
+ dereferenceable at the point of the assumption. The pointer may not be
+ dereferenceable at later pointers, e.g., because it could have been freed.
+ Only ``n > 0`` implies that the pointer is dereferenceable.
+
+In addition to allowing operand bundles encoding function and parameter
+attributes, an assume operand bundle may also encode a ``separate_storage``
+operand bundle. This has the form:
+
+.. code-block:: llvm
+
+ separate_storage(<val1>, <val2>)``
+
+This indicates that no pointer :ref:`based <pointeraliasing>` on one of its
+arguments can alias any pointer based on the other.
+
Even if the assumed property can be encoded as a boolean value, like
``nonnull``, using operand bundles to express the property can still have
benefits:
@@ -8143,7 +8143,7 @@ Together these two attributes provide a four-way classification:
- ``body`` only: main vectorized loop body
- ``epilogue`` only: scalar epilogue loop after vectorization
-- Both ``body`` and ``epilogue``: vectorized epilogue
+- Both ``body`` and ``epilogue``: vectorized epilogue
(a remainder loop that was itself vectorized during epilogue
vectorization)
- Neither: a plain loop not produced by the vectorizer
@@ -8772,7 +8772,7 @@ is executed, followed by ``uint64_t`` value and execution count pairs.
The value profiling kind is 0 for indirect call targets and 1 for memory
operations. For indirect call targets, each profile value is a hash
of the callee function name, and for memory operations each value is the
-byte length. It is illegal to have duplicate profile values (e.g.,
+byte length. It is illegal to have duplicate profile values (e.g.,
duplicate function hashes for indirect calls or byte lengths for memory
operations).
diff --git a/llvm/docs/ReleaseNotes.md b/llvm/docs/ReleaseNotes.md
index 3b862814bdbad..f234e9b5d6433 100644
--- a/llvm/docs/ReleaseNotes.md
+++ b/llvm/docs/ReleaseNotes.md
@@ -87,11 +87,6 @@ Makes programs 10x faster by doing Special New Thing.
and `ccc` agree for `void(ptr)` (x86_64, AArch64, RISC-V, ...) but is an ABI
break on i686, MIPS O32, PowerPC64 ELFv1, and Lanai.
-* Assume bundles now only accept attributes that are actually handled.
- Specifically, they are ``align``, ``cold``, ``dereferenceable``,
- ``dereferenceable_or_null``, ``nonnull``, ``noundef`` and
- ``separate_storage``.
-
* Fast math flags are now permitted on `uitofp` and `sitofp`.
### Changes to LLVM infrastructure
diff --git a/llvm/include/llvm/IR/BundleAttributes.def b/llvm/include/llvm/IR/BundleAttributes.def
deleted file mode 100644
index 78c692393fb44..0000000000000
--- a/llvm/include/llvm/IR/BundleAttributes.def
+++ /dev/null
@@ -1,22 +0,0 @@
-//===- llvm/BundleAttributes.def - LLVM Bundle Attributes -------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-ATTR(Align, align)
-ATTR(Cold, cold)
-ATTR(Dereferenceable, dereferenceable)
-ATTR(DereferenceableOrNull, dereferenceable_or_null)
-ATTR(Ignore, ignore)
-ATTR(NonNull, nonnull)
-
-// FIXME: Is this actually useful?
-// It's currently exclusively emitted through tests.
-ATTR(NoUndef, noundef)
-
-ATTR(SeparateStorage, separate_storage)
-
-#undef ATTR
diff --git a/llvm/include/llvm/IR/BundleAttributes.h b/llvm/include/llvm/IR/BundleAttributes.h
deleted file mode 100644
index ee6e5b4bc1ef6..0000000000000
--- a/llvm/include/llvm/IR/BundleAttributes.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//===- llvm/BundleAttributes.h - LLVM Bundle Attributes ---------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_IR_BUNDLE_ATTRIBUTES_H
-#define LLVM_IR_BUNDLE_ATTRIBUTES_H
-
-#include "llvm/ADT/StringRef.h"
-#include "llvm/IR/InstrTypes.h"
-
-enum class BundleAttr {
- None,
-#define ATTR(Name, String) Name,
-#include "BundleAttributes.def"
-};
-
-namespace llvm {
-
-LLVM_ABI StringRef getNameFromBundleAttr(BundleAttr);
-LLVM_ABI BundleAttr getBundleAttrFromString(StringRef);
-
-inline BundleAttr getBundleAttrFromOBU(OperandBundleUse OBU) {
- return getBundleAttrFromString(OBU.getTagName());
-}
-
-struct AssumeAlignInfo {
- const Use &Ptr;
- const Use &Alignment;
- std::optional<uint64_t> AlignmentVal;
- std::optional<uint64_t> OffsetVal;
-};
-
-LLVM_ABI AssumeAlignInfo getAssumeAlignInfo(OperandBundleUse);
-
-struct AssumeDereferenceableInfo {
- const Use &Ptr;
- const Use &Count;
-};
-
-LLVM_ABI
-AssumeDereferenceableInfo getAssumeDereferenceableInfo(OperandBundleUse);
-
-struct AssumeNonNullInfo {
- const Use &Ptr;
-};
-
-LLVM_ABI AssumeNonNullInfo getAssumeNonNullInfo(OperandBundleUse);
-
-struct AssumeSeparateStorageInfo {
- const Use &Ptr1;
- const Use &Ptr2;
-};
-
-LLVM_ABI
-AssumeSeparateStorageInfo getAssumeSeparateStorageInfo(OperandBundleUse);
-
-} // namespace llvm
-
-#endif // LLVM_IR_BUNDLE_ATTRIBUTES_H
diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h
index 5f7df6a4eb6f8..b575b32a244df 100644
--- a/llvm/include/llvm/IR/InstrTypes.h
+++ b/llvm/include/llvm/IR/InstrTypes.h
@@ -2353,12 +2353,6 @@ class CallBase : public Instruction {
return make_range(bundle_op_info_begin(), bundle_op_info_end());
}
- auto operand_bundles() const {
- return map_range(bundle_op_infos(), [this](BundleOpInfo BOI) {
- return operandBundleFromBundleOpInfo(BOI);
- });
- }
-
/// Populate the BundleOpInfo instances and the Use& vector from \p
/// Bundles. Return the op_iterator pointing to the Use& one past the last
/// last bundle operand use.
diff --git a/llvm/include/llvm/Transforms/Utils/PredicateInfo.h b/llvm/include/llvm/Transforms/Utils/PredicateInfo.h
index 06ce720bda6a9..e472656d7b9fb 100644
--- a/llvm/include/llvm/Transforms/Utils/PredicateInfo.h
+++ b/llvm/include/llvm/Transforms/Utils/PredicateInfo.h
@@ -52,7 +52,6 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallSet.h"
-#include "llvm/IR/BundleAttributes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/ValueHandle.h"
@@ -133,9 +132,9 @@ class PredicateAssume : public PredicateBase {
class PredicateBundleAssume : public PredicateAssume {
public:
- BundleAttr AttrKind;
+ Attribute::AttrKind AttrKind;
PredicateBundleAssume(Value *Op, IntrinsicInst *AssumeInst,
- BundleAttr AttrKind)
+ Attribute::AttrKind AttrKind)
: PredicateAssume(PT_BundleAssume, Op, AssumeInst, nullptr),
AttrKind(AttrKind) {}
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 3a875bd680fb9..e78a47b8de68d 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -14,6 +14,7 @@
#include "llvm/Analysis/LazyValueInfo.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/Analysis/AssumeBundleQueries.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/InstructionSimplify.h"
@@ -22,7 +23,6 @@
#include "llvm/Analysis/ValueLattice.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/AssemblyAnnotationWriter.h"
-#include "llvm/IR/BundleAttributes.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
@@ -856,24 +856,26 @@ void LazyValueInfoImpl::intersectAssumeOrGuardBlockValueConstantRange(
continue;
if (AssumeVH.Index != AssumptionCache::ExprResultIdx) {
- auto OBU = I->getOperandBundleAt(AssumeVH.Index);
- switch (getBundleAttrFromOBU(OBU)) {
- case BundleAttr::NonNull:
- assert(getAssumeNonNullInfo(OBU).Ptr == Val);
- BBLV = BBLV.intersect(ValueLatticeElement::getNot(
- Constant::getNullValue(Val->getType())));
- break;
-
- case BundleAttr::Dereferenceable: {
- auto [Ptr, Count] = getAssumeDereferenceableInfo(OBU);
- assert(Ptr == Val);
- if (auto *CI = dyn_cast<ConstantInt>(Count); CI && !CI->isZero())
+ if (RetainedKnowledge RK = getKnowledgeFromBundle(
+ *I, I->bundle_op_info_begin()[AssumeVH.Index])) {
+ if (RK.WasOn != Val)
+ continue;
+ switch (RK.AttrKind) {
+ case Attribute::NonNull:
BBLV = BBLV.intersect(ValueLatticeElement::getNot(
- Constant::getNullValue(Val->getType())));
- } break;
+ Constant::getNullValue(RK.WasOn->getType())));
+ break;
- default:
- break;
+ case Attribute::Dereferenceable:
+ if (auto *CI = dyn_cast<ConstantInt>(RK.IRArgValue);
+ CI && !CI->isZero())
+ BBLV = BBLV.intersect(ValueLatticeElement::getNot(
+ Constant::getNullValue(RK.WasOn->getType())));
+ break;
+
+ default:
+ break;
+ }
}
} else {
BBLV = BBLV.intersect(*getValueFromCondition(Val, I->getArgOperand(0),
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index a646dcd41fa23..1261664c5b986 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -38,7 +38,6 @@
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/BundleAttributes.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/ConstantFPRange.h"
#include "llvm/IR/ConstantRange.h"
@@ -828,30 +827,32 @@ static bool isKnownNonZeroFromAssume(const Value *V, const SimplifyQuery &Q) {
"Got assumption for the wrong function!");
if (Elem.Index != AssumptionCache::ExprResultIdx) {
- bool AssumeImpliesNonNull = [&]() {
- auto OBU = I->getOperandBundleAt(Elem.Index);
- switch (getBundleAttrFromOBU(OBU)) {
- case BundleAttr::Dereferenceable: {
- auto [Ptr, Count] = getAssumeDereferenceableInfo(OBU);
- assert(Ptr == V);
- if (NullPointerIsDefined(Q.CxtI->getFunction(),
- V->getType()->getPointerAddressSpace()))
- return false;
+ if (!V->getType()->isPointerTy())
+ continue;
+ if (RetainedKnowledge RK = getKnowledgeFromBundle(
+ *I, I->bundle_op_info_begin()[Elem.Index])) {
+ if (RK.WasOn != V)
+ continue;
+ bool AssumeImpliesNonNull = [&]() {
+ if (RK.AttrKind == Attribute::NonNull)
+ return true;
- auto *CI = dyn_cast<ConstantInt>(Count);
- return CI && !CI->isZero();
- }
+ if (RK.AttrKind == Attribute::Dereferenceable) {
+ if (NullPointerIsDefined(Q.CxtI->getFunction(),
+ V->getType()->getPointerAddressSpace()))
+ return false;
+ assert(RK.IRArgValue &&
+ "Dereferenceable attribute without IR argument?");
- case BundleAttr::NonNull:
- assert(getAssumeNonNullInfo(OBU).Ptr == V);
- return true;
+ auto *CI = dyn_cast<ConstantInt>(RK.IRArgValue);
+ return CI && !CI->isZero();
+ }
- default:
return false;
- }
- }();
- if (AssumeImpliesNonNull && isValidAssumeForContext(I, Q))
- return true;
+ }();
+ if (AssumeImpliesNonNull && isValidAssumeForContext(I, Q))
+ return true;
+ }
continue;
}
@@ -1087,15 +1088,13 @@ void llvm::computeKnownBitsFromContext(const Value *V, KnownBits &Known,
"Got assumption for the wrong function!");
if (Elem.Index != AssumptionCache::ExprResultIdx) {
- if (auto OBU = I->getOperandBundleAt(Elem.Index);
- getBundleAttrFromOBU(OBU) == BundleAttr::Align) {
- auto [Ptr, _, Alignment, Offset] = getAssumeAlignInfo(OBU);
- assert(Ptr == V);
- if (!Alignment || !Offset || !isPowerOf2_64(*Alignment))
- continue;
- auto AlignVal = MinAlign(*Offset, *Alignment);
- if (isValidAssumeForContext(I, Q))
- Known.Zero.setLowBits(Log2_64(AlignVal));
+ if (!V->getType()->isPointerTy())
+ continue;
+ if (RetainedKnowledge RK = getKnowledgeFromBundle(
+ *I, I->bundle_op_info_begin()[Elem.Index])) {
+ if (RK.WasOn == V && RK.AttrKind == Attribute::Alignment &&
+ isPowerOf2_64(RK.ArgValue) && isValidAssumeForContext(I, Q))
+ Known.Zero.setLowBits(Log2_64(RK.ArgValue));
}
continue;
}
diff --git a/llvm/lib/IR/BundleAttributes.cpp b/llvm/lib/IR/BundleAttributes.cpp
deleted file mode 100644
index 3e4e65e8fd3d1..0000000000000
--- a/llvm/lib/IR/BundleAttributes.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-//===- llvm/BundleAttributes.cpp - LLVM Bundle Attributes -------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/IR/BundleAttributes.h"
-
-#include "llvm/ADT/StringSwitch.h"
-#include "llvm/IR/Constants.h"
-
-using namespace llvm;
-
-StringRef llvm::getNameFromBundleAttr(BundleAttr BA) {
- switch (BA) {
-#define ATTR(Name, Str) \
- case BundleAttr::Name: ...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/202336
More information about the llvm-commits
mailing list