-
Notifications
You must be signed in to change notification settings - Fork 146
[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
base: main
Are you sure you want to change the base?
Changes from all commits
e69f483
40cb63d
280bb46
451ce56
71a99b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// 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 | ||
|
||
// CHECK: func.func private @declaration(i32) -> i32 | ||
|
||
int declaration(int x); | ||
int declaration_test() { | ||
return declaration(15); | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR_MACOS | ||
// RUN: %clang -target arm64-apple-macosx12.0.0 -fclangir -S -emit-llvm %s -o %t3.ll | ||
// RUN: FileCheck --input-file=%t3.ll %s -check-prefix=LLVM_MACOS | ||
// RUN: %clang -target x86_64-unknown-linux-gnu -fclangir -fno-clangir-direct-lowering -c %s -o %t | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This path is already tested up there in the other -fno-clangir-direct-lowering invocation, turns out you don't need this test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe I'm missing something here but I don't see where this is already tested. I't looks to me like all the other tests using the indirect lowering "only" create the cir,core dialects or llvm ir and never actually compile to an object file (the error occurs when trying to compile the llvm ir to an object file since during the mlir core to llvm ir translation the cir.triple attribute is not converted to the llvm.triple attribute and is thus discarded). If I try to add this line to the driver.c test and run the test locally (on ubuntu) with the current code on llvm/clangir:main I get the error mentioned in issue #1619
If I run the test locally with the update code of this PR the test passes, so it seems to me like it does add value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, thanks for clarifying! One last change, use |
||
|
||
void foo(void) {} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more nit: code style requires all files to terminate with a newline,