Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
bb3f5e1f |
| 14-Nov-2024 |
Matin Raayai <30674652+matinraayai@users.noreply.github.com> |
Overhaul the TargetMachine and LLVMTargetMachine Classes (#111234)
Following discussions in #110443, and the following earlier discussions
in https://lists.llvm.org/pipermail/llvm-dev/2017-October/
Overhaul the TargetMachine and LLVMTargetMachine Classes (#111234)
Following discussions in #110443, and the following earlier discussions
in https://lists.llvm.org/pipermail/llvm-dev/2017-October/117907.html,
https://reviews.llvm.org/D38482, https://reviews.llvm.org/D38489, this
PR attempts to overhaul the `TargetMachine` and `LLVMTargetMachine`
interface classes. More specifically:
1. Makes `TargetMachine` the only class implemented under
`TargetMachine.h` in the `Target` library.
2. `TargetMachine` contains target-specific interface functions that
relate to IR/CodeGen/MC constructs, whereas before (at least on paper)
it was supposed to have only IR/MC constructs. Any Target that doesn't
want to use the independent code generator simply does not implement
them, and returns either `false` or `nullptr`.
3. Renames `LLVMTargetMachine` to `CodeGenCommonTMImpl`. This renaming
aims to make the purpose of `LLVMTargetMachine` clearer. Its interface
was moved under the CodeGen library, to further emphasis its usage in
Targets that use CodeGen directly.
4. Makes `TargetMachine` the only interface used across LLVM and its
projects. With these changes, `CodeGenCommonTMImpl` is simply a set of
shared function implementations of `TargetMachine`, and CodeGen users
don't need to static cast to `LLVMTargetMachine` every time they need a
CodeGen-specific feature of the `TargetMachine`.
5. More importantly, does not change any requirements regarding library
linking.
cc @arsenm @aeubanks
show more ...
|
#
c72a751d |
| 01-Nov-2024 |
Phoebe Wang <phoebe.wang@intel.com> |
[X86][AMX] Support AMX-TRANSPOSE (#113532)
Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
|
Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1 |
|
#
eb6e7e8f |
| 21-Sep-2024 |
Jay Foad <jay.foad@amd.com> |
[unittests] Use {} instead of std::nullopt to initialize empty ArrayRef (#109388)
Follow up to #109133.
|
Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1 |
|
#
63e16478 |
| 26-Jul-2024 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
CodeGen: Remove MachineModuleInfo reference from MachineFunction (#100357)
This avoids another unserializable field. Move the DbgInfoAvailable field into the AsmPrinter, which is only really a cache
CodeGen: Remove MachineModuleInfo reference from MachineFunction (#100357)
This avoids another unserializable field. Move the DbgInfoAvailable field into the AsmPrinter, which is only really a cache/convenience bit for checking a direct IR module metadata check.
show more ...
|
Revision tags: llvmorg-20-init |
|
#
676efd0f |
| 18-Jul-2024 |
Jeremy Morse <jeremy.morse@sony.com> |
Reapply 078198f310d5 "Index DebugVariables and some DILocations"
Now revised to actually make the unit test compile, which I'd been ignoring. No actual functional change, it's a type difference. Ori
Reapply 078198f310d5 "Index DebugVariables and some DILocations"
Now revised to actually make the unit test compile, which I'd been ignoring. No actual functional change, it's a type difference. Original commit message follows.
[DebugInfo][InstrRef] Index DebugVariables and some DILocations (#99318)
A lot of time in LiveDebugValues is spent computing DenseMap keys for DebugVariables, and they're made up of three pointers, so are large. This patch installs an index for them: for the SSA and value-to-location mapping parts of InstrRefBasedLDV we don't need to access things like the variable declaration or the inlining site, so just use a uint32_t identifier for each variable fragment that's tracked. The compile-time performance improvements are substantial (almost 0.4% on the tracker).
About 80% of this patch is just replacing DebugVariable references with DebugVariableIDs instead, however there are some larger consequences. We spend lots of time fetching DILocations when emitting DBG_VALUE instructions, so index those with the DebugVariables: this means all DILocations on all new DBG_VALUE instructions will normalise to the first-seen DILocation for the variable (which should be fine).
We also used to keep an ordering of when each variable was seen first in a DBG_* instruction, in the AllVarsNumbering collection, so that we can emit new DBG_* instructions in a stable order. We can hang this off the DebugVariable index instead, so AllVarsNumbering is deleted.
Finally, rather than ordering by AllVarsNumbering just before DBG_* instructions are linked into the output MIR, store instructions along with their DebugVariableID, so that they can be sorted by that instead.
show more ...
|
#
50b657c8 |
| 18-Jul-2024 |
Jeremy Morse <jeremy.morse@sony.com> |
Revert "[DebugInfo][InstrRef] Index DebugVariables and some DILocations (#99318)"
This reverts commit 078198f310d55925ccd9e1aa5b6ff4af3b36bbc7.
Buildbots unhappy, I must have fluffed it
|
#
078198f3 |
| 18-Jul-2024 |
Jeremy Morse <jeremy.morse@sony.com> |
[DebugInfo][InstrRef] Index DebugVariables and some DILocations (#99318)
A lot of time in LiveDebugValues is spent computing DenseMap keys for
DebugVariables, and they're made up of three pointers,
[DebugInfo][InstrRef] Index DebugVariables and some DILocations (#99318)
A lot of time in LiveDebugValues is spent computing DenseMap keys for
DebugVariables, and they're made up of three pointers, so are large.
This patch installs an index for them: for the SSA and value-to-location
mapping parts of InstrRefBasedLDV we don't need to access things like
the variable declaration or the inlining site, so just use a uint32_t
identifier for each variable fragment that's tracked. The compile-time
performance improvements are substantial (almost 0.4% on the tracker).
About 80% of this patch is just replacing DebugVariable references with
DebugVariableIDs instead, however there are some larger consequences. We
spend lots of time fetching DILocations when emitting DBG_VALUE
instructions, so index those with the DebugVariables: this means all
DILocations on all new DBG_VALUE instructions will normalise to the
first-seen DILocation for the variable (which should be fine).
We also used to keep an ordering of when each variable was seen first in
a DBG_* instruction, in the AllVarsNumbering collection, so that we can
emit new DBG_* instructions in a stable order. We can hang this off the
DebugVariable index instead, so AllVarsNumbering is deleted.
Finally, rather than ordering by AllVarsNumbering just before DBG_*
instructions are linked into the output MIR, store instructions along
with their DebugVariableID, so that they can be sorted by that instead.
show more ...
|
#
74deadf1 |
| 29-Jun-2024 |
Nikita Popov <llvm@npopov.com> |
[IRBuilder] Don't include Module.h (NFC) (#97159)
This used to be necessary to fetch the DataLayout, but isn't anymore.
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
acacec3b |
| 23-Dec-2023 |
Felipe de Azevedo Piovezan <fpiovezan@apple.com> |
[LiveDebugValues][nfc] Reduce memory usage of InstrRef (#76051)
Commit 1b531d54f623 (#74203) removed the usage of unique_ptrs of arrays
in favour of using vectors, but inadvertently increased peak
[LiveDebugValues][nfc] Reduce memory usage of InstrRef (#76051)
Commit 1b531d54f623 (#74203) removed the usage of unique_ptrs of arrays
in favour of using vectors, but inadvertently increased peak memory
usage by removing the ability to deallocate vector memory that was no
longer needed mid-LDV.
In that same review, it was pointed out that `FuncValueTable` typedef
could be removed, since it was "just a vector".
This commit addresses both issues by making `FuncValueTable` a real data
structure, capable of mapping BBs to ValueTables and able to free
ValueTables as needed.
This reduces peak memory usage in the compiler by 10% in the benchmarks
flagged by the original review.
As a consequence, we had to remove a handful of instances of the
"declare-then-initialize" antipattern in unittests, as the
FuncValueTable class is no longer default-constructible.
show more ...
|
#
1b531d54 |
| 14-Dec-2023 |
Felipe de Azevedo Piovezan <fpiovezan@apple.com> |
[InstrRef][nfc] Remove usage of unique_ptrs of arrays (#74203)
These are usually difficult to reason about, and they were being used to
pass raw pointers around with array semantic (i.e., we were u
[InstrRef][nfc] Remove usage of unique_ptrs of arrays (#74203)
These are usually difficult to reason about, and they were being used to
pass raw pointers around with array semantic (i.e., we were using
operator [] on raw pointers). To put it in InstrRef terminology: we were
passing a pointer to a ValueTable but using it as if it were a
FuncValueTable.
These could have easily been SmallVectors, which now allow us to have
reference semantics in some places, as well as simpler initialization.
In the future, we can use even more pass-by-reference with some extra
changes in the code.
show more ...
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3 |
|
#
a21abc78 |
| 11-Oct-2023 |
Harald van Dijk <harald@gigawatt.nl> |
[X86] Align i128 to 16 bytes in x86 datalayouts
This is an attempt at rebooting https://reviews.llvm.org/D28990
I've included AutoUpgrade changes to modify the data layout to satisfy the compatible
[X86] Align i128 to 16 bytes in x86 datalayouts
This is an attempt at rebooting https://reviews.llvm.org/D28990
I've included AutoUpgrade changes to modify the data layout to satisfy the compatible layout check. But this does mean alloca, loads, stores, etc in old IR will automatically get this new alignment.
This should fix PR46320.
Reviewed By: echristo, rnk, tmgross
Differential Revision: https://reviews.llvm.org/D86310
show more ...
|
Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
0a1aa6cd |
| 14-Sep-2023 |
Arthur Eubanks <aeubanks@google.com> |
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future chang
[NFC][CodeGen] Change CodeGenOpt::Level/CodeGenFileType into enum classes (#66295)
This will make it easy for callers to see issues with and fix up calls
to createTargetMachine after a future change to the params of
TargetMachine.
This matches other nearby enums.
For downstream users, this should be a fairly straightforward
replacement,
e.g. s/CodeGenOpt::Aggressive/CodeGenOptLevel::Aggressive
or s/CGFT_/CodeGenFileType::
show more ...
|
Revision tags: llvmorg-17.0.0-rc4 |
|
#
111fcb0d |
| 02-Sep-2023 |
Fangrui Song <i@maskray.me> |
[llvm] Fix duplicate word typos. NFC
Those fixes were taken from https://reviews.llvm.org/D137338
|
Revision tags: llvmorg-17.0.0-rc3, 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, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
b6a01caa |
| 03-Dec-2022 |
Kazu Hirata <kazu@google.com> |
[llvm/unittests] 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 am
[llvm/unittests] 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 ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
#
2d6b4943 |
| 23-Aug-2022 |
Stephen Tozer <stephen.tozer@sony.com> |
[CodeGen][InstrRef] Remove unused variables from test case
|
#
5fa6e8c3 |
| 22-Aug-2022 |
Stephen Tozer <stephen.tozer@sony.com> |
[InstrRef] Fix unused variable in InstrRefLDVTest
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
#
53fd5af6 |
| 18-Jun-2022 |
Stephen Tozer <stephen.tozer@sony.com> |
[DebugInfo] Let InstrRefBasedLDV handle joins for lists of debug ops
In preparation for adding support for DBG_VALUE_LIST instructions in InstrRefLDV, this patch updates the logic for joining variab
[DebugInfo] Let InstrRefBasedLDV handle joins for lists of debug ops
In preparation for adding support for DBG_VALUE_LIST instructions in InstrRefLDV, this patch updates the logic for joining variables at block joins to support joining variables that use multiple debug operands. This is one of the more meaty "logical" changes, although the line count isn't too high - this changes pickVPHILoc to find a valid joined location for every operand, with part of the function being split off into pickValuePHILoc which finds a location for a single operand.
Differential Revision: https://reviews.llvm.org/D128180
show more ...
|
#
71771f85 |
| 22-Aug-2022 |
Kazu Hirata <kazu@google.com> |
[CodeGen] Fix unused variable warnings
|
#
b5ba5d2a |
| 17-Jun-2022 |
Stephen Tozer <stephen.tozer@sony.com> |
[DebugInfo][NFC] Represent DbgValues with multiple ops in IRefLDV
In preparation for allowing InstrRefBasedLDV to handle DBG_VALUE_LIST, this patch updates the internal representation that it uses t
[DebugInfo][NFC] Represent DbgValues with multiple ops in IRefLDV
In preparation for allowing InstrRefBasedLDV to handle DBG_VALUE_LIST, this patch updates the internal representation that it uses to represent debug values to store a list of values. This is one of the more significant changes in terms of line count, but is fairly simple and should not affect the output of this pass.
Differential Revision: https://reviews.llvm.org/D128177
show more ...
|
#
11ce014a |
| 16-Jun-2022 |
Stephen Tozer <stephen.tozer@sony.com> |
[DebugInfo][NFC] Update LDV to use generic DBG_VALUE* MI interface
Currently, InstrRefLDV only handles DBG_VALUE instructions, not DBG_VALUE_LIST, and as a result of this it handles these instructio
[DebugInfo][NFC] Update LDV to use generic DBG_VALUE* MI interface
Currently, InstrRefLDV only handles DBG_VALUE instructions, not DBG_VALUE_LIST, and as a result of this it handles these instructions using functions that only work for that type of debug value, i.e. using getOperand(0) to get the debug operand. This patch changes this to use the generic debug value functions, such as getDebugOperand and isDebugOffsetImm, as well as adding an IsVariadic field to the DbgValueProperties class and a few other minor changes to acknowledge DBG_VALUE_LISTs. Note that this patch does not add support for DBG_VALUE_LIST here, but is a precursor to other patches that do add that support.
Differential Revision: https://reviews.llvm.org/D128174
show more ...
|
Revision tags: llvmorg-14.0.5, llvmorg-14.0.4 |
|
#
53125e7d |
| 17-May-2022 |
Stephen Tozer <stephen.tozer@sony.com> |
[DebugInfo] Handle joins PHI+Def values in InstrRef LiveDebugValues
In the InstrRefBasedImpl for LiveDebugValues, we attempt to propagate debug values through basic blocks in part by checking to see
[DebugInfo] Handle joins PHI+Def values in InstrRef LiveDebugValues
In the InstrRefBasedImpl for LiveDebugValues, we attempt to propagate debug values through basic blocks in part by checking to see whether all a variable's incoming debug values to a BB "agree", i.e. whether their properties match and they refer to the same underlying value.
Prior to this patch, the check for agreement between incoming values relied on exact equality, which meant that a VPHI and a Def DbgValue that referred to the same underlying value would be seen as disagreeing. This patch changes this behaviour to treat them as referring to the same value, allowing the shared value to propagate into the BB.
Differential Revision: https://reviews.llvm.org/D125953
show more ...
|
Revision tags: llvmorg-14.0.3 |
|
#
65d5beca |
| 26-Apr-2022 |
Jeremy Morse <jeremy.morse@sony.com> |
Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI
This was reverted twice, in 987cd7c3ed75b and 13815e8cbf8d4. The latter stemed from not accounting for rare register classes in a
Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI
This was reverted twice, in 987cd7c3ed75b and 13815e8cbf8d4. The latter stemed from not accounting for rare register classes in a pre-allocated array, and the former from an array not being completely initialized, leading to asan complaining.
show more ...
|
Revision tags: llvmorg-14.0.2 |
|
#
987cd7c3 |
| 25-Apr-2022 |
Jeremy Morse <jeremy.morse@sony.com> |
Revert "Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI"
This reverts commit 5db925023169f8a19419e68153682d1e518f8392.
Further to the early revert, the sanitizers have found so
Revert "Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI"
This reverts commit 5db925023169f8a19419e68153682d1e518f8392.
Further to the early revert, the sanitizers have found something wrong with this.
show more ...
|
#
5db92502 |
| 25-Apr-2022 |
Jeremy Morse <jeremy.morse@sony.com> |
Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI
This was applied in fda4305e53784, reverted in 13815e8cbf8d49, the problem was that fp80 X86 registers that were spilt to the sta
Reapply D124184, [DebugInfo][InstrRef] Add a size operand to DBG_PHI
This was applied in fda4305e53784, reverted in 13815e8cbf8d49, the problem was that fp80 X86 registers that were spilt to the stack aren't expected by LiveDebugValues. It pre-allocates a position number for all register sizes that can be spilt, and 80 bits isn't exactly common.
The solution is to scan the register classes to find any unrecognised register sizes, adn pre-allocate those position numbers, avoiding a later assertion.
show more ...
|
Revision tags: llvmorg-14.0.1 |
|
#
989f1c72 |
| 15-Mar-2022 |
serge-sans-paille <sguelton@redhat.com> |
Cleanup codegen includes
This is a (fixed) recommit of https://reviews.llvm.org/D121169
after: 1061034926 before: 1063332844
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-in
Cleanup codegen includes
This is a (fixed) recommit of https://reviews.llvm.org/D121169
after: 1061034926 before: 1063332844
Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup Differential Revision: https://reviews.llvm.org/D121681
show more ...
|