Skip to content

Commit 032c328

Browse files
authored
[NFC][TableGen] Refactor IntrinsicEmitter code (#106479)
- Use formatv() and raw string literals to simplify emission code. - Use range based for loops and structured bindings to simplify loops. - Use const Pointers to Records. - Rename `ComputeFixedEncoding` to `ComputeTypeSignature` to reflect what the function actually does, cnd change it to return a vector. - Use reverse() and range based for loop to pack 8 nibbles into 32-bits. - Rename some variables to follow LLVM coding standards. - For function memory effects, print human readable effects in comment.
1 parent a705e8c commit 032c328

File tree

2 files changed

+204
-191
lines changed

2 files changed

+204
-191
lines changed

llvm/test/TableGen/intrinsic-attrs.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def int_deref_ptr_ret : Intrinsic<[llvm_ptr_ty], [], [Dereferenceable<RetIndex,
6060
// CHECK-NEXT: default: llvm_unreachable("Invalid attribute set number");
6161
// CHECK-NEXT: case 0:
6262
// CHECK-NEXT: return AttributeSet::get(C, {
63-
// CHECK-NEXT: Attribute::get(C, Attribute::Dereferenceable, 16),
63+
// CHECK-NEXT: Attribute::get(C, Attribute::Dereferenceable, 16),
6464
// CHECK-NEXT: });
6565
// CHECK-NEXT: }
6666
// CHECK-NEXT: }

0 commit comments

Comments
 (0)