Skip to content

Generation of Object file gets stuck in infinite loop after enabling RISCVVLOptimizer #123862

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

Closed
MaheshRavishankar opened this issue Jan 22, 2025 · 2 comments · Fixed by #123878
Closed
Assignees
Labels
backend:RISC-V hang Compiler hang (infinite loop)

Comments

@MaheshRavishankar
Copy link
Contributor

I hit an issue in downstream project (IREE), where the PR to enable the RISCVVLOptimizer gets stuck in an infinite loop (i.e. after #119461). Reverting that seems to resolve the issue.

module_three_fry_linked_embedded_elf_riscv_64.optimized.ll.txt

This is the output after what is effectively opt phase. The downstream project uses the c++ interface to emit object files, so I cant really reproduce the command line options for the hang, But there is not much secret sauce here on how it is generating the object file (https://github.com/iree-org/iree/blob/8c7eecaadda7931724aae3ac371fb60c1fb01873/compiler/plugins/target/LLVMCPU/LLVMIRPasses.cpp#L98) . If someone can give me tips on how I can try to get the equivalent command line for llc that mimics what is done there, I am happy to try.

@michaelmaitland could you please provide guidance here. We have been reverting this patch downstream for a while, and it is getting hard for us to carry the revert.

@llvmbot
Copy link
Member

llvmbot commented Jan 22, 2025

@llvm/issue-subscribers-backend-risc-v

Author: None (MaheshRavishankar)

I hit an issue in downstream project (IREE), where the PR to enable the RISCVVLOptimizer gets stuck in an infinite loop (i.e. after https://github.com//pull/119461). Reverting that seems to resolve the issue.

module_three_fry_linked_embedded_elf_riscv_64.optimized.ll.txt

This is the output after what is effectively opt phase. The downstream project uses the c++ interface to emit object files, so I cant really reproduce the command line options for the hang, But there is not much secret sauce here on how it is generating the object file (https://github.com/iree-org/iree/blob/8c7eecaadda7931724aae3ac371fb60c1fb01873/compiler/plugins/target/LLVMCPU/LLVMIRPasses.cpp#L98) . If someone can give me tips on how I can try to get the equivalent command line for llc that mimics what is done there, I am happy to try.

@michaelmaitland could you please provide guidance here. We have been reverting this patch downstream for a while, and it is getting hard for us to carry the revert.

@michaelmaitland
Copy link
Contributor

#123878 should fix this.

MaheshRavishankar pushed a commit to iree-org/llvm-project that referenced this issue Jan 22, 2025
michaelmaitland added a commit to michaelmaitland/llvm-project that referenced this issue Jan 22, 2025
michaelmaitland added a commit that referenced this issue Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:RISC-V hang Compiler hang (infinite loop)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants