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

[Umbrella] ThroughMLIR path status #1411

Closed
wenhu1024 opened this issue Feb 26, 2025 · 2 comments
Closed

[Umbrella] ThroughMLIR path status #1411

wenhu1024 opened this issue Feb 26, 2025 · 2 comments

Comments

@wenhu1024
Copy link

Issue Description

Encountered an error when using ClangIR through the MLIR to LLVMIR path. The direct path from CIR to LLVMIR works correctly, but the path through MLIR fails. Is there a plan in the ClangIR project to support the complete pathway from CIR through MLIR to LLVM IR for generating executable files?

Steps to Reproduce

  1. Using this simple code:
#include <stdio.h>

int main(){
    printf("hello\n");
    return 0;
}
  1. Using CIR direct to LLVMIR path (works correctly):
../bin/clang -fclangir -fclangir-direct-lowering hello.c -o hello

Execution result:

./hello
hello
  1. Using CIR through MLIR to LLVMIR path (fails):
../bin/clang -fclangir -fno-clangir-direct-lowering hello.c -o hello

Error message:

loc(fused["/usr/include/stdio.h":363:1, "/usr/include/stdio.h":363:56]): error: 'func.func' op symbol declaration cannot have public visibility
fatal error: error in backend: The pass manager failed to lower CIR to LLVMIR dialect!
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
@bcardosolopes
Copy link
Member

Different folks have been involved with paving that path, mostly recently @keryell, if you want to work on that y'all can sync on that.

@bcardosolopes bcardosolopes changed the title Is there a plan to support the complete CIR→MLIR→LLVM IR executable generation pathway? ThroughMLIR path status Feb 26, 2025
@bcardosolopes bcardosolopes changed the title ThroughMLIR path status [Umbrella] ThroughMLIR path status Feb 26, 2025
@bcardosolopes
Copy link
Member

Actually, you might want to follow #1219, closing this one

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

No branches or pull requests

2 participants