Skip to content

Conversation

@jurahul
Copy link
Contributor

@jurahul jurahul commented Aug 29, 2024

Fix intrinsic function attributes to not generate attribute sets that are empty in getIntrinsicFnAttributeSet. Refactor the code to use helper functions to get effective memory effects for an intrinsic and to check if it has non-default attributes.

This eliminates one case statement in getIntrinsicFnAttributeSet that we generate today for the case when intrinsic attributes are default ones.

Also rename Intrinsic to Int to follow the naming convention used in this file and adjust emission code to not emit unnecessary empty line between cases generated.

@jurahul jurahul marked this pull request as ready for review August 29, 2024 19:12
@jurahul jurahul requested review from arsenm and s-barannikov August 29, 2024 19:12
@jurahul jurahul force-pushed the intrinsic_emitter_fn_attributes branch 3 times, most recently from b75527a to a20dec8 Compare August 29, 2024 20:33
@github-actions
Copy link

github-actions bot commented Aug 29, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Fix intrinsic function attributes to not generate attribute sets that are
empty in `getIntrinsicFnAttributeSet`. Refactor the code to use helper
lambdas to get effective memory effects for an intrinsic and to check if
it has non-default attributes.

This emiminates one case statement in `getIntrinsicFnAttributeSet` that
we generate today for the case when intrinsic attributes are default ones.

Also rename `Intrinsic` to `Int` to follow the naming convention used in
this file, and adjust emission code to not emit unnecessary empty line
between cases generated.
@jurahul jurahul force-pushed the intrinsic_emitter_fn_attributes branch from a20dec8 to 3310c8d Compare August 29, 2024 20:44
@jurahul jurahul requested a review from arsenm August 29, 2024 22:04
@jurahul jurahul merged commit e5c7cde into llvm:main Sep 2, 2024
@jurahul jurahul deleted the intrinsic_emitter_fn_attributes branch September 2, 2024 13:28
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.

2 participants