Abstract
Existing methods for optimizing the LLVM compiler face challenge in quickly obtaining high-quality solutions due to the large and discrete optimization space of option sequences, time-consuming energy consumption evaluation, and complex interactions among options. To address these challenges, we present a Two-Stage LLVM Option Sequence Optimization Method to Minimize Energy Consumption (TSOMFEC). In the first stage, we propose an Option Selection algorithm based on Pattern Mining (OSPM). OSPM integrates a pattern mining algorithm and CRC algorithm to precisely preselect options, with the goal of reducing the search space of option sequences while guaranteeing optimization quality. In the second stage, we present an Option Sequence Evolutionary Algorithm (OSOA). OSOA encodes options and their positions in the sequence as individual items and then constructs an item interaction graph to capture complex interactions among different items. The item interaction graph is utilized in a genetic algorithm to reduce actual energy consumption evaluations and rapidly obtain high-quality option sequences. We evaluate the performance of TSOMFEC by comparing it with four state-of-the-art methods across eight typical embedded programs in terms of solution quality and optimization time. Furthermore, we validate the effectiveness of both OSPM and item interaction graph. The experimental results demonstrate that TSOMFEC not only achieves the best solution quality but also spends the least optimization time. It obtains average energy consumption improvement percentages relative to the -O3 level of 0.075, along with average optimization time of 3178 s. Moreover, the effectiveness of both OSPM and the item interaction graph has been validated.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have