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

Reapply and patch "[CIR][ABI] Apply CC lowering pass by default (#842)" #944

Merged
merged 9 commits into from
Oct 11, 2024

Conversation

sitio-couto
Copy link
Collaborator

This reverts commit 8f699fd and fixes some issues, namely:

  • CC lowering pass will no longer fail if the function has no AST information that won't be used.
  • Fixed CC lowering not disabling when running certain cc1 compilation commands.
  • CC lowering can now be disabled when calling cir-opt and cir-translate.
  • Compilation commands that generate Object files should now invoke CC lowering by default.

Copy link

github-actions bot commented Oct 7, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@sitio-couto sitio-couto force-pushed the vinicius/patch-cc-lowering-pass branch from c01bafd to 6edd26b Compare October 10, 2024 01:00
@sitio-couto
Copy link
Collaborator Author

@bcardosolopes (friendly ping)

@bcardosolopes bcardosolopes merged commit 9b9fd10 into llvm:main Oct 11, 2024
6 checks passed
@ChuanqiXu9
Copy link
Member

I found this patch caused a regression on vastart. Reproducer:

// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t.ll
// RUN: FileCheck --input-file=%t.ll %s -check-prefix=LLVM-X86

#include <stdarg.h>
void f1(int n, ...) {
  va_list valist;
  va_start(valist, n);
  va_end(valist);
}

@sitio-couto sitio-couto deleted the vinicius/patch-cc-lowering-pass branch October 12, 2024 20:26
@sitio-couto
Copy link
Collaborator Author

Hey @ChuanqiXu9 !

I found this patch caused a regression on vastart

I think the regression is due to the variadic f1 function. The CC lowering pass doesn't handle variadics yet, but it is also not asserting against them. I'll add an assertion to clarify this. In any case, the -fno-clangir-call-conv-lowering should "fix" it.

@ChuanqiXu9
Copy link
Member

Hey @ChuanqiXu9 !

I found this patch caused a regression on vastart

I think the regression is due to the variadic f1 function. The CC lowering pass doesn't handle variadics yet, but it is also not asserting against them. I'll add an assertion to clarify this. In any case, the -fno-clangir-call-conv-lowering should "fix" it.

Got it. Thanks. Would you like to create an issue that? And we can track it more explicitly.

@ChuanqiXu9
Copy link
Member

I sent #974 to track this more formally

keryell pushed a commit to keryell/clangir that referenced this pull request Oct 19, 2024
…#842)" (llvm#944)

This reverts commit 8f699fd and fixes some issues, namely:
 
- CC lowering pass will no longer fail if the function has no AST
information that won't be used.
- Fixed CC lowering not disabling when running certain `cc1` compilation
commands.
- CC lowering can now be disabled when calling `cir-opt` and
`cir-translate`.
- Compilation commands that generate Object files should now invoke CC
lowering by default.
lanza pushed a commit that referenced this pull request Nov 5, 2024
…" (#944)

This reverts commit 8f699fd and fixes some issues, namely:
 
- CC lowering pass will no longer fail if the function has no AST
information that won't be used.
- Fixed CC lowering not disabling when running certain `cc1` compilation
commands.
- CC lowering can now be disabled when calling `cir-opt` and
`cir-translate`.
- Compilation commands that generate Object files should now invoke CC
lowering by default.
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

Successfully merging this pull request may close these issues.

3 participants