Skip to content

Use tree merge for single-module LLVM linking - #3493

Merged
lerno merged 3 commits into
c3lang:masterfrom
ManuLinares:c3c_single-module
Sep 2, 2026
Merged

Use tree merge for single-module LLVM linking#3493
lerno merged 3 commits into
c3lang:masterfrom
ManuLinares:c3c_single-module

Conversation

@ManuLinares

Copy link
Copy Markdown
Member

Instead of merging every module one-by-one into the first one (which gets slower and slower as it grows), merge them in pairs across multiple passes.

+20% on single-module -O0

Instead of merging every module one-by-one into the first one (which
gets slower and slower as it grows), merge them in pairs across multiple
passes.

+20% on single-module -O0
@lerno

lerno commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Add a test for --single-module=yes?

@ManuLinares

Copy link
Copy Markdown
Member Author

like here https://github.com/c3lang/c3c/blob/master/scripts/tools/ci_tests.sh#L104 we could add one.

    run_c3c compile examples/http_server.c3
    run_c3c compile-only examples/levenshtein.c3
    run_c3c compile-only --single-module=yes examples/levenshtein.c3  #this one
    run_c3c compile examples/load_world.c3

@lerno

lerno commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Yes

@lerno
lerno merged commit 639cfa2 into c3lang:master Sep 2, 2026
22 checks passed
@lerno

lerno commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

@ManuLinares
ManuLinares deleted the c3c_single-module branch September 6, 2026 06:35
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.

2 participants