| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[BOLT][AArch64] Run LDR relaxation (#165787) Replace the current ADRRelaxationPass with AArch64RelaxationPass, which, besides the existing ADR relaxation, will also run LDR relaxation that for now only handles these two forms of LDR instructions: ldr Xt, [label] and ldr Wt, [label]. | 9 个月前 | |
[bolt] Fix typos discovered by codespell (#124726) https://github.com/codespell-project/codespell bash codespell bolt --skip="*.yaml,Maintainers.txt" --write-changes \ --ignore-words-list=acount,alledges,ans,archtype,defin,iself,mis,mmaped,othere,outweight,vas | 9 个月前 | |
[BOLT][NFC] Log through JournalingStreams (#81524) Make core BOLT functionality more friendly to being used as a library instead of in our standalone driver llvm-bolt. To accomplish this, we augment BinaryContext with journaling streams that are to be used by most BOLT code whenever something needs to be logged to the screen. Users of the library can decide if logs should be printed to a file, no file or to the screen, as before. To illustrate this, this patch adds a new option --log-file that allows the user to redirect BOLT logging to a file on disk or completely hide it by using --log-file=/dev/null. Future BOLT code should now use BinaryContext::outs() for printing important messages instead of llvm::outs(). A new test log.test enforces this by verifying that no strings are print to screen once the --log-file option is used. In previous patches we also added a new BOLTError class to report common and fatal errors, so code shouldn't call exit(1) now. To easily handle problems as before (by quitting with exit(1)), callers can now use BinaryContext::logBOLTErrorsAndQuitOnFatal(Error) whenever code needs to deal with BOLT errors. To test this, we have fatal.s that checks we are correctly quitting and printing a fatal error to the screen. Because this is a significant change by itself, not all code was yet ported. Code from Profiler libs (DataAggregator and friends) still print errors directly to screen. Co-authored-by: Rafael Auler <rafaelauler@fb.com> Test Plan: NFC | 2 年前 | |
[BOLT] Use llvm::replace (NFC) (#140199) | 1 年前 | |
[BOLT][NFC] Drop unused profile staleness stats (#165489) Equal number of blocks in a function/instructions in a block between stale profile and the binary isn't used in the matching. Remove these stats to declutter the output. Test Plan: NFC | 9 个月前 | |
[BOLT][NFC] Clean includes, add license headers (#87200) | 2 年前 | |
[BOLT][AArch64] Run LDR relaxation (#165787) Replace the current ADRRelaxationPass with AArch64RelaxationPass, which, besides the existing ADR relaxation, will also run LDR relaxation that for now only handles these two forms of LDR instructions: ldr Xt, [label] and ldr Wt, [label]. | 9 个月前 | |
[BOLT][NFC] Eliminate uses of throwing std::map::at (#92950) Remove calls to std::unordered_map::at, std::map::at, and std::vector::at. | 2 年前 | |
[BOLT][NFC] Use std::optional in MCPlusBuilder Reviewed By: maksfb, #bolt Differential Revision: https://reviews.llvm.org/D139260 | 3 年前 | |
[BOLT] Use std::nullopt instead of None (NFC) This patch mechanically replaces None with std::nullopt where the compiler would warn if None were deprecated. The intent is to reduce the amount of manual work required in migrating from Optional to std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 | 3 年前 | |
[BOLT][NFC] Clean includes, add license headers (#87200) | 2 年前 | |
[BOLT][NFC] Clean includes, add license headers (#87200) | 2 年前 | |
[BOLT][NFC] Fix for a dangling reference UB (#163344) Fix UB caused by accessing the top element of the stack via a dangling reference after a call to .pop() This is tripping static analysis. No functional changes. Performance impact is negligible, but alt. implementation of the fix is possible if needed. Testing: Both functional and unit tests are passing. | 9 个月前 | |
[BOLT][AArch64] Refuse to run FrameOptimizer pass (#152309) FrameOptimizer pass runs by default on all targets, however, it defaults to --frame-opt=none. This patch prevents the pass from running on non-x86 targets when any other value (hot, full) is specified. | 11 个月前 | |
[BOLT] Remove unused local variables (NFC) (#140421) While I'm at it, this patch removes GetExecutablePath, which becomes unused after removing the sole use. | 1 年前 | |
[BOLT][NFC] Clean includes, add license headers (#87200) | 2 年前 | |
[BOLT] Add support for safe-icf (#116275) Identical Code Folding (ICF) folds functions that are identical into one function, and updates symbol addresses to the new address. This reduces the size of a binary, but can lead to problems. For example when function pointers are compared. This can be done either explicitly in the code or generated IR by optimization passes like Indirect Call Promotion (ICP). After ICF what used to be two different addresses become the same address. This can lead to a different code path being taken. This is where safe ICF comes in. Linker (LLD) does it using address significant section generated by clang. If symbol is in it, or an object doesn't have this section symbols are not folded. BOLT does not have the information regarding which objects do not have this section, so can't re-use this mechanism. This implementation scans code section and conservatively marks functions symbols as unsafe. It treats symbols as unsafe if they are used in non-control flow instruction. It also scans through the data relocation sections and does the same for relocations that reference a function symbol. The latter handles the case when function pointer is stored in a local or global variable, etc. If a relocation address points within a vtable these symbols are skipped. | 1 年前 | |
[BOLT] Fix handling of ambiguous jump table entries (#155291) Jump tables may contain entries that point immediately past the end of their parent function. Normally, such entries are generated by the compiler as a result of builtin_unreachable() case. We used to replace those entries with a label belonging to their parent function assuming the destination doesn't matter if it's an undefined behavior. However, if such entry is at the end of the jump table, it could be a real function pointer, not a jump table entry. We rely on heuristics to detect such cases and can drop the trailing function pointer entries from the table. The problem presents when the "unreachable" ambiguous entry is followed by another ambiguous entry corresponding to the start of the parent function. In this case we accept pointers as entries and may incorrectly update the function pointer. The solution is to keep ambiguous "unreachable" jump table entries identical to the original input, i.e. point to the same function. This change does not affect CFG, but results in the entries being updated with the new function address if it gets relocated. | 11 个月前 | |
[BOLT] Extend Inliner to work on functions with Pointer Authentication (#162458) The inliner uses DirectSP to check if a function has instructions that modify the SP. Exceptions are stack Push and Pop instructions. We can also allow pointer signing and authenticating instructions. The inliner removes the Return instructions from the inlined functions. If it is a fused pointer-authentication-and-return (e.g. RETAA), we have to generate a new authentication instruction. | 8 个月前 | |
[BOLT] Simplify RAState helpers (NFCI) (#162820) - unify isRAStateSigned and isRAStateUnsigned to a common getRAState, - unify setRASigned and setRAUnsigned into setRAState(MCInst, bool), - update users of these to match the new implementations. | 8 个月前 | |
[BOLT][AArch64][instr] Consider targeting ARM64 CPUs without LSE support (#158738) stadd is only available in recent arm64 CPUs that have LSE support (like Cortex-A73 and Cortex-A75) and is not available on old arm64 CPUs (like Cortex-A53 and Cortex-A55). Devices could have a mixture of these two kinds of CPUs, for which we need to provide an option for BOLT to generate instrumentation sequence that emulates what stadd would do. The implementation puts counter increment into an injected helper function so we don't need to update CFG in the function that is being instrumented and instrumentation induced binary size increase will be smaller. | 10 个月前 | |
[BOLT][NFC] Move CallGraph from Passes to Core (#96922) Moved CallGraph and BinaryFunctionCallGraph from Passes to Core for future use in stale matching. | 2 年前 | |
[BOLT][NFC] Fix file-description comments Summary: Fix comments at the start of source files. (cherry picked from FBD33274597) | 4 年前 | |
[BOLT][AArch64] Refuse to run CDSplit pass (#159351) LongJmp does not support warm blocks. On builds without assertions, this may lead to unexpected crashes. This patch exits with a clear message. | 10 个月前 | |
[BOLT][NFC] Log through JournalingStreams (#81524) Make core BOLT functionality more friendly to being used as a library instead of in our standalone driver llvm-bolt. To accomplish this, we augment BinaryContext with journaling streams that are to be used by most BOLT code whenever something needs to be logged to the screen. Users of the library can decide if logs should be printed to a file, no file or to the screen, as before. To illustrate this, this patch adds a new option --log-file that allows the user to redirect BOLT logging to a file on disk or completely hide it by using --log-file=/dev/null. Future BOLT code should now use BinaryContext::outs() for printing important messages instead of llvm::outs(). A new test log.test enforces this by verifying that no strings are print to screen once the --log-file option is used. In previous patches we also added a new BOLTError class to report common and fatal errors, so code shouldn't call exit(1) now. To easily handle problems as before (by quitting with exit(1)), callers can now use BinaryContext::logBOLTErrorsAndQuitOnFatal(Error) whenever code needs to deal with BOLT errors. To test this, we have fatal.s that checks we are correctly quitting and printing a fatal error to the screen. Because this is a significant change by itself, not all code was yet ported. Code from Profiler libs (DataAggregator and friends) still print errors directly to screen. Co-authored-by: Rafael Auler <rafaelauler@fb.com> Test Plan: NFC | 2 年前 | |
[BOLT][NFC] Disambiguate sample as basic sample (#139350) Sample is a general term covering both basic (IP) and branch (LBR) profiles. Find and replace ambiguous uses of sample in a basic sample sense. Rename RawBranchCount into RawSampleCount reflecting its use for both kinds of profile. Rename PF_LBR profile type as PF_BRANCH reflecting non-LBR based branch profiles (non-brstack SPE, synthesized brstack ETM/PT). Follow-up to #137644. Test Plan: NFC | 1 年前 | |
[BOLT] Simplify RAState helpers (NFCI) (#162820) - unify isRAStateSigned and isRAStateUnsigned to a common getRAState, - unify setRASigned and setRAUnsigned into setRAState(MCInst, bool), - update users of these to match the new implementations. | 8 个月前 | |
[BOLT] Gadget scanner: make use of C++17 features and LLVM helpers (#141665) Perform trivial syntactical cleanups: - make use of structured binding declarations - use LLVM utility functions when appropriate - omit braces around single expression inside single-line LLVM_DEBUG() This patch is NFC aside from minor debug output changes. | 10 个月前 | |
| 1 年前 | ||
[BOLT][AArch64] Patch functions targeted by optional relocs (#138750) On AArch64, we create optional/weak relocations that may not be processed due to the relocated value overflow. When the overflow happens, we used to enforce patching for all functions in the binary via --force-patch option. This PR relaxes the requirement, and enforces patching only for functions that are target of optional relocations. Moreover, if the compact code model is used, the relocation overflow is guaranteed not to happen and the patching will be skipped. | 1 年前 | |
[BOLT] Use llvm::max_element (NFC) (#140342) | 1 年前 | |
[BOLT] Expose external entry count for functions (#141674) Record the number of function invocations from external code - code outside the binary, which may include JIT code and DSOs. Accounting external entry counts improves the fidelity of call graph flow conservation analysis. Test Plan: updated shrinkwrapping.test | 1 年前 | |
[BOLT][NFC] Move CallGraph from Passes to Core (#96922) Moved CallGraph and BinaryFunctionCallGraph from Passes to Core for future use in stale matching. | 2 年前 | |
[bolt] Fix typos discovered by codespell (#124726) https://github.com/codespell-project/codespell bash codespell bolt --skip="*.yaml,Maintainers.txt" --write-changes \ --ignore-words-list=acount,alledges,ans,archtype,defin,iself,mis,mmaped,othere,outweight,vas | 9 个月前 | |
| 2 年前 | ||
[BOLT][NFC] Log through JournalingStreams (#81524) Make core BOLT functionality more friendly to being used as a library instead of in our standalone driver llvm-bolt. To accomplish this, we augment BinaryContext with journaling streams that are to be used by most BOLT code whenever something needs to be logged to the screen. Users of the library can decide if logs should be printed to a file, no file or to the screen, as before. To illustrate this, this patch adds a new option --log-file that allows the user to redirect BOLT logging to a file on disk or completely hide it by using --log-file=/dev/null. Future BOLT code should now use BinaryContext::outs() for printing important messages instead of llvm::outs(). A new test log.test enforces this by verifying that no strings are print to screen once the --log-file option is used. In previous patches we also added a new BOLTError class to report common and fatal errors, so code shouldn't call exit(1) now. To easily handle problems as before (by quitting with exit(1)), callers can now use BinaryContext::logBOLTErrorsAndQuitOnFatal(Error) whenever code needs to deal with BOLT errors. To test this, we have fatal.s that checks we are correctly quitting and printing a fatal error to the screen. Because this is a significant change by itself, not all code was yet ported. Code from Profiler libs (DataAggregator and friends) still print errors directly to screen. Co-authored-by: Rafael Auler <rafaelauler@fb.com> Test Plan: NFC | 2 年前 | |
Reapply "[BOLT] Add --pad-funcs-before=func:n (#117924)" (#121918) - **Reapply "[BOLT] Add --pad-funcs-before=func:n (#117924)"** - **[BOLT] Fix --pad-funcs{,-before} state misinteraction** When --pad-funcs-before was introduced, it introduced a bug whereby the first one to get parsed could influence the other. Ensure that each has its own state and test that they don't interact in this manner by testing how the _subsequent symbol moves when both arguments are supplied with different padding values. Fixed by having a function (and static state) for each of before/after. | 1 年前 | |
Replace deprecated MCExpr::print with MCAsmInfo::printExpr | 1 年前 | |
[BOLT][NFC] Fix for a dangling reference UB (#163344) Fix UB caused by accessing the top element of the stack via a dangling reference after a call to .pop() This is tripping static analysis. No functional changes. Performance impact is negligible, but alt. implementation of the fix is possible if needed. Testing: Both functional and unit tests are passing. | 9 个月前 | |
[bolt] Fix typos discovered by codespell (#124726) https://github.com/codespell-project/codespell bash codespell bolt --skip="*.yaml,Maintainers.txt" --write-changes \ --ignore-words-list=acount,alledges,ans,archtype,defin,iself,mis,mmaped,othere,outweight,vas | 9 个月前 | |
[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 年前 | |
| 1 年前 | ||
| 1 年前 | ||
[BOLT][NFC] Log through JournalingStreams (#81524) Make core BOLT functionality more friendly to being used as a library instead of in our standalone driver llvm-bolt. To accomplish this, we augment BinaryContext with journaling streams that are to be used by most BOLT code whenever something needs to be logged to the screen. Users of the library can decide if logs should be printed to a file, no file or to the screen, as before. To illustrate this, this patch adds a new option --log-file that allows the user to redirect BOLT logging to a file on disk or completely hide it by using --log-file=/dev/null. Future BOLT code should now use BinaryContext::outs() for printing important messages instead of llvm::outs(). A new test log.test enforces this by verifying that no strings are print to screen once the --log-file option is used. In previous patches we also added a new BOLTError class to report common and fatal errors, so code shouldn't call exit(1) now. To easily handle problems as before (by quitting with exit(1)), callers can now use BinaryContext::logBOLTErrorsAndQuitOnFatal(Error) whenever code needs to deal with BOLT errors. To test this, we have fatal.s that checks we are correctly quitting and printing a fatal error to the screen. Because this is a significant change by itself, not all code was yet ported. Code from Profiler libs (DataAggregator and friends) still print errors directly to screen. Co-authored-by: Rafael Auler <rafaelauler@fb.com> Test Plan: NFC | 2 年前 | |
[BOLT] Handle internal calls in ValidateInternalCalls (#105736) Move handling of all internal calls into the designated pass. Preserve NOPs and mark functions as non-simple on non-X86 platforms. | 1 年前 | |
[BOLT] Fix ValidateMemRefs pass (#94406) In ValidateMemRefs pass, when we validate references in the form of Symbol + Addend, we should check Symbol not Symbol + Addend against aliasing a jump table. Recommitting with a modified test case: https://github.com/llvm/llvm-project/pull/88838 Co-authored-by: sinan <sinan.lin@linux.alibaba.com> | 2 年前 | |
[BOLT][AArch64] Add support for short LLD thunks/veneers (#118422) When a callee function is closer than 256MB from its call site, LLD linker can strategically create a short thunk for the function with a single branch instruction (that covers +/-128MB). Detect and convert such thunks into direct calls in BOLT. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 11 个月前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 11 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 10 个月前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 10 个月前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 9 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 1 年前 |