Skip to content

Hot-cold Splitting #18

@kavon

Description

@kavon

A current deficiency of the profile-guided hot-cold splitting (HCS) in LLVM is that it will not move the cold functions away from the hot code to actually benefit from spatial locality due to issues with linkers. This is most likely why it does not yield performance improvements, only code size reductions.

For Halo, it might make sense to perform HCS (preceded by inlining and followed up by function merging). One way to do it in a way to benefit from locality is to extract those cold functions into another module, compile separately, and send two object files to clients. Thus, the dynamic linker will allocate the the hot and cold functions away from each other as two dylibs. There may be cyclic dependencies between these two modules, so some care will be needed when linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions