-
Notifications
You must be signed in to change notification settings - Fork 147
[CIR][Lowering] Core dialects: passthrough symbol visibility #1620
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
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e69f483
passing through sym_visibility, arg_attrs and res_attrs for cir.func …
felixdaas 40cb63d
added coversion of CIR TargetTripleAttr to llvm mlir TargetTripleAttr…
felixdaas 280bb46
added two testcases to test if 1. the sym_visibility attr is passed c…
felixdaas 451ce56
Simplified tests, added --triple option to declaration test + added c…
felixdaas 71a99b8
removed the passing of arg_attrs and res_attrs + adjusted the tests
felixdaas bd9daaa
adjust temporary result object file name in driver.c test and fix mis…
felixdaas 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Check that the `cir.triple` attribute is correctly translated into the LLVM `llvm.triple` attribute. | ||
// This test cannot use `-triple x86_64-unknown-linux-gnu` explicitly, | ||
// as the frontend must infer the triple based on the host. | ||
// Restricting this test to supported targets until CIR supports more platforms. | ||
|
||
// RUN: %clang -fclangir -fno-clangir-direct-lowering -c %s -o %t | ||
|
||
// TODO: Relax target constraint once CIR supports additional backends. | ||
// REQUIRES: target=x86_64{{.*}}-linux{{.*}} | ||
|
||
|
||
int test_target_triple_passthrough() { | ||
// Variables | ||
int number = 0; | ||
|
||
return number; | ||
} |
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,16 @@ | ||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -fno-clangir-direct-lowering -emit-mlir=core %s -o %t.mlir | ||
// RUN: FileCheck --input-file=%t.mlir %s | ||
|
||
|
||
bcardosolopes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
int declaration(int x); | ||
|
||
// CHECK: func.func private @declaration(i32) -> i32 | ||
bcardosolopes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
int declaration_test() { | ||
// Variables | ||
int number = 15; | ||
|
||
felixdaas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
number = declaration(number); | ||
|
||
return 0; | ||
} |
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.