History log of /llvm-project/bolt/lib/Rewrite/RewriteInstance.cpp (Results 26 – 50 of 238)
Revision Date Author Comments
# 49fdbbcf 30-Jun-2024 Shaw Young <58664393+shawbyoung@users.noreply.github.com>

[BOLT] Match functions with exact hash (#96572)

Added flag '--match-profile-with-function-hash' to match functions
based on exact hash. After identical and LTO name matching, more
functions can

[BOLT] Match functions with exact hash (#96572)

Added flag '--match-profile-with-function-hash' to match functions
based on exact hash. After identical and LTO name matching, more
functions can be recovered for inference with exact hash, in the case
of function renaming with no functional changes. Collisions are
possible in the unlikely case where multiple functions share the same
exact hash. The flag is off by default as it requires the processing of
all binary functions and subsequently is expensive.

Test Plan: added hashing-based-function-matching.test.

show more ...


# 902952ae 25-Jun-2024 shawbyoung <shawbyoung@gmail.com>

Revert "[������] initial version"

This reverts commit bb5ab1ffe719f5e801ef08ac08be975546aa3266.


# c097e643 25-Jun-2024 shawbyoung <shawbyoung@gmail.com>

Revert "Added opts::Lite to RewriteInstance"

This reverts commit 020f69cd10a2ff1233cc28088989319e5a58b116.


# 020f69cd 25-Jun-2024 shawbyoung <shawbyoung@gmail.com>

Added opts::Lite to RewriteInstance


# bb5ab1ff 24-Jun-2024 shawbyoung <shawbyoung@gmail.com>

[������] initial version

Created using spr 1.3.4


# 32e4906c 24-Jun-2024 shaw young <58664393+shawbyoung@users.noreply.github.com>

Revert "[BOLT] Hash-based function matching" (#96568)

Reverts llvm/llvm-project#95821


# 5e097c79 24-Jun-2024 shaw young <58664393+shawbyoung@users.noreply.github.com>

[BOLT] Hash-based function matching (#95821)

Using the hashes of binary and profiled functions
to recover functions with changed names.

Test Plan: added
hashing-based-function-matching.test.


# 8ea59ec6 04-Jun-2024 Maksim Panchenko <maks@fb.com>

[BOLT] Use rewriter interface for updating binary build ID (#94273)

Move functionality for patching build ID into a separate rewriter class
and change the way we do the patching. Support build ID i

[BOLT] Use rewriter interface for updating binary build ID (#94273)

Move functionality for patching build ID into a separate rewriter class
and change the way we do the patching. Support build ID in different
note sections in order to update the build ID in the Linux kernel binary
which puts in into ".notes" section instead of ".note.gnu.build-id".

show more ...


# e9954ec0 31-May-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Detect .warm split functions as cold fragments (#93759)

CDSplit splits functions up to three ways: main fragment with no suffix,
and fragments with .cold and .warm suffixes.

Add .warm suffix

[BOLT] Detect .warm split functions as cold fragments (#93759)

CDSplit splits functions up to three ways: main fragment with no suffix,
and fragments with .cold and .warm suffixes.

Add .warm suffix to the regex used to recognize split fragments.

Test Plan: updated register-fragments-bolt-symbols.s

show more ...


# 83b3e13e 23-May-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Allow processing of binaries with stripped FILE symbols mismatching the profile (#93238)

Reintroduce allow-stripped as a fallback mechanism after enforcement of
HasSymbolsWithFileName was fi

[BOLT] Allow processing of binaries with stripped FILE symbols mismatching the profile (#93238)

Reintroduce allow-stripped as a fallback mechanism after enforcement of
HasSymbolsWithFileName was fixed in
https://github.com/llvm/llvm-project/pull/92625.

This partially reverts commit ccabbfff86a00a0b211f5d0835916a1250ebcf0f.

show more ...


# a79acb0c 22-May-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Fix setHasSymbolsWithFileName (#92625)

The function is used to ignore the parameter and set
`HasSymbolsWithFileName` unconditionally.


# 1529ec08 22-May-2024 Amir Ayupov <aaupov@fb.com>

[BOLT][NFC] Move out PrintProgramStats from Profile into Rewrite (#93075)

Eliminate the dependence of Profile on Passes.

Test Plan: NFC


# 96378b3d 22-May-2024 shaw young <58664393+shawbyoung@users.noreply.github.com>

[BOLT] Add NamedRegionTimer to inferStaleProfile (#93078)


# 935b946b 22-May-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Process cross references between ignored functions in BAT mode (#92484)

To align YAML and fdata profiles produced in BAT mode, lift two
restrictions applied in non-relocation mode when BAT i

[BOLT] Process cross references between ignored functions in BAT mode (#92484)

To align YAML and fdata profiles produced in BAT mode, lift two
restrictions applied in non-relocation mode when BAT is present:
1) register secondary entry points from ignored functions,
2) treat functions with secondary entry points as simple.

This allows constructing CFG for non-simple functions in non-relocation
mode and emitting YAML profile for them, which can then be used for
optimizations in relocation mode.

Test Plan: added test ignored-interprocedural-reference.s

show more ...


# 32c9d5ef 21-May-2024 Amir Ayupov <aaupov@fb.com>

Revert "[BOLT] Add NamedRegionTimer to inferStaleProfile (#92621)"

This reverts commit 9f2313829fd210f9923375e93bc11fe9685c26d5.

Creates a dependency cycle: lib/Rewrite depends on lib/Profile.


# 9f231382 21-May-2024 shaw young <58664393+shawbyoung@users.noreply.github.com>

[BOLT] Add NamedRegionTimer to inferStaleProfile (#92621)


# bb627b0a 20-May-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Ignore special symbols as function aliases in updateELFSymbolTable

Exempt special symbols (hot text/data and _end symbol) from normal
handling. We only need to set their value and make them a

[BOLT] Ignore special symbols as function aliases in updateELFSymbolTable

Exempt special symbols (hot text/data and _end symbol) from normal
handling. We only need to set their value and make them absolute.

If these symbols are handled as normal symbols and if they alias
functions we may create non-sensical symbols, e.g. __hot_start.cold.

Test Plan: updated hot-end-symbol.s

Reviewers: maksfb, rafaelauler, ayermolo, dcci

Reviewed By: dcci, maksfb

Pull Request: https://github.com/llvm/llvm-project/pull/92713

show more ...


# 9cd218e4 02-May-2024 Maksim Panchenko <maks@fb.com>

[BOLT] Refactor BOLT reserved space discovery (#90893)

Move code that checks for __bolt_reserved_{start,end} into a new
discoverBOLTReserved() function and call it from discoverFileObjects()
so th

[BOLT] Refactor BOLT reserved space discovery (#90893)

Move code that checks for __bolt_reserved_{start,end} into a new
discoverBOLTReserved() function and call it from discoverFileObjects()
so that the reserved space info is accessible to passes. NFC for the
current set of binaries.

show more ...


# ad7ee900 02-May-2024 Maksim Panchenko <maks@fb.com>

[BOLT][NFC] Add BOLTReserved to BinaryContext (#90766)

Use BOLTReserved to track binary space preallocated for BOLT.


# 49bb9939 30-Apr-2024 Maksim Panchenko <maks@fb.com>

[BOLT] Fix build-time assertion in RewriteInstance (#90540)

We use pwrite() in RewriteInstance to update contents of existing
sections. pwrite() requires file position to be set past the written
o

[BOLT] Fix build-time assertion in RewriteInstance (#90540)

We use pwrite() in RewriteInstance to update contents of existing
sections. pwrite() requires file position to be set past the written
offset which we guarantee at the start of rewriteFile(). Then we had an
implicit assumption in patchBuildID() that the file position will be set
again in patchELFSymTabs() after being reset in patchELFPHDRTable().
That assumption was broken in #90300. The fix is to save and restore
file position in patchELFPHDRTable(). Then we don't have to update it
again in patchELFSymTabs().

show more ...


# c4c4e17c 29-Apr-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Use heuristic for matching split local functions (#90424)

Use known order of BOLT split function symbols: fragment symbols
immediately precede the parent fragment symbol.

Depends On: http

[BOLT] Use heuristic for matching split local functions (#90424)

Use known order of BOLT split function symbols: fragment symbols
immediately precede the parent fragment symbol.

Depends On: https://github.com/llvm/llvm-project/pull/89648

Test Plan: Added register-fragments-bolt-symbols.s

show more ...


# 3a0d894f 29-Apr-2024 Maksim Panchenko <maks@fb.com>

[BOLT] Add support for BOLT-reserved space in a binary (#90300)

Allow the user to allocate space in a binary that could be used by BOLT
for allocating new sections. The reservation is specified by

[BOLT] Add support for BOLT-reserved space in a binary (#90300)

Allow the user to allocate space in a binary that could be used by BOLT
for allocating new sections. The reservation is specified by two special
symbols recognizable by BOLT: __bolt_reserved_{start,end}.

The reserved space will be useful for optimizing the Linux kernel where
we cannot allocate a new executable segment. However, the support is not
limited to kernel binaries as some user-space application may find it
useful too.

show more ...


# a1e9608b 29-Apr-2024 Amir Ayupov <aaupov@fb.com>

[BOLT] Use symbol table info in registerFragment (#89648)

Fragment matching relies on symbol names to identify and register split
function fragments. However, as split fragments are often local sym

[BOLT] Use symbol table info in registerFragment (#89648)

Fragment matching relies on symbol names to identify and register split
function fragments. However, as split fragments are often local symbols,
name aliasing is possible. For such cases, use symbol table to resolve
ambiguities.

This requires the presence of FILE symbols in the input binary. As BOLT
requires non-stripped binary, this is a reasonable assumption. Note that
`strip -g` removes FILE symbols by default, but `--keep-file-symbols`
can be used to preserve them.

Depends on: https://github.com/llvm/llvm-project/pull/89861

Test Plan:
Updated X86/fragment-lite.s

show more ...


# 3ec858bc 26-Apr-2024 Maksim Panchenko <maks@fb.com>

[BOLT] Refactor patchELFPHDRTable() (#90290)

Mostly NFC accept for one assertion that was converted into an error.


# 12d322db 26-Apr-2024 Maksim Panchenko <maks@fb.com>

[BOLT][NFC] Use getEHFrameHdrSectionName() (#90257)

Reference section name via wrapper.


12345678910