-
Notifications
You must be signed in to change notification settings - Fork 736
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
[FPGA] [CodeGen][NFC] Enhance Intel FPGA annotation function and optimize code #14577
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…LIntelRegister, SYCLIntelMemory) This patch uses MutualExclusions tablegen support to allow us to remove a custom diagnostic checking codes with FPGA attributes: [[intel:fpga_register]] and [[intel::fpga_memory]]. No test is added as we alreday have an existing LIT test (SemaSYCL/local.cpp) that shows the behavior.
…code Signed-off-by: Soumi Manna <soumi.manna@intel.com>
smanna12
changed the title
Fix static analyzr bugs
[FPGA] [CodeGen] Enhance Intel FPGA annotation function and optimize code
Jul 16, 2024
smanna12
changed the title
[FPGA] [CodeGen] Enhance Intel FPGA annotation function and optimize code
[FPGA] [CodeGen][NFC] Enhance Intel FPGA annotation function and optimize code
Jul 16, 2024
elizabethandrews
approved these changes
Jul 16, 2024
Thank you @elizabethandrews for reviews! |
@intel/llvm-gatekeepers, This PR is ready to merge. Thank you |
smanna12
added a commit
to smanna12/llvm
that referenced
this pull request
Jul 16, 2024
…mize code (intel#14577) This commit makes several improvements to the `CodeGenModule::addGlobalIntelFPGAAnnotation` method: - Updating the comment style to be Doxygen compliant for the `addGlobalIntelFPGAAnnotation` function. - Replaced `getAs<RecordType>()` with `castAs<RecordType>()` after confirming that the variable declaration type is guaranteed to be a `RecordType`. This change removes the need for a null check and streamlines the code. - Modified the base class iteration loop to use a reference (`const auto &Base`) to avoid unnecessary copies of `CXXBaseSpecifier` objects. These changes enhance code readability, improve code documentation and potentially increase performance by avoiding unnecessary dynamic type checks and copies. --------- Signed-off-by: Soumi Manna <soumi.manna@intel.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit makes several improvements to the
CodeGenModule::addGlobalIntelFPGAAnnotation
method:addGlobalIntelFPGAAnnotation
function.getAs<RecordType>()
withcastAs<RecordType>()
after confirming that the variable declaration type is guaranteed to be aRecordType
. This change removes the need for a null check and streamlines the code.const auto &Base
) to avoid unnecessary copies ofCXXBaseSpecifier
objects.These changes enhance code readability, improve code documentation and potentially increase performance by avoiding unnecessary dynamic type checks and copies.