Commit graph

3 commits

Author SHA1 Message Date
Vyacheslav Egorov 2a2781edff [vm] Add vm:align-loops pragma
This pragma forces compiler to align loop headers within the
function by architecture specific boundary: 32 bytes on X64
and ARM64 (with the exception of Apple Silicon, which explicitly
discourages aligning branch targets in the optimization manual).

Current implementation is rather naive and does not do any
attempt to decide whether aligning is actually profitable
based on loop body itself.

I have found this pragma to be helpful both to stabilize
benchmark results and achieve better performance
for tight loops on Intel hardware.

Issue https://github.com/dart-lang/sdk/issues/55522

TEST=vm/dart/align_loops_test

Cq-Include-Trybots: luci.dart.try:vm-aot-linux-product-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-linux-debug-x64-try,vm-aot-linux-release-arm64-try,vm-aot-linux-release-simarm_x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-product-arm64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-aot-win-product-x64-try,vm-aot-win-release-arm64-try,vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv64-try,vm-aot-dwarf-linux-product-x64-try,vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try
Change-Id: Ic22fb90d85e7fdebeeaa3908a43328c59436ab58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364121
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2024-04-24 08:52:18 +00:00
Tess Strickland fd1ac98359 [tools] Pass through offsets extractor arguments to tools/build.py.
Allows the builds to be run with non-default arguments, for example:

dart tools/run_offsets_extractor.dart --no-rbe

Change-Id: I1299b156a40baab27db890c0b0ae5f2f945c4259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346361
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2024-01-15 15:36:17 +00:00
Martin Kustermann 8c60c4e70f [vm] Rewrite tools/offset_extractors.sh in Dart
Also

* Make C++ offset_extractor binaries emit entire if/def condition
  (including product vs non-product)
  => This makes it much nicer to look up offsets, as the preceding
     #if condition will be the whole condition.

* Run the builds & offset extractions in parallel

This will make it easier to extend the cross product of our
configurations that require different offsets (e.g. sanitizers)

TEST=Manually run.

Change-Id: I458deb7a1c9403ab3624dd6b6ca51df72d6a6b28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312442
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2023-07-24 12:47:52 +00:00