Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC][TableGen] Refactor IntrinsicEmitter code #106479

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

jurahul
Copy link
Contributor

@jurahul jurahul commented Aug 29, 2024

  • 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 for_each() 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.

@jurahul jurahul marked this pull request as ready for review August 29, 2024 03:20
@jurahul
Copy link
Contributor Author

jurahul commented Aug 29, 2024

That was quick! Thanks. Will wait for @s-barannikov as well.

Copy link
Contributor

@s-barannikov s-barannikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usual nits

llvm/utils/TableGen/IntrinsicEmitter.cpp Outdated Show resolved Hide resolved
llvm/utils/TableGen/IntrinsicEmitter.cpp Outdated Show resolved Hide resolved
llvm/utils/TableGen/IntrinsicEmitter.cpp Outdated Show resolved Hide resolved
llvm/utils/TableGen/IntrinsicEmitter.cpp Outdated Show resolved Hide resolved
- 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 for_each() for loop to pack 8 nibbles into 32-bits.
- Rename some variables to follow LLVM coding standards.
@jurahul jurahul merged commit 032c328 into llvm:main Aug 29, 2024
8 checks passed
@jurahul jurahul deleted the intrinsic_emitter_refactor branch August 29, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants