forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 4
Include comments with template argument names in Cpp code from EmitC #403
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
Merged
lmendesp-amd
merged 4 commits into
feature/fused-ops
from
lmendesp.emit-template-arg-names-in-cpp
Nov 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
12157a8
Include comments with template arg names in Cpp code from EmitC
lmendesp-amd bbebd27
Apply suggestions from code review
lmendesp-amd edd8cc3
Apply changes requested in code review
lmendesp-amd 25c3d04
Test for the presence of template arg names when there are no templat…
lmendesp-amd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // RUN: mlir-translate -mlir-to-cpp %s | FileCheck %s -check-prefix=CPP-DEFAULT | ||
|
|
||
| // CPP-DEFAULT: void basic(int32_t v1, float v2) { | ||
lmendesp-amd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| func.func @basic(%arg0: i32, %arg1: f32) { | ||
| emitc.call_opaque "kernel1"() : () -> () | ||
| // CPP-DEFAULT: kernel1(); | ||
| %0 = emitc.call_opaque "kernel2"(%arg0) : (i32) -> i16 | ||
| // CPP-DEFAULT: int16_t v3 = kernel2(v1); | ||
lmendesp-amd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| emitc.call_opaque "kernel3"(%arg0, %arg1) : (i32, f32) -> () | ||
| // CPP-DEFAULT: kernel3(v1, v2); | ||
| emitc.call_opaque "kernel4"(%arg0, %arg1) {template_arg_names = ["N", "P"], template_args = [42 : i32, 56]} : (i32, f32) -> () | ||
| // CPP-DEFAULT: kernel4</*N=*/42, /*P=*/56>(v1, v2); | ||
| emitc.call_opaque "kernel4"(%arg0, %arg1) {template_arg_names = ["N"], template_args = [#emitc.opaque<"42">]} : (i32, f32) -> () | ||
| // CPP-DEFAULT: kernel4</*N=*/42>(v1, v2); | ||
lmendesp-amd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return | ||
| // CPP-DEFAULT: return; | ||
| } | ||
| // CPP-DEFAULT: } | ||
lmendesp-amd marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.