#
89ca4eb0 |
| 20-May-2023 |
Shengchen Kan <shengchen.kan@intel.com> |
[X86][NFC] Correct the instruction names for PUSH16i, PUSH32i
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D151012
|
#
b6f07d3a |
| 18-May-2023 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Add MCPlusBuilder defOperands/useOperands helpers
Make intent more explicit with the use of new helper methods.
Reviewed By: #bolt, maksfb
Differential Revision: https://reviews.llvm.o
[BOLT][NFC] Add MCPlusBuilder defOperands/useOperands helpers
Make intent more explicit with the use of new helper methods.
Reviewed By: #bolt, maksfb
Differential Revision: https://reviews.llvm.org/D150810
show more ...
|
#
3e3a926b |
| 16-Feb-2023 |
spupyrev <spupyrev@fb.com> |
[BOLT][NFC] Add hash computation for basic blocks
Extending yaml profile format with block hashes, which are used for stale profile matching. To avoid duplication of the code, created a new class wi
[BOLT][NFC] Add hash computation for basic blocks
Extending yaml profile format with block hashes, which are used for stale profile matching. To avoid duplication of the code, created a new class with a collection of utilities for computing hashes.
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D144306
show more ...
|
#
edda8577 |
| 15-Mar-2023 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Move addRelocation{X86,AArch64} into MCPlusBuilder
The two methods don't belong in BinaryFunction methods. Move the dispatch tables into target-specific MCPlusBuilder methods.
Reviewed
[BOLT][NFC] Move addRelocation{X86,AArch64} into MCPlusBuilder
The two methods don't belong in BinaryFunction methods. Move the dispatch tables into target-specific MCPlusBuilder methods.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D131813
show more ...
|
#
223ec28d |
| 06-Feb-2023 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Return instruction list from createInstrIncMemory
Leverage move semantics for `std::vector`.
This also makes it consistent with `createInstrumentationSnippet`.
Reviewed By: Elvina
Dif
[BOLT][NFC] Return instruction list from createInstrIncMemory
Leverage move semantics for `std::vector`.
This also makes it consistent with `createInstrumentationSnippet`.
Reviewed By: Elvina
Differential Revision: https://reviews.llvm.org/D145465
show more ...
|
#
fb28196a |
| 26-Feb-2023 |
Maksim Panchenko <maks@fb.com> |
[BOLT] Fix intermittent crash with instrumentation
When createInstrumentedIndirectCall() was invoked for tail calls, we attached annotation instruction twice to the new call instruction. First in cr
[BOLT] Fix intermittent crash with instrumentation
When createInstrumentedIndirectCall() was invoked for tail calls, we attached annotation instruction twice to the new call instruction. First in createDirectCall(), and then again while copying over the metadata operands.
As a result, the annotations were not properly stripped for such calls before the call to freeAnnotations() in LowerAnnotations pass. That lead to use-after-free while restoring the offsets with setOffset() call.
Reviewed By: yota9
Differential Revision: https://reviews.llvm.org/D144806
show more ...
|
#
471c0e00 |
| 22-Feb-2023 |
Shengchen Kan <shengchen.kan@intel.com> |
[BOLT][X86][NFC] Simplify the code of X86MCPlusBuilder::getAliasSized
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D144551
|
#
48a215ae |
| 22-Feb-2023 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Return struct from evaluateX86MemoryOperand
Simplify `MCPlusBuilder::evaluateX86MemoryOperand`: make it return a struct with memory operand analysis struct `X86MemOperand`.
Reviewed By:
[BOLT][NFC] Return struct from evaluateX86MemoryOperand
Simplify `MCPlusBuilder::evaluateX86MemoryOperand`: make it return a struct with memory operand analysis struct `X86MemOperand`.
Reviewed By: #bolt, rafauler
Differential Revision: https://reviews.llvm.org/D144310
show more ...
|
#
fbb00337 |
| 25-Jan-2023 |
Jay Foad <jay.foad@amd.com> |
[BOLT] Use MCInstrDesc::operands() instead of OpInfo
operands() is the preferred accessor since D142213. OpInfo will be removed in D142219.
Differential Revision: https://reviews.llvm.org/D142530
|
#
2563fd63 |
| 06-Dec-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Use std::optional in MCPlusBuilder
Reviewed By: maksfb, #bolt
Differential Revision: https://reviews.llvm.org/D139260
|
#
e324a80f |
| 03-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[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 ma
[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
show more ...
|
#
1fa870b1 |
| 20-Nov-2022 |
Kazu Hirata <kazu@google.com> |
Use None consistently (NFC)
This patch replaces NoneType() and NoneType::None with None in preparation for migration from llvm::Optional to std::optional.
In the std::optional world, we are not gur
Use None consistently (NFC)
This patch replaces NoneType() and NoneType::None with None in preparation for migration from llvm::Optional to std::optional.
In the std::optional world, we are not guranteed to be able to default-construct std::nullopt_t or peek what's inside it, so neither NoneType() nor NoneType::None has a corresponding expression in the std::optional world.
Once we consistently use None, we should even be able to replace the contents of llvm/include/llvm/ADT/None.h with something like:
using NoneType = std::nullopt_t; inline constexpr std::nullopt_t None = std::nullopt;
to ease the migration from llvm::Optional to std::optional.
Differential Revision: https://reviews.llvm.org/D138376
show more ...
|
#
0972a390 |
| 09-Aug-2022 |
Fangrui Song <i@maskray.me> |
LLVM_FALLTHROUGH => [[fallthrough]]. NFC
|
#
f081ec20 |
| 30-Jul-2022 |
Kazu Hirata <kazu@google.com> |
[bolt] Remove redundaunt virtual specifiers (NFC)
Identified with modernize-use-override.
|
#
a3cfdd74 |
| 21-May-2022 |
Rafael Auler <rafaelauler@fb.com> |
[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 an
[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
show more ...
|
#
3508ced6 |
| 21-May-2022 |
Rafael Auler <rafaelauler@fb.com> |
[BOLT] Increase coverage of shrink wrapping [2/5]
Refactor isStackAccess() to reflect updates by D126116. Now we only handle simple stack accesses and delegate the rest of the cases to getMemDataSiz
[BOLT] Increase coverage of shrink wrapping [2/5]
Refactor isStackAccess() to reflect updates by D126116. Now we only handle simple stack accesses and delegate the rest of the cases to getMemDataSize.
Reviewed By: Amir
Differential Revision: https://reviews.llvm.org/D126112
show more ...
|
#
cb75faf4 |
| 13-Jun-2022 |
Amir Ayupov <aaupov@fb.com> |
[X86][BOLT] Use getOperandType to determine memory access size
Generate INSTRINFO_OPERAND_TYPE table in X86GenInstrInfo.inc.
This diff adds support for instructions that were previously reported as
[X86][BOLT] Use getOperandType to determine memory access size
Generate INSTRINFO_OPERAND_TYPE table in X86GenInstrInfo.inc.
This diff adds support for instructions that were previously reported as having memory access size 0. It replaces the heuristic of looking at instruction register width to determine memory access width by instead checking the memory operand type using tablegen-provided tables.
Reviewed By: skan
Differential Revision: https://reviews.llvm.org/D126116
show more ...
|
#
445bc885 |
| 13-Jun-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT] Use 32-bit MOV to zero 64-bit register in instrumentation code
Instead of `movabsq $0x0, %rax` emit shorter equivalent `movl $0x0, %eax`. Intel SDM, 3.4.1.1 General-Purpose Registers in 64-Bi
[BOLT] Use 32-bit MOV to zero 64-bit register in instrumentation code
Instead of `movabsq $0x0, %rax` emit shorter equivalent `movl $0x0, %eax`. Intel SDM, 3.4.1.1 General-Purpose Registers in 64-Bit Mode: >32-bit operands generate a 32-bit result, zero-extended to a 64-bit result in > the destination general-purpose register.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D127045
show more ...
|
#
b92436ef |
| 05-Jun-2022 |
Fangrui Song <i@maskray.me> |
[bolt] Remove unneeded cl::ZeroOrMore for cl::opt options
|
#
e290133c |
| 23-Feb-2022 |
Maksim Panchenko <maks@fb.com> |
[BOLT] Add new class for symbolizing X86 instructions
Summary: While disassembling instructions, we need to replace certain immediate operands with symbols. This symbolizing process relies on readin
[BOLT] Add new class for symbolizing X86 instructions
Summary: While disassembling instructions, we need to replace certain immediate operands with symbols. This symbolizing process relies on reading relocations against instructions. However, some X86 instructions can have multiple immediate operands and up to two relocations against them. Thus, correctly matching a relocation to an operand is not always possible without knowing the operand offset within the instruction.
Luckily, LLVM provides an interface for passing the required info from the disassembler via a virtual MCSymbolizer class. Creating a target-specific version allows a precise matching of relocations to operands.
This diff adds X86MCSymbolizer class that performs X86-specific symbolizing (currently limited to non-branch instructions).
Reviewers: yota9, Amir, ayermolo, rafauler, zr33
Differential Revision: https://reviews.llvm.org/D120928
show more ...
|
#
c09cd64e |
| 21-May-2022 |
Rafael Auler <rafaelauler@fb.com> |
[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 off
[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
show more ...
|
#
139744ac |
| 13-May-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Suppress unused variable warnings
Address warnings in Release build without assertions. Tip @tschuett for reporting the issue #55404.
Reviewed By: rafauler
Differential Revision: https
[BOLT][NFC] Suppress unused variable warnings
Address warnings in Release build without assertions. Tip @tschuett for reporting the issue #55404.
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D125475
show more ...
|
#
8cb7a873 |
| 11-May-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Add MCPlus::primeOperands iterator_range
Reviewed By: yota9
Differential Revision: https://reviews.llvm.org/D125397
|
#
f99398fe |
| 05-Apr-2022 |
Amir Ayupov <aaupov@fb.com> |
[BOLT][NFC] Move isADD64rr and isADDri out of MCPlusBuilder class
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D123077
|
#
2e51a322 |
| 01-Apr-2022 |
Vladislav Khmelevsky <och95@yandex.ru> |
[BOLT] Check for !isTailCall in isUnconditionalBranch
Add !isTailCall in isUnconditionalBranch check in order to sync the x86 and aarch64 and fix the fixDoubleJumps pass on aarch64.
Vladislav Khmel
[BOLT] Check for !isTailCall in isUnconditionalBranch
Add !isTailCall in isUnconditionalBranch check in order to sync the x86 and aarch64 and fix the fixDoubleJumps pass on aarch64.
Vladislav Khmelevsky, Advanced Software Technology Lab, Huawei
Differential Revision: https://reviews.llvm.org/D122929
show more ...
|