Skip to content

Duplicate landing pads generated #1052

@smeenai

Description

@smeenai

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.

Metadata

Metadata

Assignees

Labels

IR differenceA difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions