[llvm] [IntrinsicEmitter] Make AttributesMap PackedID type-adaptive (PR #158383)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 16:23:39 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp b/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
index a10ef3137..f3e6d5039 100644
--- a/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/IntrinsicEmitter.cpp
@@ -638,8 +638,7 @@ static AttributeSet getIntrinsicFnAttributeSet(LLVMContext &C, unsigned ID) {
if (AttributesMapDataBitSize < 8)
AttributesMapDataBitSize = 8;
else if (AttributesMapDataBitSize > 64)
- PrintFatalError(
- "Packed ID of IntrinsicsToAttributesMap exceeds 64b!");
+ PrintFatalError("Packed ID of IntrinsicsToAttributesMap exceeds 64b!");
else if (AttributesMapDataBitSize > 16)
PrintWarning("Packed ID of IntrinsicsToAttributesMap exceeds 16b, "
"this may cause performance drop!");
@@ -795,8 +794,8 @@ AttributeSet Intrinsic::getFnAttributes(LLVMContext &C, ID id) {
)",
AttributesMapDataBitSize, UniqAttributesBitSize,
maskTrailingOnes<uint16_t>(UniqAttributesBitSize), MaxNumAttrs,
- NoFunctionAttrsID,
- AttributesMapDataBitSize, UniqAttributesBitSize);
+ NoFunctionAttrsID, AttributesMapDataBitSize,
+ UniqAttributesBitSize);
}
void IntrinsicEmitter::EmitIntrinsicToBuiltinMap(
``````````
</details>
https://github.com/llvm/llvm-project/pull/158383
More information about the llvm-commits
mailing list