History log of /llvm-project/llvm/tools/llvm-exegesis/lib/Assembler.cpp (Results 1 – 25 of 63)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 416f1c46 20-Jan-2025 Mats Jun Larsen <mats@jun.codes>

[IR] Replace of PointerType::get(Type) with opaque version (NFC) (#123617)

In accordance with https://github.com/llvm/llvm-project/issues/123569

In order to keep the patch at reasonable size, this

[IR] Replace of PointerType::get(Type) with opaque version (NFC) (#123617)

In accordance with https://github.com/llvm/llvm-project/issues/123569

In order to keep the patch at reasonable size, this PR only covers for
the llvm subproject, unittests excluded.

show more ...


# ff1b01bb 16-Jan-2025 Craig Topper <craig.topper@sifive.com>

[llvm-exegesis] Begin replacing unsigned with MCRegister. NFC (#123109)

Some of this was needed to fix implicit conversions from MCRegister to
unsigned when calling getReg() on MCOperand for exampl

[llvm-exegesis] Begin replacing unsigned with MCRegister. NFC (#123109)

Some of this was needed to fix implicit conversions from MCRegister to
unsigned when calling getReg() on MCOperand for example.

The majority was done by reviewing parts of the code that dealt with
registers, converting them to MCRegister and then seeing what new
implicit conversions were created and fixing those.

There were a few places where I used MCPhysReg instead of MCRegiser for
static arrays since its uint16_t instead of unsigned.

show more ...


Revision tags: llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# 5bb9465d 17-Nov-2024 Aiden Grossman <aidengrossman@google.com>

[llvm-exegesis] Reserve members in array

This patch reserves members in the RegisterSetUp vector as we statically
know the size.


# 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 ...


Revision tags: llvmorg-19.1.3, 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, llvmorg-18.1.3, llvmorg-18.1.2
# 63a5dc4a 11-Mar-2024 Jay Foad <jay.foad@amd.com>

[CodeGen] Do not pass MF into MachineRegisterInfo methods. NFC. (#84770)

MachineRegisterInfo already knows the MF so there is no need to pass it
in as an argument.


Revision tags: 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
# faf675ce 29-Jan-2024 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Remove llvm prefix where unnecessary (#79802)

This patch removes the llvm:: prefix within llvm-exegesis where it is
not necessary. This is most occurrences of the prefix within exeg

[llvm-exegesis] Remove llvm prefix where unnecessary (#79802)

This patch removes the llvm:: prefix within llvm-exegesis where it is
not necessary. This is most occurrences of the prefix within exegesis as
exegesis is within the llvm namespace. This patch makes things more
consistent as the vast majority of the code did not use the llvm::
prefix for anything.

show more ...


# 3bece3d7 26-Jan-2024 Min-Yih Hsu <min.hsu@sifive.com>

[Exegesis] Do not assume the size and layout of the assembled snippet (#79636)

Currently llvm-exegesis assumes that there will only be 3 symbols in the
snippet object, in which the benchmarking fun

[Exegesis] Do not assume the size and layout of the assembled snippet (#79636)

Currently llvm-exegesis assumes that there will only be 3 symbols in the
snippet object, in which the benchmarking function 'foo' is always the
last symbol.

These assumptions do not hold for object file formats of other targets
we support downstream. I think it would be more ideal to generalize this
part of the logics into a simple search on all symbols, as proposed by
this patch.

show more ...


Revision tags: llvmorg-19-init
# a25b6621 03-Jan-2024 Aiden Grossman <agrossman154@yahoo.com>

[NFC][llvm-exegesis] Remove redundant register initial values argument

This patch removes the redundant RegisterInitialValues parameter from
assembleToStream and friends as it is included within the

[NFC][llvm-exegesis] Remove redundant register initial values argument

This patch removes the redundant RegisterInitialValues parameter from
assembleToStream and friends as it is included within the BenchmarkKey
struct that is also passed to all the functions that need this
information.

show more ...


# 63c31483 23-Dec-2023 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Fix stack pointer register restoration

9eb80ab3787e1851be8c686651688e870b93506b changed the method for stack
pointer restoration to fix segmentation faults. However, I made a
mistake

[llvm-exegesis] Fix stack pointer register restoration

9eb80ab3787e1851be8c686651688e870b93506b changed the method for stack
pointer restoration to fix segmentation faults. However, I made a
mistake in the patch and swapped a != for a ==, which caused an
arbitrary register (the first one specified) to get restored rather than
the stack pointer specifically. This patch fixes that issue and adds
test coverage to prevent regression.

show more ...


# ceb196d9 15-Dec-2023 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Validate that address annotations are aligned (#75554)

This patch adds in validation at two different levels that address
annotations are page aligned. This is necessary as otherwis

[llvm-exegesis] Validate that address annotations are aligned (#75554)

This patch adds in validation at two different levels that address
annotations are page aligned. This is necessary as otherwise the mmap
calls will fail as MAP_FIXED/MAP_FIXED_NOREPLACE require page aligned
addresses. This happens silently in the subprocess. This patch adds
validation at snippet parsing time to give feedback to the user and also
adds asserts at code generation/address usage time to ensure that other
users of the Exegesis APIs conform to the same requirements.

show more ...


# 66886578 30-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

Reland "[llvm-exegesis] Set stack pointer register after starting perf counter (#72489)"

This reverts commit 52b4b357268ac114f7972e37da1e5954f322df09.

This commit was causing build failures on bots

Reland "[llvm-exegesis] Set stack pointer register after starting perf counter (#72489)"

This reverts commit 52b4b357268ac114f7972e37da1e5954f322df09.

This commit was causing build failures on bots without libpfm installed
as the CHECK requires were not set correctly. The test added should only
run on machines with libpfm enabled due to the limitations currently
imposed by the subprocess execution mode.

show more ...


# 52b4b357 29-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

Revert "[llvm-exegesis] Set stack pointer register after starting perf counter (#72489)"

This reverts commit 9eb80ab3787e1851be8c686651688e870b93506b.

This is causing failures on multiple builders.

Revert "[llvm-exegesis] Set stack pointer register after starting perf counter (#72489)"

This reverts commit 9eb80ab3787e1851be8c686651688e870b93506b.

This is causing failures on multiple builders. Pulling it out until I
have time to fix it.

show more ...


# 9eb80ab3 29-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Set stack pointer register after starting perf counter (#72489)

Before this patch, in subprocess mode, llvm-exegesis setup the stack
pointer register with the rest of the registers

[llvm-exegesis] Set stack pointer register after starting perf counter (#72489)

Before this patch, in subprocess mode, llvm-exegesis setup the stack
pointer register with the rest of the registers when it was requested by
the user. This would cause a segfault when the instructions to start the
perf counter ran as they use the stack to preserve the three registers
needed to make the syscall. This patch moves the setup of the stack
register to after the configuration of the perf counter to fix this
issue so that we have a valid stack pointer for all the preceeding
operations.

Regression test added.

This fixes #72193.

show more ...


Revision tags: llvmorg-17.0.6
# 04072485 28-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

Reland "Reland "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)"

This reverts commit ea5de6021cf69a233106689cc6f0ee14899e1a83.

This patch was reverted as it broke a test on x86_64 Darwin due to

Reland "Reland "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)"

This reverts commit ea5de6021cf69a233106689cc6f0ee14899e1a83.

This patch was reverted as it broke a test on x86_64 Darwin due to the
symbol naming being different between platforms. As Darwin isn't a
supported platform for executing snippets for llvm-exegesis, we can just
disable the test to fix the issue.

show more ...


# ea5de602 27-Nov-2023 Hans Wennborg <hans@chromium.org>

Revert "Reland "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)""

This broke

tools/llvm-exegesis/X86/latency/dummy-counters.test

on Mac, see comment on the PR.

> There was an issue with cer

Revert "Reland "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)""

This broke

tools/llvm-exegesis/X86/latency/dummy-counters.test

on Mac, see comment on the PR.

> There was an issue with certain configurations failing to build due to a
> deleted Error constructor that should be fixed with this relanding.

This reverts commit 92b821f2dcddbfa934689e10d8f11df150ab1043.

show more ...


# 92b821f2 25-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

Reland "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)"

This reverts commit ddc6ef46418cc419041d0bd85de40d0eb9396848.

This relands commit 12b0ab2c9ce8ef813d9eb888860f20daac3336bd.

There was a

Reland "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)"

This reverts commit ddc6ef46418cc419041d0bd85de40d0eb9396848.

This relands commit 12b0ab2c9ce8ef813d9eb888860f20daac3336bd.

There was an issue with certain configurations failing to build due to a
deleted Error constructor that should be fixed with this relanding.

show more ...


# ddc6ef46 24-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

Revert "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)"

This reverts commit 12b0ab2c9ce8ef813d9eb888860f20daac3336bd.

Currently failing on certain configurations due to a missing
constructor.

Revert "[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)"

This reverts commit 12b0ab2c9ce8ef813d9eb888860f20daac3336bd.

Currently failing on certain configurations due to a missing
constructor. Pulling out so that I can reproduce the issue and make sure
I fix it before resubmitting.

show more ...


# 12b0ab2c 24-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Switch from MCJIT to LLJIT (#72838)

This patch switches from using MCJIT to LLJIT as MCJIT is going to be
deprecated soon.

Fixes #41764.


# 8a02b703 24-Nov-2023 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Refactor ExecutableFunction to use a named constructor (#72837)

This patch refactors ExecutableFunction to use a named constructor
pattern, namely adding the create function, so tha

[llvm-exegesis] Refactor ExecutableFunction to use a named constructor (#72837)

This patch refactors ExecutableFunction to use a named constructor
pattern, namely adding the create function, so that errors occurring
during the creation of an ExecutableFunction can be propogated back up
rather than having to deal with them in report_fatal_error.

show more ...


Revision tags: llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, 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, 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
# 9f80831f 26-May-2023 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Add support for using memory annotations

This patch adds in support for using memory annotations in the
subprocess execution mode.


# 27f37db7 08-Jun-2023 Pavel Kosov <kpdev42@gmail.com>

[llvm-exegesis] Use MCJIT only for execution

Initially, llvm-exegesis was generating the benchmark code for the
host CPU to execute it inside its own process. Thus, MCJIT was reused
for fetching fun

[llvm-exegesis] Use MCJIT only for execution

Initially, llvm-exegesis was generating the benchmark code for the
host CPU to execute it inside its own process. Thus, MCJIT was reused
for fetching function's bytes to fill the assembled_snippet field in
the benchmark report.

Later, the --mtriple and --benchmark-phase command line options were
introduced that are handy for testing snippet generation even if
snippet execution is not possible. In that setup, MCJIT is asked to
parse an object file for a foreign CPU or operating system that is
probably not guaranteed to succeed and was actually observed to fail
in https://reviews.llvm.org/D145763.

This commit implements a much simplified function's code fetching,
assuming the benchmark function is the only function in the object file
and it spans across the entire text section (note that MCJIT-based code
has more or less the same assumption - see TrackingSectionMemoryManager
class).

~~~

Huawei RRI, OS Lab

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D148921

show more ...


Revision tags: llvmorg-16.0.4
# 45af0aa1 15-May-2023 Arthur Eubanks <aeubanks@google.com>

[llvm-exegesis] Create a proper LLVM IR Function for MachineFunctions

I have upcoming changes break with invalid Function definitions.

Reviewed By: aidengrossman, courbet

Differential Revision: ht

[llvm-exegesis] Create a proper LLVM IR Function for MachineFunctions

I have upcoming changes break with invalid Function definitions.

Reviewed By: aidengrossman, courbet

Differential Revision: https://reviews.llvm.org/D149207

show more ...


Revision tags: llvmorg-16.0.3, llvmorg-16.0.2
# df9af1fe 07-Apr-2023 David Blaikie <dblaikie@gmail.com>

Remove redundant `get()` call and use auto on LHS of make_unique


# 5348a253 06-Apr-2023 Pavel Kosov <kpdev42@gmail.com>

[llvm-exegesis][AArch64] Add return statement at the end of the snippet correctly

Currently llvm-exegesis fails to do this which causes every snippet to crash

~~

Huawei RRI, OS Lab

Reviewed By: c

[llvm-exegesis][AArch64] Add return statement at the end of the snippet correctly

Currently llvm-exegesis fails to do this which causes every snippet to crash

~~

Huawei RRI, OS Lab

Reviewed By: courbet

Differential Revision: https://reviews.llvm.org/D147699

show more ...


123