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

Duplicate landing pads generated #1052

Open
smeenai opened this issue Nov 4, 2024 · 1 comment
Open

Duplicate landing pads generated #1052

smeenai opened this issue Nov 4, 2024 · 1 comment
Assignees
Labels
IR difference A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests

Comments

@smeenai
Copy link
Collaborator

smeenai commented Nov 4, 2024

https://godbolt.org/z/zrvbrqxEs has an example:

void f();
void g() {
    try {
        f();
        f();
    } catch (...) {}
}

CodeGen emits a single landing pad for the two calls, whereas with ClangIR you end up with duplicate landing pads (which aren't deduplicated even with LLVM optimizations). This ends up causing duplicating in the EH tables as well: https://godbolt.org/z/9aTnWjxEq. It shouldn't cause any correctness issues but it'll increase code size a bit until we address it.

@smeenai smeenai added the IR difference A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests label Nov 4, 2024
@bcardosolopes
Copy link
Member

bcardosolopes commented Nov 4, 2024

I have plans for this but didn't file an issue yet, thanks for getting to it first. Assigning to me for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IR difference A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests
Projects
None yet
Development

No branches or pull requests

2 participants