NobleBlocks

Research indexJournal article

A Method for Implementing Basic Block Reordering in GNU 1D

Liu, Wang

15 Nov 2024

NobleIDark:/48914/w1/20260525/729F95F1DOI10.1109/eiect64462.2024.10867069

Paywalled

The full text is at the publisher

You can read the abstract here, or open it at the publisher.

Read at the publisher

Abstract

Currently, basic block reordering optimizations are typically performed during the compilation stage or implemented through standalone tools, with no direct implementation in the linker (ld). This paper proposes a method to implement basic block reordering directly within the Binutils ld linker. By inputting data on basic block sizes, call relationships, and jump frequencies, this approach combines this information with a basic block reordering algorithm to generate a new sequence for basic blocks. Based on this new sequence, it modifies the size, content, symbol table, and relocation table within the. text section of the target file. When executed according to this reordered sequence, the program reduces cache misses and the overhead associated with loading and unloading. Experimental results show that, using gzip as an example, this optimization reduces i-cache misses by 1.45%, i-TLB misses by 0.17%, and branch miss rate by 3.35%, demonstrating the feasibility and effectiveness of implementing basic block reordering within GNU Id.

Discussion

Citations

Topics

More

Suggest a correction or report