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

[CIR] Add support for GCC function attribute "const" and "pure" #1262

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

Lancern
Copy link
Member

@Lancern Lancern commented Dec 31, 2024

This patch adds support for the following GCC function attributes:

  • __attribute__((const))
  • __attribute__((pure))

The side effect information is attached to the call operations during CIRGen. During LLVM lowering, these information is consumed to further emit appropriate LLVM metadata on LLVM call instructions.

@Lancern Lancern force-pushed the call-side-effect branch 3 times, most recently from b3e4788 to caedb99 Compare January 9, 2025 13:28
@bcardosolopes
Copy link
Member

Few nits and I'll merge!

This patch adds support for the following GCC function attributes:

  - __attribute__((const))
  - __attribute__((pure))
@bcardosolopes bcardosolopes merged commit 4a27d49 into llvm:main Jan 9, 2025
5 of 6 checks passed
@Lancern Lancern deleted the call-side-effect branch January 15, 2025 01:31
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