Skip to content

Faster compile times for release builds with small fix #44655

Closed
@andjo403

Description

@andjo403

Was looking at the printout of llvm passes when I noticed that the functions that was inlined everywhere, and due to this was dead code, was optimized more after inlining.

So as a test I added MPM.add(createGlobalDCEPass()); at the line PassManagerBuilder.cpp#L480 and this reduces the compile time of release build in racer by an average of 23%.

I do not know if this is a good place to add this extra pass but maybe someone that knows how llvm works can use this information to speedup the compilation of release builds.

was also wondering how this works in MIR I see that there is an inline pass but I can not find any dead code elimination

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-enhancementCategory: An issue proposing an enhancement or a PR with one.I-compiletimeIssue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions