Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
2a6e5896 |
| 28-Nov-2024 |
Rafael Eckstein <44746868+Casperento@users.noreply.github.com> |
[MergeFunctions] Add support to run the pass over a set of function pointers (#111045)
This modification will enable the usage of `MergeFunctions` as a
standalone library. Currently, `MergeFunction
[MergeFunctions] Add support to run the pass over a set of function pointers (#111045)
This modification will enable the usage of `MergeFunctions` as a
standalone library. Currently, `MergeFunctions` can only be applied to
an entire module. By adopting this change, developers will gain the
flexibility to reuse the `MergeFunctions` code within their own
projects, choosing which functions to merge; hence, promoting code
reusability. Notice that this modification will not break backward
compatibility, because `MergeFunctions` will still work as a pass after
the modification.
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
98ea1a81 |
| 03-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[IPO] Remove unused includes (NFC) (#114716)
Identified with misc-include-cleaner.
|
Revision tags: llvmorg-19.1.3 |
|
#
1941c518 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Reland (2nd attempt) [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute s
Reland (2nd attempt) [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute stable_hash locally and return it.
This is a patch for https://discourse.llvm.org/t/rfc-global-function-merging/82608.
show more ...
|
#
d104b8e8 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Revert "Reland [StructuralHash] Refactor (#112621)"
This reverts commit 98ca9a635bd2fb98cee473a9558687a5b522e219.
|
#
98ca9a63 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Reland [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute stable_hash loc
Reland [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute stable_hash locally and return it.
This is a patch for https://discourse.llvm.org/t/rfc-global-function-merging/82608.
show more ...
|
#
96723756 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Revert "[StructuralHash] Refactor (#112621)"
This reverts commit b667d161f0a9ff6b29cda0ccdb0081610c1e8b8c.
|
#
b667d161 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
[StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638.
- Use stable_hash instead of uint64_t
- Rename update* to hash* functions. They compute stable_hash locally a
[StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638.
- Use stable_hash instead of uint64_t
- Rename update* to hash* functions. They compute stable_hash locally and return it.
This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
show more ...
|
Revision tags: llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4 |
|
#
a9d4ddd9 |
| 10-Apr-2024 |
Oskar Wirga <oskar.wirga@gmail.com> |
[MergeFuncs/CFI] Ensure all type metadata is propogated for CFI (#88218)
I noticed that we weren't propagating ALL type metadata that was
attached to CFI functions:
# BEFORE
```
; Function A
[MergeFuncs/CFI] Ensure all type metadata is propogated for CFI (#88218)
I noticed that we weren't propagating ALL type metadata that was
attached to CFI functions:
# BEFORE
```
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !dbg !62311 !type !34028 !type !34029 !type !34030
... fn merging
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !type !34028
```
# AFTER
```
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !dbg !62311 !type !34028 !type !34029 !type !34030
... fn merging
; Function Attrs: minsize nounwind optsize ssp uwtable(sync)
define internal void @foo(ptr nocapture noundef readonly %0) #0 !type !type !34028 !type !34029 !type !34030
```
This patch makes sure that the entire vector of metadata is copied over.
show more ...
|
Revision tags: llvmorg-18.1.3, llvmorg-18.1.2 |
|
#
ffd08c77 |
| 19-Mar-2024 |
Stephen Tozer <stephen.tozer@sony.com> |
[RemoveDIs][NFC] Rename DPValue -> DbgVariableRecord (#85216)
This is the major rename patch that prior patches have built towards.
The DPValue class is being renamed to DbgVariableRecord, which re
[RemoveDIs][NFC] Rename DPValue -> DbgVariableRecord (#85216)
This is the major rename patch that prior patches have built towards.
The DPValue class is being renamed to DbgVariableRecord, which reflects
the updated terminology for the "final" implementation of the RemoveDI
feature. This is a pure string substitution + clang-format patch. The
only manual component of this patch was determining where to perform
these string substitutions: `DPValue` and `DPV` are almost exclusively
used for DbgRecords, *except* for:
- llvm/lib/target, where 'DP' is used to mean double-precision, and so
appears as part of .td files and in variable names. NB: There is a
single existing use of `DPValue` here that refers to debug info, which
I've manually updated.
- llvm/tools/gold, where 'LDPV' is used as a prefix for symbol
visibility enums.
Outside of these places, I've applied several basic string
substitutions, with the intent that they only affect DbgRecord-related
identifiers; I've checked them as I went through to verify this, with
reasonable confidence that there are no unintended changes that slipped
through the cracks. The substitutions applied are all case-sensitive,
and are applied in the order shown:
```
DPValue -> DbgVariableRecord
DPVal -> DbgVarRec
DPV -> DVR
```
Following the previous rename patches, it should be the case that there
are no instances of any of these strings that are meant to refer to the
general case of DbgRecords, or anything other than the DPValue class.
The idea behind this patch is therefore that pure string substitution is
correct in all cases as long as these assumptions hold.
show more ...
|
#
2e865353 |
| 14-Mar-2024 |
Stephen Tozer <stephen.tozer@sony.com> |
[RemoveDIs][NFC] Move DPValue::filter -> filterDbgVars (#85208)
This patch changes DPValue::filter to be a non-member method
filterDbgVars. There are two reasons for this: firstly, the name of
DPV
[RemoveDIs][NFC] Move DPValue::filter -> filterDbgVars (#85208)
This patch changes DPValue::filter to be a non-member method
filterDbgVars. There are two reasons for this: firstly, the name of
DPValue is about to change to DbgVariableRecord, which will result in
every `for` loop that uses DPValue::filter to require a line break. This
is a small thing, but it makes the rename patch more difficult to
review, and is just generally more awkward for what is a fairly common
loop. Secondly, the intent is to later break up the DPValue class into
subclasses, at which point it would be better to have a non-member
function that allows template arguments for the cases we want to filter
with greater specificity.
show more ...
|
#
15f3f446 |
| 12-Mar-2024 |
Stephen Tozer <stephen.tozer@sony.com> |
[RemoveDIs][NFC] Rename common interface functions for DPValues->DbgRecords (#84793)
As part of the effort to rename the DbgRecord classes, this patch
renames the widely-used functions that operate
[RemoveDIs][NFC] Rename common interface functions for DPValues->DbgRecords (#84793)
As part of the effort to rename the DbgRecord classes, this patch
renames the widely-used functions that operate on DbgRecords but refer
to DbgValues or DPValues in their names to refer to DbgRecords instead;
all such functions are defined in one of `BasicBlock.h`,
`Instruction.h`, and `DebugProgramInstruction.h`.
This patch explicitly does not change the names of any comments or
variables, except for where they use the exact name of one of the
renamed functions. The reason for this is reviewability; this patch can
be trivially examined to determine that the only changes are direct
string substitutions and any results from clang-format responding to the
changed line lengths. Future patches will cover renaming variables and
comments, and then renaming the classes themselves.
show more ...
|
Revision tags: llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3 |
|
#
d2942a86 |
| 20-Feb-2024 |
Shoaib Meenai <smeenai@fb.com> |
[MergeFunctions] Fix thunks for non-instruction debug info (#82080)
When MergeFunctions creates new thunk functions, it needs to copy over
the debug info format kind from the original function, oth
[MergeFunctions] Fix thunks for non-instruction debug info (#82080)
When MergeFunctions creates new thunk functions, it needs to copy over
the debug info format kind from the original function, otherwise we'll
mix debug info formats and run into assertions. This was exposed by a
downstream change that runs MergeFunctions before inlining, which caused
assertions when inlining attempted to inline thunks created by merging,
and the added test covers both scenarios where merging creates thunks.
show more ...
|
#
ababa964 |
| 20-Feb-2024 |
Orlando Cazalet-Hyams <orlando.hyams@sony.com> |
[RemoveDIs][NFC] Introduce DbgRecord base class [1/3] (#78252)
Patch 1 of 3 to add llvm.dbg.label support to the RemoveDIs project. The
patch stack adds a new base class
-> 1. Add DbgRecord
[RemoveDIs][NFC] Introduce DbgRecord base class [1/3] (#78252)
Patch 1 of 3 to add llvm.dbg.label support to the RemoveDIs project. The
patch stack adds a new base class
-> 1. Add DbgRecord base class for DPValue and the not-yet-added
DPLabel class.
2. Add the DPLabel class.
3. Enable dbg.label conversion and add support to passes.
Patches 1 and 2 are NFC.
In the near future we also will rename DPValue to DbgVariableRecord and
DPLabel to DbgLabelRecord, at which point we'll overhaul the function
names too. The name DPLabel keeps things consistent for now.
show more ...
|
#
34f61cfa |
| 07-Feb-2024 |
Jeremy Morse <jeremy.morse@sony.com> |
[DebugInfo][RemoveDIs] Instrument MergeFunctions for DPValues (#80974)
The MergeFunctions pass has a "preserve some debug-info" mode that tries
to preserve parameter values. This patch generalises
[DebugInfo][RemoveDIs] Instrument MergeFunctions for DPValues (#80974)
The MergeFunctions pass has a "preserve some debug-info" mode that tries
to preserve parameter values. This patch generalises its decision-making
so that it applies to both debug-info stored in intrinsics, and
debug-info stored in DPValue objects. For the most part this involves
using a generic lambda and applying it to each type of object.
(Normally we avoid debug-info affecting the code generated, but this is
hidden behind a command line switch, so won't usually be encountered by
users).
Note that this diff is messy, but that's because I'm hoisting some code
into lambdas. The actual decision making processes here are identical.
show more ...
|
Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
c9b7d21d |
| 18-Oct-2023 |
Oskar Wirga <10386631+oskarwirga@users.noreply.github.com> |
[CFI/MergeFunctions] Modify MergeFunctions to propagate type information (#68628)
When MergeFuncs creates a thunk, it does not modify the function in
place, but creates a new one altogether. If typ
[CFI/MergeFunctions] Modify MergeFunctions to propagate type information (#68628)
When MergeFuncs creates a thunk, it does not modify the function in
place, but creates a new one altogether. If type metadata is not
properly forwarded to this new function, LowerTypeTests will be unable
to put this thunk into the dispatch table.
The fix here is to just forward the type metadata to the newly created
functions.
show more ...
|
Revision tags: llvmorg-17.0.3 |
|
#
b48450c2 |
| 12-Oct-2023 |
Oskar Wirga <10386631+oskarwirga@users.noreply.github.com> |
[MergeFuncs] Use sizeWithoutDebug to decide if we create a thunk (#68627)
I noticed that when we determine the size of the function to figure out
if its profitable, we include debug instructions wh
[MergeFuncs] Use sizeWithoutDebug to decide if we create a thunk (#68627)
I noticed that when we determine the size of the function to figure out
if its profitable, we include debug instructions which can end up making
larger functions than necessary.
show more ...
|
Revision tags: llvmorg-17.0.2 |
|
#
e06fc2b2 |
| 23-Sep-2023 |
Oskar Wirga <10386631+oskarwirga@users.noreply.github.com> |
Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass (#65963)
This diff fixes an issue in the MergeFunctions pass where two different
Control Flow Integrity (CFI) metadata checks were incorr
Fix: Distinguish CFI Metadata Checks in MergeFunctions Pass (#65963)
This diff fixes an issue in the MergeFunctions pass where two different
Control Flow Integrity (CFI) metadata checks were incorrectly considered
identical. These merges would lead to runtime violations down the line
as two separate objects contained a single destructor which itself
contained checks for only one of the objects.
Here I update the comparison logic to take into account the metadata at
llvm.type.test checks. Now, only truly identical checks will be
considered for merging, thus preserving the integrity of each check.
Previous discussion: https://reviews.llvm.org/D154119
show more ...
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
b5669d6f |
| 23-Aug-2023 |
Nikita Popov <npopov@redhat.com> |
[MergeFunctions] Remove unnecessary bitcasts (NFC)
|
Revision tags: llvmorg-17.0.0-rc3 |
|
#
64da0be1 |
| 17-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
Reland "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This is a reland of 28134a29fdedd8972acdfb39223571ddcc15dc59 which was reverted due to behavioral differences between 32 and 64 bit buil
Reland "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This is a reland of 28134a29fdedd8972acdfb39223571ddcc15dc59 which was reverted due to behavioral differences between 32 and 64 bit builds that have since been fixed.
Differential Revision: https://reviews.llvm.org/D158217
show more ...
|
#
7ff7df1c |
| 19-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
Revert "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This reverts commit 28134a29fdedd8972acdfb39223571ddcc15dc59.
This patch was causing build failures on multiple buildbots on 32-bit arc
Revert "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This reverts commit 28134a29fdedd8972acdfb39223571ddcc15dc59.
This patch was causing build failures on multiple buildbots on 32-bit architectures. Reverting now so I can deboug out-of-trunk and resubmit later.
show more ...
|
#
28134a29 |
| 17-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
[NFCi][MergeFunctions] Consolidate Hashing Functions
A couple years ago, StructuralHash was created, copying the exact hashing implementation from FunctionComparator (minus a couple small details/re
[NFCi][MergeFunctions] Consolidate Hashing Functions
A couple years ago, StructuralHash was created, copying the exact hashing implementation from FunctionComparator (minus a couple small details/refactorings). Since then, the hashing implementation has not diverged, but several other areas, like unit testing, have diverged significantly, with StructuralHash getting more attention in these areas. This patch aims to consolidate the two hashing functions into StructuralHash given they do the exact same thing and having less divergence in areas like unit testing would be beneficial.
The original aim at creating a separate StructuralHash was to make the implementation divergent and capture additional details like instruction operands (which neither hashing implementation does currently). The MergeFunctions pass doesn't need these detaisl, but verification of pass return values would benefit from this additional data. Setting an option to calculate these values would allow for divergent behavior where appropriate while reducing code duplication with little runtime overhead.
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D158217
show more ...
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2 |
|
#
a20f7efb |
| 15-Apr-2023 |
Bjorn Pettersson <bjorn.a.pettersson@ericsson.com> |
Remove several no longer needed includes. NFCI
Mostly removing includes of InitializePasses.h and Pass.h in passes that no longer has support for the legacy PM.
|
Revision tags: llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2 |
|
#
c972ed4d |
| 06-Feb-2023 |
Arthur Eubanks <aeubanks@google.com> |
[MergeFunctions] Remove legacy pass
It's part of the optimization pipeline, which the legacy pass manager version is deprecated.
|
Revision tags: llvmorg-16.0.0-rc1, llvmorg-17-init |
|
#
931d04be |
| 15-Jan-2023 |
Benjamin Kramer <benny.kra@googlemail.com> |
[ADT] Make StringRef::compare like std::string_view::compare
string_view has a slightly weaker contract, which only specifies whether the value is bigger or smaller than 0. Adapt users accordingly a
[ADT] Make StringRef::compare like std::string_view::compare
string_view has a slightly weaker contract, which only specifies whether the value is bigger or smaller than 0. Adapt users accordingly and just forward to the standard function (that also compiles down to memcmp)
show more ...
|
Revision tags: llvmorg-15.0.7 |
|
#
38818b60 |
| 04-Jan-2023 |
serge-sans-paille <sguelton@mozilla.com> |
Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part
Use deduction guides instead of helper functions.
The only non-automatic changes have been:
1. ArrayRef(some_uint8_pointer, 0
Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part
Use deduction guides instead of helper functions.
The only non-automatic changes have been:
1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*)) 2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase. 3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated. 4. The "reference mode" of makeArrayRef(ArrayRef<T> &) that acts as no-op is not supported (a constructor cannot achieve that).
Per reviewers' comment, some useless makeArrayRef have been removed in the process.
This is a follow-up to https://reviews.llvm.org/D140896 that introduced the deduction guides.
Differential Revision: https://reviews.llvm.org/D140955
show more ...
|