FFabian Parzefall[BOLT] Process each block only once in fixCFGForPIC
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[BOLT] Replace uses of layout with basic block list As we are moving towards support for multiple fragments, loops that iterate over all basic blocks of a function, but do not depend on the order of basic blocks in the final layout, should iterate over binary functions directly, rather than the layout. Eventually, all loops using the layout list should either iterate over the function, or be aware of multiple layouts. This patch replaces references to binary function's block layout with the binary function itself where only little code changes are necessary. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129585 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Increase coverage of shrink wrapping [1/5] Change how function score is calculated and provide more detailed statistics when reporting back frame optimizer and shrink wrapping results. In this new statistics, we provide dynamic coverage numbers. The main metric for shrink wrapping is the number of executed stores that were saved because of shrink wrapping (push instructions that were either entirely moved away from the hot block or converted to a stack adjustment instruction). There is still a number of reduced load instructions (pop) that we are not counting at the moment. Also update alloc combiner to report dynamic numbers, as well as frame optimizer. For debugging purposes, we also include a list of top 10 functions optimized by shrink wrapping. These changes are aimed at better understanding the impact of shrink wrapping in a given binary. We also remove an assertion in dataflow analysis to do not choke on empty functions (which makes no sense). Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D126111 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] CMOVConversion pass Convert simple hammocks into cmov based on misprediction rate. Test Plan: - Assembly test: cmov-conversion.s - Testing on a binary: # Bootstrap clang with -x86-cmov-converter-force-all and -Wl,--emit-relocs (Release build) # Collect perf.data: - clang++ <opts> bolt/lib/Core/BinaryFunction.cpp -E > bf.cpp - perf record -e cycles:u -j any,u -- clang-15 bf.cpp -O2 -std=c++14 -c -o bf.o # Optimize clang-15 with and w/o -cmov-conversion: - llvm-bolt clang-15 -p perf.data -o clang-15.bolt - llvm-bolt clang-15 -p perf.data -cmov-conversion -o clang-15.bolt.cmovconv # Run perf experiment: - test: clang-15.bolt.cmovconv, - control: clang-15.bolt, - workload (clang options): bf.cpp -O2 -std=c++14 -c -o bf.o Results: task-clock [delta: -360.21 ± 356.75, delta(%): -1.7760 ± 1.7589, p-value: 0.047951, balance: -6] instructions [delta: 44061118 ± 13246382, delta(%): 0.0690 ± 0.0207, p-value: 0.000001, balance: 50] icache-misses [delta: -5534468 ± 2779620, delta(%): -0.4331 ± 0.2175, p-value: 0.028014, balance: -28] branch-misses [delta: -1624270 ± 1113244, delta(%): -0.3456 ± 0.2368, p-value: 0.030300, balance: -22] Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D120177 | 4 年前 | |
[BOLT][CMAKE] Fix DYLIB build Move BOLT libraries out of LLVM_LINK_COMPONENTS to target_link_libraries. Addresses issue #55432. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D125568 | 4 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT][NFC] Fix file-description comments Summary: Fix comments at the start of source files. (cherry picked from FBD33274597) | 4 年前 | |
[BOLT][NFC] Fix file-description comments Summary: Fix comments at the start of source files. (cherry picked from FBD33274597) | 4 年前 | |
[BOLT][NFC] Use BitVector::set_bits Refactor and use set_bits BitVector interface. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D125374 | 4 年前 | |
[BOLT][NFC] Fix file-description comments Summary: Fix comments at the start of source files. (cherry picked from FBD33274597) | 4 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Increase coverage of shrink wrapping [5/5] Add -experimental-shrink-wrapping flag to control when we want to move callee-saved registers even when addresses of the stack frame are captured and used in pointer arithmetic, making it more challenging to do alias analysis to prove that we do not access optimized stack positions. This alias analysis is not yet implemented, hence, it is experimental. In practice, though, no compiler would emit code to do pointer arithmetic to access a saved callee-saved register unless there is a memory bug or we are failing to identify a callee-saved reg, so I'm not sure how useful it would be to formally prove that. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D126115 | 3 年前 | |
[BOLT][NFC] Use range-based STL wrappers Replace std:: algorithms taking begin/end iterators with llvm:: counterparts accepting ranges. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D128154 | 3 年前 | |
[BOLT][NFC] Use range-based STL wrappers Replace std:: algorithms taking begin/end iterators with llvm:: counterparts accepting ranges. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D128154 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT][NFC] Fix braces usage in Passes Summary: Refactor bolt/*/Passes to follow the braces rule for if/else/loop from [LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html). (cherry picked from FBD33344642) | 4 年前 | |
[BOLT][NFC] Fix file-description comments Summary: Fix comments at the start of source files. (cherry picked from FBD33274597) | 4 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Increase coverage of shrink wrapping [3/5] Add the option to run -equalize-bb-counts before shrink wrapping to avoid unnecessarily optimizing some CFGs where profile is inaccurate but we can prove two blocks have the same frequency. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D126113 | 3 年前 | |
[BOLT] Replace uses of layout with basic block list As we are moving towards support for multiple fragments, loops that iterate over all basic blocks of a function, but do not depend on the order of basic blocks in the final layout, should iterate over binary functions directly, rather than the layout. Eventually, all loops using the layout list should either iterate over the function, or be aware of multiple layouts. This patch replaces references to binary function's block layout with the binary function itself where only little code changes are necessary. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129585 | 3 年前 | |
[BOLT][NFCI] Refactor interface for adding basic blocks Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D127935 | 3 年前 | |
[BOLT][NFC] Use range-based STL wrappers Replace std:: algorithms taking begin/end iterators with llvm:: counterparts accepting ranges. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D128154 | 3 年前 | |
[bolt] Remove unneeded cl::ZeroOrMore for cl::opt options | 3 年前 | |
[BOLT][NFC] Use range-based STL wrappers Replace std:: algorithms taking begin/end iterators with llvm:: counterparts accepting ranges. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D128154 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT][NFC] Use range-based STL wrappers Replace std:: algorithms taking begin/end iterators with llvm:: counterparts accepting ranges. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D128154 | 3 年前 | |
[BOLT][NFC] Use range-based STL wrappers Replace std:: algorithms taking begin/end iterators with llvm:: counterparts accepting ranges. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D128154 | 3 年前 | |
[BOLT][NFCI] Refactor interface for adding basic blocks Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D127935 | 3 年前 | |
[bolt] std::atomic_uint64_t to std::atomic<uint64_t> Differential Revision: https://reviews.llvm.org/D129903 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Fix AND evaluation bug in shrink wrapping Fix a bug where shrink-wrapping would use wrong stack offsets because the stack was being aligned with an AND instruction, hence, making its true offsets only available during runtime (we can't statically determine where are the stack elements and we must give up on this case). Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D126110 | 4 年前 | |
Add missing MC includes in bolt/ Changes needed after ef736a1c39f27ef4 that removes some implicit dependencies from MrCV headers. | 4 年前 | |
[BOLT][NFC] Fix file-description comments Summary: Fix comments at the start of source files. (cherry picked from FBD33274597) | 4 年前 | |
[BOLT][NFC] Fix braces usage in Passes Summary: Refactor bolt/*/Passes to follow the braces rule for if/else/loop from [LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html). (cherry picked from FBD33344642) | 4 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Add function layout class This patch adds a dedicated class to keep track of each function's layout. It also lays the groundwork for splitting functions into multiple fragments (as opposed to a strict hot/cold split). Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D129518 | 3 年前 | |
[BOLT] Process each block only once in fixCFGForPIC Rather than iterating over the whole function from the start until no internal calls are found, process each block only once and continue processing after splitting. This version of the function also does not seemingly invalidate iterators from within the loop. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D130436 | 3 年前 | |
[BOLT][AArch64] Handle gold linker veneers The gold linker veneers are written between functions without symbols, so we to handle it specially in BOLT. Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei Differential Revision: https://reviews.llvm.org/D129260 | 3 年前 |